28.12.2010, 17:42
Seguinte eu tirei pra o lider nao setar mas skin das orgs criminosas ai fico direitinho, ai agora o /lider nao ta mais salvando :S eu me do lider da PM ai deslogo quando logo continuo de lider dos ballas :S
pawn Код:
if(strcmp(cmd, "/lider", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Use: /lider [playerid/Parte-do-Nick] [Number(1-14)]");
return 1;
}
new para1;
new level;
para1 = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
level = strval(tmp);
if(level > 18 || level < 0) { SendClientMessage(playerid, COLOR_GREY, " Nъmeros entre 1 e 18"); return 1; }
if (PlayerInfo[playerid][pAdmin] >= 1338)
{
if(IsPlayerConnected(para1))
{
if(para1 != INVALID_PLAYER_ID)
{
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[para1][pLeader] = level;
format(string, sizeof(string), "* %s lhe deu o direito administraзгo profissional, digite /rg.", sendername);
SendClientMessage(para1, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* %s й o novo lнder administrativo profissional (%d).", giveplayer,level);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
if(level == 0) { PlayerInfo[para1][pChar] = 0; }
else if(level == 2) { PlayerInfo[para1][pChar] = 286; } //FBI/ATF
else if(level == 3) { PlayerInfo[para1][pChar] = 287; } //National Guard
else if(level == 4) { PlayerInfo[para1][pChar] = 70; } //Fire/Ambulance
else if(level == 7) { PlayerInfo[para1][pChar] = 147; } //prefeito
else if(level == 9) { PlayerInfo[para1][pChar] = 17; } //News Reporters
else if(level == 14) { PlayerInfo[para1][pChar] = 112; } //PR
PlayerInfo[para1][pLeader] = level;
PlayerInfo[para1][pMembro] = level;
PlayerInfo[para1][pRank] = 6;
PlayerInfo[para1][pModel] = PlayerInfo[para1][pChar];
SetPlayerSkin(para1, PlayerInfo[para1][pChar]);
}
}//not connected
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Sem Autorizaзгo.");
}
}
return 1;
}