11.03.2011, 13:55
(
Последний раз редактировалось Madsen; 12.03.2011 в 11:54.
)
Quote:
It's possible, if you want 1 command avaible..
pawn Код:
|
Код:
if(m4w[playerid] == 1 || sw[playerid] == 1) { SendClientMessage(playerid,COLOR_NORMALRED,"You are in war and can not use any commands"); return 1; } else if (strcmp("/leave", cmdtext, true, 10) == 0) { if(m4w[playerid] == 1) { SpawnPlayer(playerid); ResetPlayerWeapons(playerid); SetPlayerInterior(playerid, 1); sw[playerid] = 0; m4w[playerid] = 0; SetPlayerPos(playerid, 292.8136,-35.3702,1001.5156); return 1; } else if(sw[playerid] == 1) { SpawnPlayer(playerid); ResetPlayerWeapons(playerid); SetPlayerInterior(playerid, 1); sw[playerid] = 0; m4w[playerid] = 0; SetPlayerPos(playerid, 292.8136,-35.3702,1001.5156); return 1; } else { SendClientMessage(playerid, COLOR_NORMALRED, "You can only use this command while in war"); return 1; } }
1. you can only type the /leave command when sw = 1 or m4w = 1
2. you can't type other commands than /leave when sw = 1 or m4w = 1