26.09.2012, 22:16
(
Последний раз редактировалось Coringa_Vilao; 07.11.2015 в 01:40.
)
Resolvido !
if(dialogid == 1315)
{
if(!response)
{
// Tudo que acontecerб no botгo direito
return 1;
}
if(response)
{
//Tudo que vai acontecer no botгo esquerdo.
}
}
if(strcmp(cmd, "/convidar", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /convidar [playerid/Parte-do-Nick]");
return 1;
}
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 1;
}
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 1;
}
if(para1 != INVALID_PLAYER_ID)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "{00BFFF}%s te convidou para entrar para: %s \n{20B2AA}Clique em Aceitar ou Recusar.", PlayerName(playerid), NomeORG(playerid));
ShowPlayerDialog(para1, DIALOG_CONVITE, DIALOG_STYLE_MSGBOX, "Convite para Org", string, "Aceitar","Recusar");
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "{00BFFF}* Vocк convidou %s para sua organizaзгo: %s.", giveplayer,NomeORG(playerid));
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
InviteOffer[para1] = playerid;
InviteJob[para1] = lolz;
}
}//not connected
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Somente lнderes podem usar este comando !");
}
}
return 1;
}
//Agora em onplayerdialogresponse
if(dialogid == DIALOG_CONVITE)
{
if(response == 0)
{
SendClientMessage(playerid, Cor, "Vocк recusou o convite para a Org"); //aqui vocк poe o que vai aparece c o player recusar
return 1;
}
if(response == 1)
{
SendClientMessage(playerid, Cor, "Vocк aceitou o convite para a org"); // aqui vocк poe oq vai acontecer no comando /aceitar
}
}