Eae galera, como que eu faзo pra quando o player for convidado pra alguma org aparecer pra ele uma tenla escrito proximo(pra proxima skin) ou pronto(pra ele spawnar). o comando pra convidar fico assim:
pawn Code:
//====================================================[CONVIDAR]=====================================================================
if(strcmp(cmd, "/convidar", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /convidar [ID/Nome].");
return true;
}
new para1;
para1 = ReturnUser(tmp);
if (PlayerInfo[playerid][pLider] >= 1 || PlayerInfo[playerid][pCargo] == 5)
{
new lolz = GetPlayerOrg(playerid);
if(TemVaga(lolz) == 0)
{
SendClientMessage(playerid, COLOR_GRAD1, "Nгo hб mais vagas na lista use /limparvaga primeiro.");
return true;
}
if(IsPlayerConnected(para1))
{
if(PlayerInfo[para1][pMembro] != 0 || PlayerInfo[para1][pLider] != 0)
{
SendClientMessage(playerid, COLOR_GREY, "Este player jб participa de Org/Gang/Mafia.");
return true;
}
if(para1 != INVALID_PLAYER_ID)
{
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
/*ShowPlayerDialog(para1, 642, DIALOG_STYLE_MSGBOX, "Convite", "{E679F2}Vocк foi convidado para uma organizaзгo: %s \n{63ACFF}Deseja entrar para a organizaзгo ?", "Sim", "Nao", NomeORG(playerid));
format(string, sizeof(string), "* {F2D61F}%s {E3E3E3}te convidou para entrar para: {F2D61F}%s. Sim {E3E3E3}- {3EF02E}Aceita {E3E3E3}| {FF4053}Nгo {E3E3E3}- Recusa.", PlayerName(playerid), NomeORG(playerid));
SendClientMessage(para1, COLOR_LIGHTBLUE, string);*/
format(string, sizeof(string), "* Vocк convidou %s para sua organizaзгo: %s.", giveplayer,NomeORG(playerid));
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
new convitestring[256];
format(convitestring,sizeof(convitestring), "{E679F2}Vocк foi convidado para uma organizaзгo: %s \n{63ACFF}Deseja entrar para a organizaзгo ?",NomeORG(playerid));
ShowPlayerDialog(para1,642,DIALOG_STYLE_MSGBOX,"Convite",convitestring,"Sim","Nao");
InviteOffer[para1] = playerid;
InviteJob[para1] = lolz;
}
}//not connected
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Somente lнderes podem usar este comando.");
}
}
return true;
}
E a funзгo que й chamada em seguida й essa(que tambem esta bugada,o bug й quando o player digita proximo ou spawn,nada acontece):
pawn Code:
if(SelectChar[playerid] == 255)
{
new idx;
tmp = strtok(text, idx);
if ((strcmp("Proximo", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("Proximo")))
{
switch (SelectCharID[playerid])
{
case 1: //Policia Militar
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 280); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 280; }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 281); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 281; }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 282); SelectCharPlace[playerid] = 4; ChosenSkin[playerid] = 282; }
else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, 265); SelectCharPlace[playerid] = 5; ChosenSkin[playerid] = 265; }
else if(SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid, 267); SelectCharPlace[playerid] = 6; ChosenSkin[playerid] = 267; }
else if(SelectCharPlace[playerid] == 6) { SetPlayerSkin(playerid, 246); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 246; }
}
case 2: //B.O.P.E
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 285); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 285; }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 298); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 298; }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 285); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 285; }
}
case 3: //Exйrcito
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 287); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 287; }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 191); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 191; }
}
case 4: //SAMU
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 91); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 91; }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 279); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 279; }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 277); SelectCharPlace[playerid] = 4; ChosenSkin[playerid] = 277; }
else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, 276); SelectCharPlace[playerid] = 5; ChosenSkin[playerid] = 276; }
else if(SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid, 275); SelectCharPlace[playerid] = 6; ChosenSkin[playerid] = 275; }
else if(SelectCharPlace[playerid] == 6) { SetPlayerSkin(playerid, 279); SelectCharPlace[playerid] = 7; ChosenSkin[playerid] = 279; }
else if(SelectCharPlace[playerid] == 7) { SetPlayerSkin(playerid, 274); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 274; }
}
case 5: //Varrios Los Aztecas
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 116); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 116; }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 115); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 115; }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 114); SelectCharPlace[playerid] = 4; ChosenSkin[playerid] = 114; }
else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, 41); SelectCharPlace[playerid] = 5; ChosenSkin[playerid] = 41; }
else if(SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid, 148); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 148; }
}
case 6: //Hamas
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 122); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 122; }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 272); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 272; }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 131); SelectCharPlace[playerid] = 4; ChosenSkin[playerid] = 131; }
else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, 128); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 128; }
}
case 7: //Prefeito
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 164); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 164; }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 163); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 163; }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 17); SelectCharPlace[playerid] = 4; ChosenSkin[playerid] = 17; }
else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, 141); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 141; }
}
case 8: //Hitman Agency
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 166); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 166; }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 165); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 165; }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 127); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 127; }
}
case 9: //Reporteres
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 188); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 188; }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 187); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 187; }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 148); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 148; }
}
case 10: //Taxistas
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 255); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 255; }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 219); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 219; }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 253); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 253; }
}
case 11: //Policia federal
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 224); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 224; }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 286); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 286; }
}
case 12: //Mafia Cosa Nostra
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 17); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 17; }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 43); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 43; }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 46); SelectCharPlace[playerid] = 4; ChosenSkin[playerid] = 46; }
else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, 98); SelectCharPlace[playerid] = 5; ChosenSkin[playerid] = 98; }
else if(SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid, 111); SelectCharPlace[playerid] = 6; ChosenSkin[playerid] = 111; }
else if(SelectCharPlace[playerid] == 6) { SetPlayerSkin(playerid, 223); SelectCharPlace[playerid] = 7; ChosenSkin[playerid] = 223; }
else if(SelectCharPlace[playerid] == 7) { SetPlayerSkin(playerid, 126); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 126; }
}
case 13: //Yakuza
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 203); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 203; }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 204); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 204; }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 117); SelectCharPlace[playerid] = 4; ChosenSkin[playerid] = 117; }
else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, 118); SelectCharPlace[playerid] = 5; ChosenSkin[playerid] = 118; }
else if(SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid, 169); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 169; }
}
case 14: //Groove
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 105); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 105; }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 106); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 106; }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 107); SelectCharPlace[playerid] = 4; ChosenSkin[playerid] = 107; }
else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, 271); SelectCharPlace[playerid] = 5; ChosenSkin[playerid] = 271; }
else if(SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid, 195); SelectCharPlace[playerid] = 6; ChosenSkin[playerid] = 195; }
else if(SelectCharPlace[playerid] == 6) { SetPlayerSkin(playerid, 269); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 269; }
}
case 15: //Al'qaeda
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 30); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 30; }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 47); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 47; }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 48); SelectCharPlace[playerid] = 4; ChosenSkin[playerid] = 48; }
else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, 192); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 192; }
}
case 16: //Policia Civil
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 59); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 59; }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 124); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 124; }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 76); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 76; }
}
case 17: //Ballas
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 102); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 102; }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 103); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 103; }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 104); SelectCharPlace[playerid] = 4; ChosenSkin[playerid] = 104; }
else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, 40); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 40; }
}
case 18: //Vagos
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 108); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 108; }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 109); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 109; }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 110); SelectCharPlace[playerid] = 4; ChosenSkin[playerid] = 110; }
else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, 91); SelectCharPlace[playerid] = 5; ChosenSkin[playerid] = 91; }
else if(SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid, 85); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 85; }
}
case 19: //Bloodz
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 19); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 19; }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 170); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 170; }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 40); SelectCharPlace[playerid] = 4; ChosenSkin[playerid] = 40; }
else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, 193); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 193; }
}
case 20: //Sons of Anarchy
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 247); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 247; }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 248); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 248; }
}
case 21: //DRIFTERS
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 101); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 101; }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 293); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 293; }
}
case 22: //TRIADS
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 117); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 117; }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 118); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 118; }
}
case 23: //FARC
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 111); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 111; }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 112); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 112; }
}
}
return 0;
}
else if ((strcmp("Confirma", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("Confirma")))
{
if(IsAtClothShop(playerid))
{
PlayerInfo[playerid][pSkin] = ChosenSkin[playerid];
SelectCharPlace[playerid] = 0;
SelectCharID[playerid] = 0;
SelectChar[playerid] = 0;
return 0;
}
if(ChangePos2[playerid][1] == 1)
{
PlayerInfo[playerid][pSkin] = ChosenSkin[playerid];
SetPlayerInterior(playerid, ChangePos2[playerid][0]);
SetPlayerPos(playerid, ChangePos[playerid][0],ChangePos[playerid][1],ChangePos[playerid][2]);
ChangePos2[playerid][1] = 0;
return 0;
}
PlayerInfo[playerid][pSkin] = ChosenSkin[playerid];
//PlayerInfo[playerid][pSpawn] = 0;
SetSpawnInfo(playerid, PlayerInfo[playerid][pTeam], PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0);
gTeam[playerid] = PlayerInfo[playerid][pTeam];
SetPlayerToTeamColor(playerid);
MedicBill[playerid] = 0;
SpawnPlayer(playerid);
SelectCharPlace[playerid] = 0;
SelectCharID[playerid] = 0;
SelectChar[playerid] = 0;
return 0;
}
else
{
SendClientMessage(playerid, TEAM_VAGOS_COLOR, "* Use 'Proximo', ou 'Confirma'.");
return 0;
}
}
Valeu ae galerinha.