[AJUDA]/convidar -
KrOnOs_SiizE - 15.05.2012
Bom estou adicionando para sub-lider poder convidar tentei muitas formas, mas sem sucesso se auguem poder ajudar
pawn Код:
if(strcmp(cmd, "/convidar", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (gPlayerLogged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GRAD1, " Vocк precisa logar para usar este comando, use /logar [senha]!");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /convidar [playerid/Parte do Nome]");
return 1;
}
new para1;
new ftext[20];
new org;
para1 = ReturnUser(tmp);
if(PlayerInfo[para1][pMember] != 0 || PlayerInfo[para1][pLeader] != 0)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Desculpe-me mais este player jб participa de uma oganizaзгo.");
return 1;
}
if(PuxarOrganizacao(playerid) >= 1)
{
if(IsPlayerConnected(para1))
{
if(PlayerInfo[para1][pLevel] < 2)
{
SendClientMessage(playerid, COLOR_GREY, "Sу pode convidar quem й level 2 ou acima de 2!!"); return 1;
}
if(PlayerInfo[playerid][pRank] == 6 || PlayerInfo[playerid][pRank] == 444 || PlayerInfo[playerid][pRank] == 555)
{
if(para1 != INVALID_PLAYER_ID)
{
if (PlayerInfo[para1][pMember] == 0)
{
org = PuxarOrganizacao(playerid);
if(ConviteInfoOrg(pNome(para1), org, 1)) { } else { SendClientMessage(playerid, COLOR_LIGHTBLUE, "Sua organizaзгo estб cheia limpe uma vaga!"); return 1;}
if(PlayerInfo[playerid][pLeader] == 1) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "Policia Militar"; ChosenSkin[para1] = 280; SetPlayerSkin(para1, 280);}
else if(PlayerInfo[playerid][pLeader] == 2) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "ROTAM"; ChosenSkin[para1] = 286; SetPlayerSkin(para1, 286);}
else if(PlayerInfo[playerid][pLeader] == 3) { PlayerInfo[para1][pTeam] = 3; gTeam[para1] = 3; ftext = "Exercito"; ChosenSkin[para1] = 287; SetPlayerSkin(para1, 287);}
else if(PlayerInfo[playerid][pLeader] == 4) { PlayerInfo[para1][pTeam] = 1; gTeam[para1] = 1; ftext = "Medicos"; ChosenSkin[para1] = 70; SetPlayerSkin(para1, 70);}
else if(PlayerInfo[playerid][pLeader] == 5) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "GI"; ChosenSkin[para1] = 113; SetPlayerSkin(para1, 113);}
else if(PlayerInfo[playerid][pLeader] == 6) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "Asfarc"; ChosenSkin[para1] = 123; SetPlayerSkin(para1, 123);}
else if(PlayerInfo[playerid][pLeader] == 7) { PlayerInfo[para1][pTeam] = 7; gTeam[para1] = 7; ftext = "Prefeitura"; ChosenSkin[para1] = 163; SetPlayerSkin(para1, 163);}
else if(PlayerInfo[playerid][pLeader] == 8) { PlayerInfo[para1][pTeam] = 10; gTeam[para1] = 10; ftext = "Assasinos"; ChosenSkin[para1] = 127; SetPlayerSkin(para1, 127);}
else if(PlayerInfo[playerid][pLeader] == 9) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Reporteres"; ChosenSkin[para1] = 148; SetPlayerSkin(para1, 148);}
else if(PlayerInfo[playerid][pLeader] == 10) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Taxistas"; ChosenSkin[para1] = 255; SetPlayerSkin(para1, 255);}
else if(PlayerInfo[playerid][pLeader] == 11) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Instrutores"; ChosenSkin[para1] = 59; SetPlayerSkin(para1, 59);}
else if(PlayerInfo[playerid][pLeader] == 12) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Groove"; ChosenSkin[para1] = 270; SetPlayerSkin(para1, 270);}
else if(PlayerInfo[playerid][pLeader] == 13) { PlayerInfo[para1][pTeam] = 13; gTeam[para1] = 13; ftext = "Ballas"; ChosenSkin[para1] = 104; SetPlayerSkin(para1, 104);}
else if(PlayerInfo[playerid][pLeader] == 14) { PlayerInfo[para1][pTeam] = 14; gTeam[para1] = 14; ftext = "Vagos"; ChosenSkin[para1] = 110; SetPlayerSkin(para1, 110);}
else if(PlayerInfo[playerid][pLeader] == 15) { PlayerInfo[para1][pTeam] = 15; gTeam[para1] = 15; ftext = "Aztecas"; ChosenSkin[para1] = 115; SetPlayerSkin(para1, 115);}
else if(PlayerInfo[playerid][pLeader] == 16) { PlayerInfo[para1][pTeam] = 16; gTeam[para1] = 2; ftext = "Policia Rodoviaria"; ChosenSkin[para1] = 186; SetPlayerSkin(para1, 186);}
else if(PlayerInfo[playerid][pLeader] == 17) { PlayerInfo[para1][pTeam] = 17; gTeam[para1] = 17; ftext = "Comando Vermelho"; ChosenSkin[para1] = 170; SetPlayerSkin(para1, 170);}
else if(PlayerInfo[playerid][pLeader] == 18) { PlayerInfo[para1][pTeam] = 18; gTeam[para1] = 18; ftext = "PCC"; ChosenSkin[para1] = 47; SetPlayerSkin(para1, 47);}
else if(PlayerInfo[playerid][pLeader] == 19) { PlayerInfo[para1][pTeam] = 19; gTeam[para1] = 19; ftext = "Mafia Russa"; ChosenSkin[para1] = 144; SetPlayerSkin(para1, 144);}
else if(PlayerInfo[playerid][pLeader] == 20) { PlayerInfo[para1][pTeam] = 20; gTeam[para1] = 20; ftext = "Mafia Italiana"; ChosenSkin[para1] = 57; SetPlayerSkin(para1, 57);}
else if(PlayerInfo[playerid][pLeader] == 21) { PlayerInfo[para1][pTeam] = 21; gTeam[para1] = 2; ftext = "Policia Federal"; ChosenSkin[para1] = 288; SetPlayerSkin(para1, 288);}
else { return 1; }
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[para1][pMember] = PlayerInfo[playerid][pLeader];
PlayerInfo[para1][pRank] = 1;
printf("* Server: %s tem convidado o %s para entra na(o) %s.", sendername, giveplayer, ftext);
format(string, sizeof(string), " Vocк entrou para %s, vocк foi convidado pelo lider %s", ftext, sendername);
SendClientMessage(para1, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), " Vocк convidou %s para entrar para %s.", giveplayer,ftext);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
SetPlayerInterior(para1,0);
PlayerInfo[playerid][pCarLic] = 1;
PlayerInfo[playerid][pMotoLic] = 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][pMember];
SelectCharPlace[para1] = 1;
PlayerInfo[para1][pModel] = ChosenSkin[para1];
PlayerInfo[para1][pChar] = ChosenSkin[para1];
ShowPlayerDialog(para1, 41, DIALOG_STYLE_MSGBOX, "Convite:", "{ADFF2F}Vocк foi convidado para participar de uma organizaзгo\n{9ACD32}Escolha {FF0000}Prуximo {9ACD32}para trocar a skin que deseja\n{FF0000}Pronto {9ACD32}Para escolhe-la a skin desejada.", "Pronto", "Prуximo");
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Esse jogador й procurado/ Й de uma organizaзгo diferente/ ou membro de uma familia.");
return 1;
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, "Vocк nгo tem cargo o suficiente para poder convidar!");
return 1;
}
}//not connected
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Vocк nгo estб autorizado para usar este comando( Somente Lideres/Sub-Lideres )!");
}
}
return 1;
}
Re: [AJUDA]/convidar -
Matheus_Ecko - 15.05.2012
pawn Код:
if(strcmp(cmd, "/convidar", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (gPlayerLogged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GRAD1, " Vocк precisa logar para usar este comando, use /logar [senha]!");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /convidar [playerid/Parte do Nome]");
return 1;
}
new para1;
new ftext[20];
new org;
para1 = ReturnUser(tmp);
if(PlayerInfo[para1][pMember] != 0 || PlayerInfo[para1][pLeader] != 0)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Desculpe-me mais este player jб participa de uma oganizaзгo.");
return 1;
}
if(PuxarOrganizacao(playerid) >= 1)
{
if(IsPlayerConnected(para1))
{
if(PlayerInfo[para1][pLevel] < 2)
{
SendClientMessage(playerid, COLOR_GREY, "Sу pode convidar quem й level 2 ou acima de 2!!"); return 1;
}
if (PlayerInfo[playerid][pLeader] >= 1 || PlayerInfo[playerid][pRank] == 555 || PlayerInfo[playerid][pRank] == 444)
{
if(para1 != INVALID_PLAYER_ID)
{
if (PlayerInfo[para1][pMember] == 0)
{
org = PuxarOrganizacao(playerid);
if(ConviteInfoOrg(pNome(para1), org, 1)) { } else { SendClientMessage(playerid, COLOR_LIGHTBLUE, "Sua organizaзгo estб cheia limpe uma vaga!"); return 1;}
if(PlayerInfo[playerid][pLeader] == 1) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "Policia Militar"; ChosenSkin[para1] = 280; SetPlayerSkin(para1, 280);}
else if(PlayerInfo[playerid][pLeader] == 2) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "ROTAM"; ChosenSkin[para1] = 286; SetPlayerSkin(para1, 286);}
else if(PlayerInfo[playerid][pLeader] == 3) { PlayerInfo[para1][pTeam] = 3; gTeam[para1] = 3; ftext = "Exercito"; ChosenSkin[para1] = 287; SetPlayerSkin(para1, 287);}
else if(PlayerInfo[playerid][pLeader] == 4) { PlayerInfo[para1][pTeam] = 1; gTeam[para1] = 1; ftext = "Medicos"; ChosenSkin[para1] = 70; SetPlayerSkin(para1, 70);}
else if(PlayerInfo[playerid][pLeader] == 5) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "GI"; ChosenSkin[para1] = 113; SetPlayerSkin(para1, 113);}
else if(PlayerInfo[playerid][pLeader] == 6) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "Asfarc"; ChosenSkin[para1] = 123; SetPlayerSkin(para1, 123);}
else if(PlayerInfo[playerid][pLeader] == 7) { PlayerInfo[para1][pTeam] = 7; gTeam[para1] = 7; ftext = "Prefeitura"; ChosenSkin[para1] = 163; SetPlayerSkin(para1, 163);}
else if(PlayerInfo[playerid][pLeader] == 8) { PlayerInfo[para1][pTeam] = 10; gTeam[para1] = 10; ftext = "Assasinos"; ChosenSkin[para1] = 127; SetPlayerSkin(para1, 127);}
else if(PlayerInfo[playerid][pLeader] == 9) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Reporteres"; ChosenSkin[para1] = 148; SetPlayerSkin(para1, 148);}
else if(PlayerInfo[playerid][pLeader] == 10) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Taxistas"; ChosenSkin[para1] = 255; SetPlayerSkin(para1, 255);}
else if(PlayerInfo[playerid][pLeader] == 11) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Instrutores"; ChosenSkin[para1] = 59; SetPlayerSkin(para1, 59);}
else if(PlayerInfo[playerid][pLeader] == 12) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Groove"; ChosenSkin[para1] = 270; SetPlayerSkin(para1, 270);}
else if(PlayerInfo[playerid][pLeader] == 13) { PlayerInfo[para1][pTeam] = 13; gTeam[para1] = 13; ftext = "Ballas"; ChosenSkin[para1] = 104; SetPlayerSkin(para1, 104);}
else if(PlayerInfo[playerid][pLeader] == 14) { PlayerInfo[para1][pTeam] = 14; gTeam[para1] = 14; ftext = "Vagos"; ChosenSkin[para1] = 110; SetPlayerSkin(para1, 110);}
else if(PlayerInfo[playerid][pLeader] == 15) { PlayerInfo[para1][pTeam] = 15; gTeam[para1] = 15; ftext = "Aztecas"; ChosenSkin[para1] = 115; SetPlayerSkin(para1, 115);}
else if(PlayerInfo[playerid][pLeader] == 16) { PlayerInfo[para1][pTeam] = 16; gTeam[para1] = 2; ftext = "Policia Rodoviaria"; ChosenSkin[para1] = 186; SetPlayerSkin(para1, 186);}
else if(PlayerInfo[playerid][pLeader] == 17) { PlayerInfo[para1][pTeam] = 17; gTeam[para1] = 17; ftext = "Comando Vermelho"; ChosenSkin[para1] = 170; SetPlayerSkin(para1, 170);}
else if(PlayerInfo[playerid][pLeader] == 18) { PlayerInfo[para1][pTeam] = 18; gTeam[para1] = 18; ftext = "PCC"; ChosenSkin[para1] = 47; SetPlayerSkin(para1, 47);}
else if(PlayerInfo[playerid][pLeader] == 19) { PlayerInfo[para1][pTeam] = 19; gTeam[para1] = 19; ftext = "Mafia Russa"; ChosenSkin[para1] = 144; SetPlayerSkin(para1, 144);}
else if(PlayerInfo[playerid][pLeader] == 20) { PlayerInfo[para1][pTeam] = 20; gTeam[para1] = 20; ftext = "Mafia Italiana"; ChosenSkin[para1] = 57; SetPlayerSkin(para1, 57);}
else if(PlayerInfo[playerid][pLeader] == 21) { PlayerInfo[para1][pTeam] = 21; gTeam[para1] = 2; ftext = "Policia Federal"; ChosenSkin[para1] = 288; SetPlayerSkin(para1, 288);}
else { return 1; }
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[para1][pMember] = PlayerInfo[playerid][pLeader];
PlayerInfo[para1][pRank] = 1;
printf("* Server: %s tem convidado o %s para entra na(o) %s.", sendername, giveplayer, ftext);
format(string, sizeof(string), " Vocк entrou para %s, vocк foi convidado pelo lider %s", ftext, sendername);
SendClientMessage(para1, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), " Vocк convidou %s para entrar para %s.", giveplayer,ftext);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
SetPlayerInterior(para1,0);
PlayerInfo[playerid][pCarLic] = 1;
PlayerInfo[playerid][pMotoLic] = 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][pMember];
SelectCharPlace[para1] = 1;
PlayerInfo[para1][pModel] = ChosenSkin[para1];
PlayerInfo[para1][pChar] = ChosenSkin[para1];
ShowPlayerDialog(para1, 41, DIALOG_STYLE_MSGBOX, "Convite:", "{ADFF2F}Vocк foi convidado para participar de uma organizaзгo\n{9ACD32}Escolha {FF0000}Prуximo {9ACD32}para trocar a skin que deseja\n{FF0000}Pronto {9ACD32}Para escolhe-la a skin desejada.", "Pronto", "Prуximo");
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Esse jogador й procurado/ Й de uma organizaзгo diferente/ ou membro de uma familia.");
return 1;
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, "Vocк nгo tem cargo o suficiente para poder convidar!");
return 1;
}
}//not connected
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Vocк nгo estб autorizado para usar este comando( Somente Lideres/Sub-Lideres )!");
}
}
return 1;
}
Re: [AJUDA]/convidar -
Don_Speed - 15.05.2012
pawn Код:
if(strcmp(cmd, "/convidar", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (gPlayerLogged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GRAD1, " Vocк precisa logar para usar este comando, use /logar [senha]!");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /convidar [playerid/Parte do Nome]");
return 1;
}
new para1;
new ftext[20];
new org;
para1 = ReturnUser(tmp);
if(PlayerInfo[para1][pMember] != 0 || PlayerInfo[para1][pLeader] != 0)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Desculpe-me mais este player jб participa de uma oganizaзгo.");
return 1;
}
if(PuxarOrganizacao(playerid) >= 1)
{
if(IsPlayerConnected(para1))
{
if(PlayerInfo[para1][pLevel] < 2)
{
SendClientMessage(playerid, COLOR_GREY, "Sу pode convidar quem й level 2 ou acima de 2!!"); return 1;
}
if(PlayerInfo[playerid][pRank] == 444 || PlayerInfo[playerid][pRank] == 555)
{
if(para1 != INVALID_PLAYER_ID)
{
if (PlayerInfo[para1][pMember] == 0)
{
org = PuxarOrganizacao(playerid);
if(ConviteInfoOrg(pNome(para1), org, 1)) { } else { SendClientMessage(playerid, COLOR_LIGHTBLUE, "Sua organizaзгo estб cheia limpe uma vaga!"); return 1;}
if(PlayerInfo[playerid][pLeader] == 1) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "Policia Militar"; ChosenSkin[para1] = 280; SetPlayerSkin(para1, 280);}
else if(PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pRank] == 444 || PlayerInfo[playerid][pRank] == 555) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "ROTAM"; ChosenSkin[para1] = 286; SetPlayerSkin(para1, 286);}
else if(PlayerInfo[playerid][pLeader] == 3 || PlayerInfo[playerid][pRank] == 444 || PlayerInfo[playerid][pRank] == 555) { PlayerInfo[para1][pTeam] = 3; gTeam[para1] = 3; ftext = "Exercito"; ChosenSkin[para1] = 287; SetPlayerSkin(para1, 287);}
else if(PlayerInfo[playerid][pLeader] == 4 || PlayerInfo[playerid][pRank] == 444 || PlayerInfo[playerid][pRank] == 555) { PlayerInfo[para1][pTeam] = 1; gTeam[para1] = 1; ftext = "Medicos"; ChosenSkin[para1] = 70; SetPlayerSkin(para1, 70);}
else if(PlayerInfo[playerid][pLeader] == 5 || PlayerInfo[playerid][pRank] == 444 || PlayerInfo[playerid][pRank] == 555) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "GI"; ChosenSkin[para1] = 113; SetPlayerSkin(para1, 113);}
else if(PlayerInfo[playerid][pLeader] == 6 || PlayerInfo[playerid][pRank] == 444 || PlayerInfo[playerid][pRank] == 555) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "Asfarc"; ChosenSkin[para1] = 123; SetPlayerSkin(para1, 123);}
else if(PlayerInfo[playerid][pLeader] == 7 || PlayerInfo[playerid][pRank] == 444 || PlayerInfo[playerid][pRank] == 555) { PlayerInfo[para1][pTeam] = 7; gTeam[para1] = 7; ftext = "Prefeitura"; ChosenSkin[para1] = 163; SetPlayerSkin(para1, 163);}
else if(PlayerInfo[playerid][pLeader] == 8 || PlayerInfo[playerid][pRank] == 444 || PlayerInfo[playerid][pRank] == 555) { PlayerInfo[para1][pTeam] = 10; gTeam[para1] = 10; ftext = "Assasinos"; ChosenSkin[para1] = 127; SetPlayerSkin(para1, 127);}
else if(PlayerInfo[playerid][pLeader] == 9 || PlayerInfo[playerid][pRank] == 444 || PlayerInfo[playerid][pRank] == 555) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Reporteres"; ChosenSkin[para1] = 148; SetPlayerSkin(para1, 148);}
else if(PlayerInfo[playerid][pLeader] == 10 || PlayerInfo[playerid][pRank] == 444 || PlayerInfo[playerid][pRank] == 555) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Taxistas"; ChosenSkin[para1] = 255; SetPlayerSkin(para1, 255);}
else if(PlayerInfo[playerid][pLeader] == 11 || PlayerInfo[playerid][pRank] == 444 || PlayerInfo[playerid][pRank] == 555) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Instrutores"; ChosenSkin[para1] = 59; SetPlayerSkin(para1, 59);}
else if(PlayerInfo[playerid][pLeader] == 12 || PlayerInfo[playerid][pRank] == 444 || PlayerInfo[playerid][pRank] == 555) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Groove"; ChosenSkin[para1] = 270; SetPlayerSkin(para1, 270);}
else if(PlayerInfo[playerid][pLeader] == 13 || PlayerInfo[playerid][pRank] == 444 || PlayerInfo[playerid][pRank] == 555) { PlayerInfo[para1][pTeam] = 13; gTeam[para1] = 13; ftext = "Ballas"; ChosenSkin[para1] = 104; SetPlayerSkin(para1, 104);}
else if(PlayerInfo[playerid][pLeader] == 14 || PlayerInfo[playerid][pRank] == 444 || PlayerInfo[playerid][pRank] == 555) { PlayerInfo[para1][pTeam] = 14; gTeam[para1] = 14; ftext = "Vagos"; ChosenSkin[para1] = 110; SetPlayerSkin(para1, 110);}
else if(PlayerInfo[playerid][pLeader] == 15 || PlayerInfo[playerid][pRank] == 444 || PlayerInfo[playerid][pRank] == 555) { PlayerInfo[para1][pTeam] = 15; gTeam[para1] = 15; ftext = "Aztecas"; ChosenSkin[para1] = 115; SetPlayerSkin(para1, 115);}
else if(PlayerInfo[playerid][pLeader] == 16 || PlayerInfo[playerid][pRank] == 444 || PlayerInfo[playerid][pRank] == 555) { PlayerInfo[para1][pTeam] = 16; gTeam[para1] = 2; ftext = "Policia Rodoviaria"; ChosenSkin[para1] = 186; SetPlayerSkin(para1, 186);}
else if(PlayerInfo[playerid][pLeader] == 17 || PlayerInfo[playerid][pRank] == 444 || PlayerInfo[playerid][pRank] == 555) { PlayerInfo[para1][pTeam] = 17; gTeam[para1] = 17; ftext = "Comando Vermelho"; ChosenSkin[para1] = 170; SetPlayerSkin(para1, 170);}
else if(PlayerInfo[playerid][pLeader] == 18 || PlayerInfo[playerid][pRank] == 444 || PlayerInfo[playerid][pRank] == 555) { PlayerInfo[para1][pTeam] = 18; gTeam[para1] = 18; ftext = "PCC"; ChosenSkin[para1] = 47; SetPlayerSkin(para1, 47);}
else if(PlayerInfo[playerid][pLeader] == 19 || PlayerInfo[playerid][pRank] == 444 || PlayerInfo[playerid][pRank] == 555) { PlayerInfo[para1][pTeam] = 19; gTeam[para1] = 19; ftext = "Mafia Russa"; ChosenSkin[para1] = 144; SetPlayerSkin(para1, 144);}
else if(PlayerInfo[playerid][pLeader] == 20 || PlayerInfo[playerid][pRank] == 444 || PlayerInfo[playerid][pRank] == 555) { PlayerInfo[para1][pTeam] = 20; gTeam[para1] = 20; ftext = "Mafia Italiana"; ChosenSkin[para1] = 57; SetPlayerSkin(para1, 57);}
else if(PlayerInfo[playerid][pLeader] == 21 || PlayerInfo[playerid][pRank] == 444 || PlayerInfo[playerid][pRank] == 555) { PlayerInfo[para1][pTeam] = 21; gTeam[para1] = 2; ftext = "Policia Federal"; ChosenSkin[para1] = 288; SetPlayerSkin(para1, 288);}
else { return 1; }
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[para1][pMember] = PlayerInfo[playerid][pLeader];
PlayerInfo[para1][pRank] = 1;
printf("* Server: %s tem convidado o %s para entra na(o) %s.", sendername, giveplayer, ftext);
format(string, sizeof(string), " Vocк entrou para %s, vocк foi convidado pelo lider %s", ftext, sendername);
SendClientMessage(para1, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), " Vocк convidou %s para entrar para %s.", giveplayer,ftext);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
SetPlayerInterior(para1,0);
PlayerInfo[playerid][pCarLic] = 1;
PlayerInfo[playerid][pMotoLic] = 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][pMember];
SelectCharPlace[para1] = 1;
PlayerInfo[para1][pModel] = ChosenSkin[para1];
PlayerInfo[para1][pChar] = ChosenSkin[para1];
ShowPlayerDialog(para1, 41, DIALOG_STYLE_MSGBOX, "Convite:", "{ADFF2F}Vocк foi convidado para participar de uma organizaзгo\n{9ACD32}Escolha {FF0000}Prуximo {9ACD32}para trocar a skin que deseja\n{FF0000}Pronto {9ACD32}Para escolhe-la a skin desejada.", "Pronto", "Prуximo");
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Esse jogador й procurado/ Й de uma organizaзгo diferente/ ou membro de uma familia.");
return 1;
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, "Vocк nгo tem cargo o suficiente para poder convidar!");
return 1;
}
}//not connected
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Vocк nгo estб autorizado para usar este comando( Somente Lideres/Sub-Lideres )!");
}
}
return 1;
}
Re: [AJUDA]/convidar -
KrOnOs_SiizE - 15.05.2012
nгo funcionou nem uma das formas
Re: [AJUDA]/convidar -
CidadeNovaRP - 15.05.2012
Tenta:
pawn Код:
if(strcmp(cmd, "/convidar", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (gPlayerLogged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GRAD1, " Vocк precisa logar para usar este comando, use /logar [senha]!");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /convidar [playerid/Parte do Nome]");
return 1;
}
new para1;
new ftext[20];
new org;
para1 = ReturnUser(tmp);
if(PlayerInfo[para1][pMember] != 0 || PlayerInfo[para1][pLeader] != 0)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Desculpe-me mais este player jб participa de uma oganizaзгo.");
return 1;
}
if(PuxarOrganizacao(playerid) >= 1)
{
if(IsPlayerConnected(para1))
{
if(PlayerInfo[para1][pLevel] < 2)
{
SendClientMessage(playerid, COLOR_GREY, "Sу pode convidar quem й level 2 ou acima de 2!!"); return 1;
}
if(PlayerInfo[playerid][pRank] == 6 || PlayerInfo[playerid][pRank] == 5 || PlayerInfo[playerid][pRank] == 444 || PlayerInfo[playerid][pRank] == 555)
{
if(para1 != INVALID_PLAYER_ID)
{
if (PlayerInfo[para1][pMember] == 0)
{
org = PuxarOrganizacao(playerid);
if(ConviteInfoOrg(pNome(para1), org, 1)) { } else { SendClientMessage(playerid, COLOR_LIGHTBLUE, "Sua organizaзгo estб cheia limpe uma vaga!"); return 1;}
if(PlayerInfo[playerid][pLeader] == 1) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "Policia Militar"; ChosenSkin[para1] = 280; SetPlayerSkin(para1, 280);}
else if(PlayerInfo[playerid][pLeader] == 2) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "ROTAM"; ChosenSkin[para1] = 286; SetPlayerSkin(para1, 286);}
else if(PlayerInfo[playerid][pLeader] == 3) { PlayerInfo[para1][pTeam] = 3; gTeam[para1] = 3; ftext = "Exercito"; ChosenSkin[para1] = 287; SetPlayerSkin(para1, 287);}
else if(PlayerInfo[playerid][pLeader] == 4) { PlayerInfo[para1][pTeam] = 1; gTeam[para1] = 1; ftext = "Medicos"; ChosenSkin[para1] = 70; SetPlayerSkin(para1, 70);}
else if(PlayerInfo[playerid][pLeader] == 5) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "GI"; ChosenSkin[para1] = 113; SetPlayerSkin(para1, 113);}
else if(PlayerInfo[playerid][pLeader] == 6) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "Asfarc"; ChosenSkin[para1] = 123; SetPlayerSkin(para1, 123);}
else if(PlayerInfo[playerid][pLeader] == 7) { PlayerInfo[para1][pTeam] = 7; gTeam[para1] = 7; ftext = "Prefeitura"; ChosenSkin[para1] = 163; SetPlayerSkin(para1, 163);}
else if(PlayerInfo[playerid][pLeader] == 8) { PlayerInfo[para1][pTeam] = 10; gTeam[para1] = 10; ftext = "Assasinos"; ChosenSkin[para1] = 127; SetPlayerSkin(para1, 127);}
else if(PlayerInfo[playerid][pLeader] == 9) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Reporteres"; ChosenSkin[para1] = 148; SetPlayerSkin(para1, 148);}
else if(PlayerInfo[playerid][pLeader] == 10) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Taxistas"; ChosenSkin[para1] = 255; SetPlayerSkin(para1, 255);}
else if(PlayerInfo[playerid][pLeader] == 11) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Instrutores"; ChosenSkin[para1] = 59; SetPlayerSkin(para1, 59);}
else if(PlayerInfo[playerid][pLeader] == 12) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Groove"; ChosenSkin[para1] = 270; SetPlayerSkin(para1, 270);}
else if(PlayerInfo[playerid][pLeader] == 13) { PlayerInfo[para1][pTeam] = 13; gTeam[para1] = 13; ftext = "Ballas"; ChosenSkin[para1] = 104; SetPlayerSkin(para1, 104);}
else if(PlayerInfo[playerid][pLeader] == 14) { PlayerInfo[para1][pTeam] = 14; gTeam[para1] = 14; ftext = "Vagos"; ChosenSkin[para1] = 110; SetPlayerSkin(para1, 110);}
else if(PlayerInfo[playerid][pLeader] == 15) { PlayerInfo[para1][pTeam] = 15; gTeam[para1] = 15; ftext = "Aztecas"; ChosenSkin[para1] = 115; SetPlayerSkin(para1, 115);}
else if(PlayerInfo[playerid][pLeader] == 16) { PlayerInfo[para1][pTeam] = 16; gTeam[para1] = 2; ftext = "Policia Rodoviaria"; ChosenSkin[para1] = 186; SetPlayerSkin(para1, 186);}
else if(PlayerInfo[playerid][pLeader] == 17) { PlayerInfo[para1][pTeam] = 17; gTeam[para1] = 17; ftext = "Comando Vermelho"; ChosenSkin[para1] = 170; SetPlayerSkin(para1, 170);}
else if(PlayerInfo[playerid][pLeader] == 18) { PlayerInfo[para1][pTeam] = 18; gTeam[para1] = 18; ftext = "PCC"; ChosenSkin[para1] = 47; SetPlayerSkin(para1, 47);}
else if(PlayerInfo[playerid][pLeader] == 19) { PlayerInfo[para1][pTeam] = 19; gTeam[para1] = 19; ftext = "Mafia Russa"; ChosenSkin[para1] = 144; SetPlayerSkin(para1, 144);}
else if(PlayerInfo[playerid][pLeader] == 20) { PlayerInfo[para1][pTeam] = 20; gTeam[para1] = 20; ftext = "Mafia Italiana"; ChosenSkin[para1] = 57; SetPlayerSkin(para1, 57);}
else if(PlayerInfo[playerid][pLeader] == 21) { PlayerInfo[para1][pTeam] = 21; gTeam[para1] = 2; ftext = "Policia Federal"; ChosenSkin[para1] = 288; SetPlayerSkin(para1, 288);}
else { return 1; }
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[para1][pMember] = PlayerInfo[playerid][pLeader];
PlayerInfo[para1][pRank] = 1;
printf("* Server: %s tem convidado o %s para entra na(o) %s.", sendername, giveplayer, ftext);
format(string, sizeof(string), " Vocк entrou para %s, vocк foi convidado pelo lider %s", ftext, sendername);
SendClientMessage(para1, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), " Vocк convidou %s para entrar para %s.", giveplayer,ftext);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
SetPlayerInterior(para1,0);
PlayerInfo[playerid][pCarLic] = 1;
PlayerInfo[playerid][pMotoLic] = 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][pMember];
SelectCharPlace[para1] = 1;
PlayerInfo[para1][pModel] = ChosenSkin[para1];
PlayerInfo[para1][pChar] = ChosenSkin[para1];
ShowPlayerDialog(para1, 41, DIALOG_STYLE_MSGBOX, "Convite:", "{ADFF2F}Vocк foi convidado para participar de uma organizaзгo\n{9ACD32}Escolha {FF0000}Prуximo {9ACD32}para trocar a skin que deseja\n{FF0000}Pronto {9ACD32}Para escolhe-la a skin desejada.", "Pronto", "Prуximo");
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Esse jogador й procurado/ Й de uma organizaзгo diferente/ ou membro de uma familia.");
return 1;
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, "Vocк nгo tem cargo o suficiente para poder convidar!");
return 1;
}
}//not connected
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Vocк nгo estб autorizado para usar este comando( Somente Lideres/Sub-Lideres )!");
}
}
return 1;
}
Re: [AJUDA]/convidar -
KrOnOs_SiizE - 15.05.2012
nada
Re: [AJUDA]/convidar -
KrOnOs_SiizE - 15.05.2012
auguem?
Re: [AJUDA]/convidar -
ViictorDaay- - 15.05.2012
pawn Код:
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 pname[24];
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 = "G.O.E"; 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 = "ASFARC"; 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 Mercenбrios"; ChosenSkin[para1] = 261; SetPlayerSkin(para1, 261); }
else if(orgl == 9) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Revolution News"; 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 = "Exйrcito Repъblicano Israelense"; ChosenSkin[para1] = 272; SetPlayerSkin(para1, 272); }
else if(orgl == 17) {PlayerInfo[para1][pTeam] = 17; gTeam[para1] = 2; ftext = "Garra"; ChosenSkin[para1] = 285; SetPlayerSkin(para1, 285);}
else if(orgl == 18) {PlayerInfo[para1][pTeam] = 18; gTeam[para1] = 12; ftext = "Ballas"; ChosenSkin[para1] = 103; SetPlayerSkin(para1, 103);}
else if(orgl == 19) {PlayerInfo[para1][pTeam] = 19; gTeam[para1] = 12; ftext = "Los 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 == 21) { new File:ftw=fopen("Organizaзхes/Cobras/meembros.txt", io_append);PlayerInfo[para1][pTeam] = 21; gTeam[para1] = 21; ftext = "Os Cobras"; ChosenSkin[para1] = 21; SetPlayerSkin(para1, 21); GetPlayerName(para1,pname,24);format(string, 30, "Membro: %s\r\n", pname);fwrite(ftw, string);fclose(ftw);}
else if(orgl == 22) { PlayerInfo[para1][pTeam] = 22; gTeam[para1] = 22; ftext = "Mбfia Kamikaze"; 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 = "Avangers"; ChosenSkin[para1] = 28; SetPlayerSkin(para1, 241);}
else if(orgl == 25) { new File:ftw=fopen("Organizaзхes/Fab/meembros.txt", io_append);PlayerInfo[para1][pTeam] = 25; gTeam[para1] = 25; ftext = "FAB"; ChosenSkin[para1] = 287; SetPlayerSkin(para1, 287); GetPlayerName(para1,pname,24);format(string, 30, "Membro: %s\r\n", pname);fwrite(ftw, string);fclose(ftw);}
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;
}
Adapte ao seu gamemode.
Re: [AJUDA]/convidar -
KrOnOs_SiizE - 16.05.2012
nada ainda
Re: [AJUDA]/convidar -
Yaakin - 16.05.2012
PHP код:
if(strcmp(cmd, "/convidar", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (gPlayerLogged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GRAD1, " Vocк precisa logar para usar este comando, use /logar [senha]!");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /convidar [playerid/Parte do Nome]");
return 1;
}
new para1;
new ftext[20];
new org;
para1 = ReturnUser(tmp);
if(PlayerInfo[para1][pMember] != 0 || PlayerInfo[para1][pLeader] != 0)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Desculpe-me mais este player jб participa de uma oganizaзгo.");
return 1;
}
if(PuxarOrganizacao(playerid) >= 1)
{
if(IsPlayerConnected(para1))
{
if(PlayerInfo[para1][pLevel] < 2)
{
SendClientMessage(playerid, COLOR_GREY, "Sу pode convidar quem й level 2 ou acima de 2!!"); return 1;
}
if(PlayerInfo[playerid][pRank] != 444 || PlayerInfo[playerid][pRank] != 555 || PlayerInfo[playerid][pRank] != 6|| PlayerInfo[playerid][pRank] != 5)
{
return SendClientMessage(playerid, COLOR_GRAD2, "Vocк nгo tem cargo o suficiente para poder convidar!");
}
if(para1 != INVALID_PLAYER_ID)
{
if (PlayerInfo[para1][pMember] == 0)
{
org = PuxarOrganizacao(playerid);
if(ConviteInfoOrg(pNome(para1), org, 1)) { } else { SendClientMessage(playerid, COLOR_LIGHTBLUE, "Sua organizaзгo estб cheia limpe uma vaga!"); return 1;}
if(PlayerInfo[playerid][pLeader] == 1) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "Policia Militar"; ChosenSkin[para1] = 280; SetPlayerSkin(para1, 280);}
else if(PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pRank] == 444 || PlayerInfo[playerid][pRank] == 555) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "ROTAM"; ChosenSkin[para1] = 286; SetPlayerSkin(para1, 286);}
else if(PlayerInfo[playerid][pLeader] == 3 || PlayerInfo[playerid][pRank] == 444 || PlayerInfo[playerid][pRank] == 555) { PlayerInfo[para1][pTeam] = 3; gTeam[para1] = 3; ftext = "Exercito"; ChosenSkin[para1] = 287; SetPlayerSkin(para1, 287);}
else if(PlayerInfo[playerid][pLeader] == 4 || PlayerInfo[playerid][pRank] == 444 || PlayerInfo[playerid][pRank] == 555) { PlayerInfo[para1][pTeam] = 1; gTeam[para1] = 1; ftext = "Medicos"; ChosenSkin[para1] = 70; SetPlayerSkin(para1, 70);}
else if(PlayerInfo[playerid][pLeader] == 5 || PlayerInfo[playerid][pRank] == 444 || PlayerInfo[playerid][pRank] == 555) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "GI"; ChosenSkin[para1] = 113; SetPlayerSkin(para1, 113);}
else if(PlayerInfo[playerid][pLeader] == 6 || PlayerInfo[playerid][pRank] == 444 || PlayerInfo[playerid][pRank] == 555) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "Asfarc"; ChosenSkin[para1] = 123; SetPlayerSkin(para1, 123);}
else if(PlayerInfo[playerid][pLeader] == 7 || PlayerInfo[playerid][pRank] == 444 || PlayerInfo[playerid][pRank] == 555) { PlayerInfo[para1][pTeam] = 7; gTeam[para1] = 7; ftext = "Prefeitura"; ChosenSkin[para1] = 163; SetPlayerSkin(para1, 163);}
else if(PlayerInfo[playerid][pLeader] == 8 || PlayerInfo[playerid][pRank] == 444 || PlayerInfo[playerid][pRank] == 555) { PlayerInfo[para1][pTeam] = 10; gTeam[para1] = 10; ftext = "Assasinos"; ChosenSkin[para1] = 127; SetPlayerSkin(para1, 127);}
else if(PlayerInfo[playerid][pLeader] == 9 || PlayerInfo[playerid][pRank] == 444 || PlayerInfo[playerid][pRank] == 555) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Reporteres"; ChosenSkin[para1] = 148; SetPlayerSkin(para1, 148);}
else if(PlayerInfo[playerid][pLeader] == 10 || PlayerInfo[playerid][pRank] == 444 || PlayerInfo[playerid][pRank] == 555) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Taxistas"; ChosenSkin[para1] = 255; SetPlayerSkin(para1, 255);}
else if(PlayerInfo[playerid][pLeader] == 11 || PlayerInfo[playerid][pRank] == 444 || PlayerInfo[playerid][pRank] == 555) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Instrutores"; ChosenSkin[para1] = 59; SetPlayerSkin(para1, 59);}
else if(PlayerInfo[playerid][pLeader] == 12 || PlayerInfo[playerid][pRank] == 444 || PlayerInfo[playerid][pRank] == 555) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Groove"; ChosenSkin[para1] = 270; SetPlayerSkin(para1, 270);}
else if(PlayerInfo[playerid][pLeader] == 13 || PlayerInfo[playerid][pRank] == 444 || PlayerInfo[playerid][pRank] == 555) { PlayerInfo[para1][pTeam] = 13; gTeam[para1] = 13; ftext = "Ballas"; ChosenSkin[para1] = 104; SetPlayerSkin(para1, 104);}
else if(PlayerInfo[playerid][pLeader] == 14 || PlayerInfo[playerid][pRank] == 444 || PlayerInfo[playerid][pRank] == 555) { PlayerInfo[para1][pTeam] = 14; gTeam[para1] = 14; ftext = "Vagos"; ChosenSkin[para1] = 110; SetPlayerSkin(para1, 110);}
else if(PlayerInfo[playerid][pLeader] == 15 || PlayerInfo[playerid][pRank] == 444 || PlayerInfo[playerid][pRank] == 555) { PlayerInfo[para1][pTeam] = 15; gTeam[para1] = 15; ftext = "Aztecas"; ChosenSkin[para1] = 115; SetPlayerSkin(para1, 115);}
else if(PlayerInfo[playerid][pLeader] == 16 || PlayerInfo[playerid][pRank] == 444 || PlayerInfo[playerid][pRank] == 555) { PlayerInfo[para1][pTeam] = 16; gTeam[para1] = 2; ftext = "Policia Rodoviaria"; ChosenSkin[para1] = 186; SetPlayerSkin(para1, 186);}
else if(PlayerInfo[playerid][pLeader] == 17 || PlayerInfo[playerid][pRank] == 444 || PlayerInfo[playerid][pRank] == 555) { PlayerInfo[para1][pTeam] = 17; gTeam[para1] = 17; ftext = "Comando Vermelho"; ChosenSkin[para1] = 170; SetPlayerSkin(para1, 170);}
else if(PlayerInfo[playerid][pLeader] == 18 || PlayerInfo[playerid][pRank] == 444 || PlayerInfo[playerid][pRank] == 555) { PlayerInfo[para1][pTeam] = 18; gTeam[para1] = 18; ftext = "PCC"; ChosenSkin[para1] = 47; SetPlayerSkin(para1, 47);}
else if(PlayerInfo[playerid][pLeader] == 19 || PlayerInfo[playerid][pRank] == 444 || PlayerInfo[playerid][pRank] == 555) { PlayerInfo[para1][pTeam] = 19; gTeam[para1] = 19; ftext = "Mafia Russa"; ChosenSkin[para1] = 144; SetPlayerSkin(para1, 144);}
else if(PlayerInfo[playerid][pLeader] == 20 || PlayerInfo[playerid][pRank] == 444 || PlayerInfo[playerid][pRank] == 555) { PlayerInfo[para1][pTeam] = 20; gTeam[para1] = 20; ftext = "Mafia Italiana"; ChosenSkin[para1] = 57; SetPlayerSkin(para1, 57);}
else if(PlayerInfo[playerid][pLeader] == 21 || PlayerInfo[playerid][pRank] == 444 || PlayerInfo[playerid][pRank] == 555) { PlayerInfo[para1][pTeam] = 21; gTeam[para1] = 2; ftext = "Policia Federal"; ChosenSkin[para1] = 288; SetPlayerSkin(para1, 288);}
else { return 1; }
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[para1][pMember] = PlayerInfo[playerid][pLeader];
PlayerInfo[para1][pRank] = 1;
printf("* Server: %s tem convidado o %s para entra na(o) %s.", sendername, giveplayer, ftext);
format(string, sizeof(string), " Vocк entrou para %s, vocк foi convidado pelo lider %s", ftext, sendername);
SendClientMessage(para1, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), " Vocк convidou %s para entrar para %s.", giveplayer,ftext);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
SetPlayerInterior(para1,0);
PlayerInfo[playerid][pCarLic] = 1;
PlayerInfo[playerid][pMotoLic] = 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][pMember];
SelectCharPlace[para1] = 1;
PlayerInfo[para1][pModel] = ChosenSkin[para1];
PlayerInfo[para1][pChar] = ChosenSkin[para1];
ShowPlayerDialog(para1, 41, DIALOG_STYLE_MSGBOX, "Convite:", "{ADFF2F}Vocк foi convidado para participar de uma organizaзгo\n{9ACD32}Escolha {FF0000}Prуximo {9ACD32}para trocar a skin que deseja\n{FF0000}Pronto {9ACD32}Para escolhe-la a skin desejada.", "Pronto", "Prуximo");
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Esse jogador й procurado/ Й de uma organizaзгo diferente/ ou membro de uma familia.");
return 1;
}
}
}//not connected
}
}
return 1;
}
Fica dificil de fazer sem saber as variaveis que vc usa...