Need help with forbidden spawn.
#4

Tbh, now thinking of it, you don't need an enum.

pawn Код:
//on the top of your script
new Special[MAX_PLAYERS];
//OnPlayerConnect
Special[playerid] = 0;
//simple command to make someone a special, using dcmd.
dcmd_special(playerid,params)
{
new giveplayerid = strval(params);
if(!params[0]) return SendClientMessage(playerid,COLOR_WHITE,"Usage: /special [playerid]");
if(!IsPlayerConnected(giveplayerid))return SendClientMessage(playerid,COLOR_RED,"ERROR: Invalid ID!"
if(Special[giveplayerid] == 1) return SendClientMessage(playerid,COLOR_RED,"ERROR: Player is already special.");

Special[giveplayerid] = 1;
return 1;
}

//Under OnPlayerSpawn
if(Special[playerid] == 1) return SetPlayerPos(playerid,x,y,z)
Note: this has not been tested, but it should work.
Reply


Messages In This Thread
Need help with forbidden spawn. - by Striker_Moe - 02.10.2009, 20:07
Re: Need help with forbidden spawn. - by _Vortex - 02.10.2009, 20:10
Re: Need help with forbidden spawn. - by Striker_Moe - 02.10.2009, 20:18
Re: Need help with forbidden spawn. - by _Vortex - 02.10.2009, 20:30

Forum Jump:


Users browsing this thread: 1 Guest(s)