10.10.2010, 05:32
Cara nгo precisava nem postar o cуdigo, o que vocк precisa de fazer й botar isso no comando "/lider"
SpawnPlayer(para1);
A funзгo no caso fica:
SpawnPlayer(para1);
A funзгo no caso fica:
pawn Код:
if(strcmp(cmd, "/lider", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /lider [ id ] [Number(1-10)]");
return 1;
}
new para1;
new level;
para1 = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
level = strval(tmp);
if(level > 30 || level < 0) { SendClientMessage(playerid, COLOR_GREY, "Lideres de 0 a 30"); return 1; }
if (PlayerInfo[playerid][pAdmin] >= 1337)
{
if(IsPlayerConnected(para1))
{
if(para1 != INVALID_PLAYER_ID)
{
if(PlayerInfo[para1][pMembro] > 0)
{
SendClientMessage(playerid, COLOR_GREY, " O Player Ja tem uma Emprego/Lideranзa !");
return 1;
}
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[para1][pLider] = level;
format(string, sizeof(string), " Voce foi escolhido a lider pelo admin %s", sendername);
SendClientMessage(para1, COLOR_LIGHTBLUE, string);
SendClientMessage(para1, COLOR_LIGHTBLUE,"Promovido Com suscesso !!");
if(level == 0) { PlayerInfo[para1][pChar] = 0; }
else if(level == 1) { PlayerInfo[para1][pChar] = 265; } //Policia Militar
else if(level == 2) { PlayerInfo[para1][pChar] = 285; } //B.O.P.E
else if(level == 3) { PlayerInfo[para1][pChar] = 287; } //Exйrcito
else if(level == 4) { PlayerInfo[para1][pChar] = 228; } //S.A.M.U
else if(level == 5) { PlayerInfo[para1][pChar] = 115; } //Varrios Los Aztecas
else if(level == 6) { PlayerInfo[para1][pChar] = 221; } //Grupo Armado Islвmico Lнbio (LIFG)
else if(level == 7) { PlayerInfo[para1][pChar] = 17; } //Prefeito
else if(level == { PlayerInfo[para1][pChar] = 294; } //Matador de Aluguel
else if(level == 9) { PlayerInfo[para1][pChar] = 227; } //Rede Globo
else if(level == 10) { PlayerInfo[para1][pChar] = 46; } //Vazio
else if(level == 11) { PlayerInfo[para1][pChar] = 171; } //Instrutores =*
else if(level == 12) { PlayerInfo[para1][pChar] = 279; } //Bombeiros
else if(level == 13) { PlayerInfo[para1][pChar] = 100; } //Mongols MC
else if(level == 14) { PlayerInfo[para1][pChar] = 61; } //Transnacional
else if(level == 15) { PlayerInfo[para1][pChar] = 270; } //Groove
else if(level == 16) { PlayerInfo[para1][pChar] = 128; } //FARC
else if(level == 17) { PlayerInfo[para1][pChar] = 185; } //Policia Civil
else if(level == 1 { PlayerInfo[para1][pChar] = 102; } //Ballas
else if(level == 19) { PlayerInfo[para1][pChar] = 108; } //Vagos
else if(level == 20) { PlayerInfo[para1][pChar] = 117; } //Mбfia Yakuza
else if(level == 21) { PlayerInfo[para1][pChar] = 22; } //Comando Vermelho
else if(level == 22) { PlayerInfo[para1][pChar] = 125; } //Mбfia La Hermandad
else if(level == 23) { PlayerInfo[para1][pChar] = 143; } //G-MOB
else if(level == 24) { PlayerInfo[para1][pChar] = 292; } //Drifters
else if(level == 25) { PlayerInfo[para1][pChar] = 59; } //Policia Federal
else if(level == 26) { PlayerInfo[para1][pChar] = 61; } //TransTaxi
else if(level == 27) { PlayerInfo[para1][pChar] = 227; } //SBT
else if(level == 2 { PlayerInfo[para1][pChar] = 266; } //Policia Rodoviaria
else if(level == 29) { PlayerInfo[para1][pChar] = 59; } //C.T.P
else if(level == 30) { PlayerInfo[para1][pChar] = 17; } //Governo Federal
gTeam[para1] = 11;
PlayerInfo[para1][pTeam] = 11;
PlayerInfo[para1][pCargo] = 6;
SetPlayerSkin(para1, PlayerInfo[para1][pChar]);
SpawnPlayer(para1);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Voce nгo esta autorizado a usar este comando!");
}
}
return 1;