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.

Tram niet enter-baar, Hoe wel?

Featured Replies

1 van de manieren die je zou kunnen gebruiken is:

//Bovenaan je script:

new tram;

//OnGameModeInit():

tram = AddStaticVehice(tramID, x, y, z, blablabla);

//Ergens onderaan je script:

stock PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
{
new Float:oldposx, Float:oldposy, Float:oldposz;
new Float:tempposx, Float:tempposy, Float:tempposz;
GetPlayerPos(playerid, oldposx, oldposy, oldposz);
tempposx = (oldposx -x);
tempposy = (oldposy -y);
tempposz = (oldposz -z);
if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
{
	return 1;
}
return 0;
}

//OnPlayerCommandText

if(strcmp(cmdtext, "/entertram", true)==0);
{
new Float:tramX, Float:tramY, Float:tramZ;
GetVehiclePos(tram, tramX, tramY, tramZ);
if(PlayerToPoint(10.0, playerid,  tramX, tramY, tramZ)==1)
{
	PutPlayerInVehicle(playerid, tram, 0);
}
else
{
	SendClientMessage(playerid, 0xFF0000AA, "You're not close enough to a tram!");
}
return 1;
}

Ik heb dit zo uit mn hoofd getypt (m.u.v. de 'PlayerToPoint'-functie, die is van Sa:mp forum.

Ik weet dus niet of het nu zonder errors/warning compiled, of dat het uberhaupt werkt.

Maar als het nog niet lukt, laat het ff weten ;)

  • Author

Bedankt, het werkt!

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.