Skip to content
View in the app

A better way to browse. Learn more.

GTAGames.nl - De Nederlandse Grand Theft Auto Community!

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

OnPlayerPickUpPickup

Ok, ik zit dus met een vaag probleem.

Ik heb twee gates geplaatst, eén bij de SFPD garage en eén bij de Easter Basin Naval Base. Die zouden moeten opengaan als je in de pickup bij de poort gaat staan. Er is er eén aan de binnenkant en eén aan de buitenkant omdat je natuurlijk niet door de poort heen kunt lopen.

Als ik nu in de pickup bij de SFPD garage ga staan, gaat die poort niet open, maar die bij de Naval Base raar genoeg wel.

Maar omgekeerd niet. Dus bij de naval base zelf, gaat de poort daar wel open als ik daar in de pickup ga staan, maar die bij de garage niet.

Ik leg het een beetje vaag uit, denk ik, maar het komt hier op neer: Alle pickups doen hetzelfde!

public OnGameModeInit()
{	
//----- PICKUPS ------------------------------------------------------------
PDGate1Pu = AddStaticPickup(1239, 2, -1619.1272,681.8157,7.1901); 		// Police Dept. gate
PDGate2Pu = AddStaticPickup(1239, 2, -1621.6400,692.3630,7.1875); 			// Police Dept. gate

NGGate1Pu = AddStaticPickup(1239, 2, -1526.2906,485.6905,7.1797); 			// National Guards gate
NGGate2Pu = AddStaticPickup(1239, 2, -1521.9705,481.2206,7.1875); 			// National Guards gate

//----- OBJECTS ------------------------------------------------------------
NGGate = CreateObject(986, -1530.290527, 482.614777, 6.873164, 0.0, 0.0, 0.0); //NG closed

PDGate1 = CreateObject(971, -1622.533325, 688.241394, 9.732433, 0.0, 0.0, 0.0); // PD gate 1 closed
PDGate2 = CreateObject(971, -1631.334839, 688.241394, 9.732433, 0.0, 0.0, 0.0); // PD gate 2 closed
PDGate3 = CreateObject(971, -1640.161621, 688.241394, 9.732433, 0.0, 0.0, 0.0); // PD gate 3 closed
return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == NGGate1Pu || NGGate2Pu) // National Guard Gate Pickup
	{
	MoveObject(NGGate, -1537.793701, 482.614777, 6.873164, 3.0);
	SendClientMessage(playerid, COLOR_GREEN, "Opening ...");
	}

else 
	{
	if(pickupid == PDGate1Pu || PDGate2Pu) // Police Dept. Gate pickup
	MoveObject(PDGate1, -1622.533325, 688.241394, 14.232365, 3.0);
	MoveObject(PDGate2, -1631.334839, 688.241394, 14.232365, 3.0);
	MoveObject(PDGate3, -1640.161621, 688.241394, 14.232365, 3.0);
	}
return 1;
}

Edit: Ik weet nu dat AddStaticPickup geen pickupid returned, dus heb ik het vervangen door CreatePickup, maar het is nog steeds hetzelfde.

Edited by Big Boss

Featured Replies

Verander eens

if(pickupid == NGGate1Pu || NGGate2Pu)

en

if(pickupid == PDGate1Pu || PDGate2Pu)

naar:

if(pickupid == NGGate1Pu || pickupid == NGGate2Pu)

en

if(pickupid == PDGate1Pu || pickupid == PDGate2Pu)

  • Author

Bedankt! Alles doet het!

_O_

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.