teleport blocker please help? - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: teleport blocker please help? (
/showthread.php?tid=102864)
teleport blocker please help? -
PANNA - 17.10.2009
well,
in my samp 0.3 server i'm making something that you can choose between 3 skins, and you will be teleported to 1 of the 3 city's.
(example, when you choose skin 3, you will be teleported to San Fierro.)
i want too make a teleport to every airport.
(SF airport, LS airport and LV airport.)
but where i get stuck is, i want that you only can teleport to LS airport if you choosed to spawn in los santos.
(and the same for SF and LV)
i know how to make teleports and everything but how can i make a sort of teleport blocker that when you type lsair
(los santos airport), and you spawned in san fierro that you see something like:
You are not in the Los Santos gang, sfair is for you.
Re: teleport blocker please help? -
miokie - 17.10.2009
Use if() and return 1 if the skin is correct, and return 0, if the skin isn't.
Example:
pawn Код:
new skinid;
skinid = GetPlayerSkin(playerid);
if(skinid == 1)
{
SetPlayerPos...
return 1;
}
else
{
return 0;
}
That is an untested example btw. I've had a break from scripting, and i think thats how it is done.
In future, search before you post, this has been answered alot before.