teleport blocker please help?
#1

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.
Reply
#2

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)