03.03.2013, 01:05
pawn Код:
COMMAND:alistar(playerid, params[])
{
new PlayerB;
new Nome[MAX_PLAYER_NAME];
new Lider[MAX_PLAYER_NAME];
GetPlayerName(playerid, Lider, sizeof(Lider));
new String[200];
if(sscanf(params, "u", PlayerB)) return SendClientMessage(playerid,GetPlayerColor(playerid),"Digite: /Alistar [id]");
if(PlayerInfo[playerid][Cargo] < 9) return SendClientMessage(playerid, GetPlayerColor(playerid), "Voce nao й lider da organizaзao.");
if(PlayerInfo[PlayerB][Org] >= 1) return SendClientMessage(playerid, GetPlayerColor(playerid), "O player ja faz parte de uma organizaзao.");
GetPlayerName(PlayerB, Nome, sizeof(Nome));
PlayerInfo[PlayerB][Org] = PlayerInfo[playerid][Org];
PlayerInfo[PlayerB][Cargo] = 0;
GetPlayerColor(playerid);
SetPlayerColor(PlayerB, playerid);
format(String, sizeof(String),"O Lider %s alistou %s para Organizaзao : %s",Lider, Nome, Nomeorgs[PlayerInfo[playerid][Org]]);
SendClientMessageToAll(GetPlayerColor(playerid),String);
return true;
}