03.03.2013, 01:13
pawn Код:
#include icmd
scmd( alistar, playerid, erro)<Id> scanf("i", Id) {
if(erro)
return SendClientMessage(playerid, -1, "Use: /alistar [Id]");
if(!IsPlayerConnected(Id))
return SendClientMessage(playerid, -1, "Jogador nгo conectado!");
if(PlayerInfo[playerid][Cargo] < 9)
return SendClientMessage(playerid, GetPlayerColor(playerid), "Uso restrito para lideres!");
if(PlayerInfo[Id][Org] >= 1)
return SendClientMessage(playerid, GetPlayerColor(playerid), "O jogador ja faz parte de uma organizaзгo!");
new
pStr[128],
NomeLider[MAX_PLAYER_NAME],
NomePlayer[MAX_PLAYER_NAME]
;
PlayerInfo[Id][Org] = PlayerInfo[playerid][Org];
PlayerInfo[Id][Cargo] = 0;
SetPlayerColor(Id, GetPlayerColor(playerid));
GetPlayerName(playerid, NomeLider, MAX_PLAYER_NAME);
GetPlayerName(Id, NomePlayer, MAX_PLAYER_NAME);
format(pStr, 128, "O Lider %s alistou %s para Organizaзao : %s", NomeLider, NomePlayer, Nomeorgs[PlayerInfo[playerid][Org]]);
SendClientMessageToAll(GetPlayerColor(playerid),pStr);
return true;
}