SA-MP Forums Archive
Stop Teleport? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Stop Teleport? (/showthread.php?tid=420123)



Stop Teleport? - DarkB0y - 03.03.2013

Can any body tell me how to make the player dont teleport on OnPlayerRequestClass
ty.


Re: Stop Teleport? - AIped - 03.03.2013

if you dont want it to teleport, what do you want it to teleport on onplayerrequestclass. And what is it doing now ?


Re: Stop Teleport? - DarkB0y - 03.03.2013

dude i mean PLAYER CAN TELEPORT ON OnPlayerRequestClass and i want to ask if there any thing to block all the teleports on OnPlayerRequestClass or some thing


Re: Stop Teleport? - SilverKiller - 03.03.2013

Ye
Create this:

pawn Код:
new Teleport[MAX_PLAYERS];
Then in OnPlayerConnect And OnPlayerRequestClass Put this:

pawn Код:
Teleport[playerid] = 1;
And In OnPlayerSpawn, Put this :

pawn Код:
Teleport[playerid] = 0;
Then in your command put this:

pawn Код:
if(Teleport[playerid] == 1) // Means if he is not spawned
// Your code
Hope i helped.


Re: Stop Teleport? - ReVo_ - 03.03.2013

Mhm you want to check if the player is spawned, right?

new bool:PlayerSpawned[MAX_PLAYERS];

OnPlayerConnect and OnPlayerDeath
PlayerSpawned[playerid] = false;

OnPlayerSpawn
PlayerSpawned[playerid] = true;

Just use PlayerSpawned[playerid] == true to check if the player is spawned.