24.11.2010, 23:13
I have this :
I want it to when a player uses it set a checkpoint on him, and everyone can see it. What's wrong on it ?
pawn Код:
if(strcmp(cmd, "/panic", true) == 0)
{
new name[MAX_PLAYERS],x;
GetPlayerName(playerid, name, sizeof(name));
if(team[playerid] == 2) return SendClientMessage(playerid, YELLOW, "You are not a human.");
if(team[playerid] != 1) return SendClientMessage(playerid, YELLOW, "You must stay calm.");
format(string, sizeof(string), "%s is Panicing and needs assistance.", name);
for(x=0;x<MAX_PLAYERS;x++)
{
if(team[x] != 2)
{
new Float:X3,Float:Y3,Float:Z3;
DisablePlayerCheckpoint(x);
GetPlayerPos(x,X3,Y3,Z3);
SetPlayerCheckpoint(x,X3,Y3,Z3,8.0);
}
}
SendClientMessageToAll(YELLOW,string);
return 1;
}