if(dialogid == 222)
{
if(response == 0)
{
// PlayerInfo[playerid][pPhoneBook] = 0;
return 1;
}
if(response >= 1)
{
if(listitem == 0)
{
if(PlayerInfo[playerid][pPhoneBook] >= 1)
{
format(string,sizeof(string),"/ligar %d",PlayerInfo[playerid][pPnumber]);// <<<<<<
OnPlayerCommandText(playerid,string);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Vocк nгo tem uma agenda !");
return 1;
}
}
if(listitem == 1)
{
if(PlayerInfo[playerid][pPhoneBook] >= 1)
{
ShowPlayerDialog(playerid, 444, DIALOG_STYLE_INPUT, "Menu de SMS", "Digite a Mensagem", "Enviar", "Cancelar");
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Vocк nгo tem uma agenda!");
return 1;
}
}
return 1;
}
return 1;
}
if(dialogid == 444)
{
if(response == 0)
{
// PlayerInfo[playerid][pPhoneBook] = 0;
return 1;
}
if(response >= 1)
{
format(string,sizeof(string),"/sms %d %s",PlayerInfo[playerid][pPnumber],inputtext); // <<<<<<
OnPlayerCommandText(playerid,string);
return 1;
}
return 1;
}
return 1;
}
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
new string[256];
new pstring[256];
new plname[MAX_PLAYER_NAME];
// PlayerInfo[playerid][pPhoneBook] >= 1;
GetPlayerName(clickedplayerid, plname, sizeof(plname));
format(string, sizeof(string), "Menu do(a) %s", plname);
format(pstring, sizeof(pstring), "Ligar para %s\nMandar SMS para %s", plname,plname);
ShowPlayerDialog(playerid, 222, DIALOG_STYLE_LIST, string, pstring, "Confirmar", "Cancelar");
PlayerInfo[playerid][pPnumber] = PlayerInfo[clickedplayerid][pPnumber]; // <<<<<< olha aqui
return 1;
}
format(pstring, sizeof(pstring), "Ligar para %s\nMandar SMS para %s Numero: %d", plname,plname,PlayerInfo[clickedplayerid][pPnumber]);
pawn Code:
|
new telefone[MAX_PLAYERS];
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
telefone[playerid] = PlayerInfo[clickedplayerid][pPnumber];
return 1;
}
format(string,sizeof(string),"/sms %d %s",telefone[playerid], (inputtext));
OnPlayerCommandText(playerid,string);
PlayerInfo[playerid][pPnumber] = PlayerInfo[clickedplayerid][pPnumber]; // <<<<<< olha aqui
// \/
format(string,sizeof(string),"/sms %d %s",telefone, (inputtext));
OnPlayerCommandText(playerid,string);
format(string,sizeof(string),"/sms %d %s",telefone[playerid],inputtext); //<<< estava com [pPnumber] asuhhuAS
OnPlayerCommandText(playerid,string);