13.11.2011, 15:49
Olaб o problema desse comando й que quando tento dar lider para alguem ao invйs de ir para a pessoa vem para mim mesmo, agradeзo desde jб.
PHP код:
if ( strcmp( cmd, "/lider", true) == 0)
{
if(Admin[playerid] < 1) return SendClientMessage(playerid, 0xFFFF00AA, "Vocк nгo й um administrador !");
if ( IsPlayerConnected( playerid) )
{
tmp = strtok( cmdtext, idx) ;
if ( !strlen( tmp) )
{
SendClientMessage( playerid, 0xBFC0C2FF, "Use : /lider [Id / Nome] [Numero(1-4)]") ;
return 1 ;
}
new para1 ;
new level ;
para1 = strval( tmp) ;
tmp = strtok( cmdtext, idx) ;
level = strval( tmp) ;
if ( level > 4 || level < 0) { SendClientMessage( playerid, 0xBFC0C2FF, " Nъmeros entre 1 e 4") ; return 1 ; }
if ( IsPlayerConnected( para1) )
{
if ( para1 != INVALID_PLAYER_ID)
{
GetPlayerName( para1, giveplayer, sizeof( giveplayer) ) ;
GetPlayerName( playerid, sendername, sizeof( sendername) ) ;
Lider[playerid] = level;
format( string, sizeof( string) , "* %s lhe deu lider..", sendername) ;
SendClientMessage( para1, 0x33CCFFAA, string) ;
if ( level == 0){Lider[playerid] = 0; atext = "Merda Nenhuma";}
else if ( level == 1) { Lider[para1] = 1; atext = "Los Aztecas" ;}
else if ( level == 2) { Lider[para1] = 2; atext = "Grove Street" ;}
else if ( level == 3) { Lider[para1] = 3; atext = "Ballas" ;}
else if ( level == 4) { Lider[para1] = 4; atext = "Los Vagos" ;}
if(Lider[playerid] == 1 )
{
SetPlayerSkin(playerid, 120);
if(level == 1) { Jogador[para1][pSkin] = 120; }
SetPlayerPos(playerid, 2529.5349,-1667.6998,15.1689);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid,23,999);
SetPlayerColor(playerid,SF);
SendClientMessage(playerid,SF,"Agora vocк й lider do Still Free Crew");
}
if(Lider[playerid] == 2 )
{
SetPlayerSkin(playerid, 25);
if(level == 2) { Jogador[para1][pSkin] = 25; }
SetPlayerPos(playerid, 2802.9109,-1183.3892,25.5125);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid,23,999);
SetPlayerColor(playerid,Cor_Out);
SendClientMessage(playerid,Cor_Out,"Agora vocк й lider da Bloods");
}
if(Lider[playerid] ==3 )
{
SetPlayerSkin(playerid, 46);
if(level == 3) { Jogador[para1][pSkin] = 46; }
SetPlayerPos(playerid, 2216.2217,-1171.5533,25.7266);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid,23,999);
SetPlayerColor(playerid,Cor_Crip);
SendClientMessage(playerid,Cor_Crip,"Agora vocк й lider da Crips");
}
if(Lider[playerid] ==4 )
{
SetPlayerSkin(playerid, 286);
if(level == 4) { Jogador[para1][pSkin] = 286; }
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid, 1528.9036,-1676.8831,5.8906);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid,23,999);
SetPlayerColor(playerid,Cor_FBI);
SendClientMessage(playerid,Cor_FBI,"Agora vocк й lider do F.B.I");
}
Lider[para1] = level;
Membro[para1] = level;
Cargo[para1] = 6;
return 1;
}
}
}
}