30.01.2010, 23:11
Basic exemple for you (Not Tested):
Top of your script:
OnPlayerConnect:
OnPlayerCommandText(Top):
And Basic Teleport:
To exit:
And, in OnPlayerDisconnect and OnPlayerDeath:
Top of your script:
pawn Код:
new bool: DisableCmds[MAX_PLAYERS];
pawn Код:
DisableCmds[playerid] = false;
pawn Код:
if(DisableCmds[playerid] == true) return 0;
pawn Код:
if(strcmp(cmd, "/dmzone", true) == 0)
{
SetPlayerPos(playerid, X,Y,Z);
DisableCmds[playerid] = true;
return 1;
}
pawn Код:
if(strcmp(cmd, "/exitdmzone", true) == 0)
{
SetPlayerPos(playerid, X,Y,Z);
DisableCmds[playerid] = false;
return 1;
}
pawn Код:
DisableCmds[playerid] = false;