06.01.2013, 16:47
Quote:
pawn Код:
|
pawn Код:
CMD:mp(spect, params[])
{
new
id,
bool:Spectating[MAX_PLAYERS];
if(sscanf(params, "u",id))
return SendClientMessage(playerid,-1,"[ ! ] Use: /spect [id]");
if(!IsPlayerConnected(id) || id == INVALID_PLAYER_ID)
return SendClientMessage(playerid, -1, "[ ! ]Este jogador nгo estб conectado");
if(!Specting[playerid])
{
new name[MAX_PLAYER_NAME],string[50];
GetPlayerName(id,name,MAX_PLAYER_NAME);
format(string,sizeof(string),"[ ! ] Observando %s.",name);
SendClientMessage(playerid,-1,string);
TogglePlayerSpectating(id, 1);
Spectating[playerid] == true;
return 1;
}
else
{
TogglePlayerSpectating(id, 0);
Spectating[playerid] == false;
SendClientMessage(playerid,-1,"[ ! ] Vocк nгo estб mais observando o player.");
return 1;
}
return 1;
}