15.02.2012, 21:16
Minha org sons of anarchy nгo esґta convidando.. depois que tentei arrumar :/ antes convidava o serve caнa.
PHP код:
//----------------------------------[INVITE]------------------------------------------------
if(strcmp(cmd, "/convidar", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Uso correto: /convidar [ id ].");
return 1;
}
new para1;
new ftext[150];
para1 = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
if (PlayerInfo[playerid][pLider] >= 1 || PlayerInfo[playerid][pMembro] >= 1 && PlayerInfo[playerid][pCargo] == 444 || PlayerInfo[playerid][pMembro] >= 1 && PlayerInfo[playerid][pCargo] == 555)
{
if(IsPlayerConnected(para1))
{
if(PlayerInfo[para1][pLevel] < 2) { SendClientMessage(playerid, COLOR_GREY, "So pode convidar quem й nivel 2 ou acima de 2!!!"); return 1;
}
if(para1 != INVALID_PLAYER_ID)
{
if (PlayerInfo[para1][pMembro] == 0 && PlayerInfo[para1][pLider] == 0)
{
new orgl;
if(PlayerInfo[playerid][pMembro] >= 1)
{
orgl = PlayerInfo[playerid][pMembro];
}
if(PlayerInfo[playerid][pLider] >= 1)
{
orgl = PlayerInfo[playerid][pLider];
}
if(InfoorgGeral(para1, orgl)) { } else { SendClientMessage(playerid,azulagua,"A org estб cheia libere uma vaga (/limparVaga)."); return 1;}
if(orgl == 1) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "Policia Militar"; ChosenSkin[para1] = 192;}
else if(orgl == 2) {PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "ROTA"; ChosenSkin[para1] = 172; SetPlayerSkin(para1, 172);}
else if(orgl == 3) {PlayerInfo[para1][pTeam] = 3; gTeam[para1] = 3; ftext = "Exйrcito"; ChosenSkin[para1] = 191; SetPlayerSkin(para1, 191);}
else if(orgl == 4) { PlayerInfo[para1][pTeam] = 1; gTeam[para1] = 1; ftext = "Mйdicos"; ChosenSkin[para1] = 274; SetPlayerSkin(para1, 274);}
else if(orgl == 5) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "Varrios Los Aztecas"; ChosenSkin[para1] = 115; SetPlayerSkin(para1, 115);}
else if(orgl == 6) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "FARC"; ChosenSkin[para1] = 222; SetPlayerSkin(para1, 222);}
else if(orgl == 7) { PlayerInfo[para1][pTeam] = 7; gTeam[para1] = 7; ftext = "Prefeitura"; ChosenSkin[para1] = 163; SetPlayerSkin(para1, 163);}
else if(orgl == 8) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Nos Hitmans"; ChosenSkin[para1] = 261; SetPlayerSkin(para1, 261); }
else if(orgl == 9) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Reporteres"; ChosenSkin[para1] = 227; SetPlayerSkin(para1, 227);}
else if(orgl == 10) {PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Taxistas"; ChosenSkin[para1] = 255; SetPlayerSkin(para1, 255);}
else if(orgl == 11) {PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Detran"; ChosenSkin[para1] = 59; SetPlayerSkin(para1, 59);}
else if(orgl == 15) {PlayerInfo[para1][pTeam] = 15; gTeam[para1] = 12; ftext = "Groove Street"; ChosenSkin[para1] = 105; SetPlayerSkin(para1, 105);}
else if(orgl == 16) {PlayerInfo[para1][pTeam] = 16; gTeam[para1] = 12; ftext = "Guerrilheiros Israelitas"; ChosenSkin[para1] = 272; SetPlayerSkin(para1, 272); }
else if(orgl == 17) {PlayerInfo[para1][pTeam] = 17; gTeam[para1] = 2; ftext = "Policia Federal"; ChosenSkin[para1] = 285; SetPlayerSkin(para1, 285);}
else if(orgl == 18) {PlayerInfo[para1][pTeam] = 18; gTeam[para1] = 12; ftext = "Front Yard Ballas"; ChosenSkin[para1] = 103; SetPlayerSkin(para1, 103);}
else if(orgl == 19) {PlayerInfo[para1][pTeam] = 19; gTeam[para1] = 12; ftext = "Los Santos Vagos"; ChosenSkin[para1] = 109; SetPlayerSkin(para1, 109);}
else if(orgl == 20) { PlayerInfo[para1][pTeam] = 20; gTeam[para1] = 20; ftext = "Mafia Yakuza"; ChosenSkin[para1] = 111; SetPlayerSkin(para1, 111);}
else if(orgl == 20) { PlayerInfo[para1][pTeam] = 21; gTeam[para1] = 20; ftext = "Son of Anarchy"; ChosenSkin[para1] = 21; SetPlayerSkin(para1, 21);}
else if(orgl == 22) { PlayerInfo[para1][pTeam] = 22; gTeam[para1] = 22; ftext = "Mбfia Cosa Nostra"; ChosenSkin[para1] = 120; SetPlayerSkin(para1, 120);}
else if(orgl == 23) {PlayerInfo[para1][pTeam] = 23; gTeam[para1] = 23; ftext = "Comando Vermelho"; ChosenSkin[para1] = 19; SetPlayerSkin(para1, 19);}
else if(orgl == 24) {PlayerInfo[para1][pTeam] = 24; gTeam[para1] = 24; ftext = "PCC"; ChosenSkin[para1] = 28; SetPlayerSkin(para1, 241);}
else if(orgl == 26){ PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "CORE"; ChosenSkin[para1] = 285;}
else { return 1; }
SetPlayerToTeamColor(playerid);
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[para1][pMembro] = orgl;
PlayerInfo[para1][pCargo] = 1;
printf("ADMIN CMD: %s convidou %s para entrar %s.", sendername, giveplayer, ftext);
format(string, sizeof(string), "Voce foi convidado para a %s, pelo Lнder %s.", ftext, sendername);
SendClientMessage(para1, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "Voce convidou %s para a %s.", giveplayer,ftext);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
SetPlayerInterior(para1,0);
PlayerInfo[playerid][pCarLic] = 1;
PlayerInfo[playerid][pFlyLic] = 1;
PlayerInfo[playerid][pBoatLic] = 1;
PlayerInfo[playerid][pFishLic] = 1;
PlayerInfo[playerid][pGunLic] = 1;
new rand = random(sizeof(gInviteSpawns));
SetPlayerPos(para1, gInviteSpawns[rand][0], gInviteSpawns[rand][1], gInviteSpawns[rand][2]); // Warp the player
SetPlayerFacingAngle(para1, gInviteSpawns[rand][3]);
SetPlayerCameraPos(para1,gInviteSpawns[rand][0] + 3, gInviteSpawns[rand][1], gInviteSpawns[rand][2]);
SetPlayerCameraLookAt(para1,gInviteSpawns[rand][0], gInviteSpawns[rand][1], gInviteSpawns[rand][2]);
TogglePlayerControllable(para1, 0);
SelectChar[para1] = 255;
SelectCharID[para1] = PlayerInfo[para1][pMembro];
SelectCharPlace[para1] = 1;
PlayerInfo[para1][pModel] = ChosenSkin[para1];
PlayerInfo[para1][pChar] = ChosenSkin[para1];
format(string,sizeof(string),"%s para ter mais opзхes de skins clique em prуximo.\nCaso jб tenha escolhido a skin clique em Confirma.",pNome(para1));
ShowPlayerDialog(para1,717,DIALOG_STYLE_MSGBOX,"Selecionando skin para a org que foi convidado.",string,"Proximo","Confirma");
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Este jogador jб faz parte de uma organizaзгo.");
return 1;
}
}
}//not connected
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Voce nao esta autorizado para usar este cmd ( Apenas Lideres )!");
}
}
return 1;
}