pawn Код:
CMD:ally(playerid, params[])
{
new id;
if(sscanf(params, "u", id)) return SendClientMessage(playerid, COLOR_RED, "[ERROR]: Usage: /ally [id].");
if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_RED, "[ERROR]: The player you are trying to heal is not connected.");
if(PlayerInfo[playerid][Team] == PlayerInfo[id][Team] && playerid == id) return SendClientMessage(playerid, COLOR_RED, "[ERROR]: You cannot ally with your team mates / yourself.");
if(IsPlayerInDynamicCP(id, UCP) == 0 || IsPlayerInDynamicCP(playerid, UCP) == 0 ) return SendClientMessage(playerid, COLOR_RED, "[ERROR]: You or your ennemy must be in the united nations checkpoint.");
new zstr[64];
format(zstr, sizeof(zstr), " %s wants to ally with you", GetName(playerid));
ShowPlayerDialog(playerid, ALLY, DIALOG_STYLE_MSGBOX, "Alliance demand", zstr, "Accept", "Decline");
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid)
{
case ALLY:
{
// im stuck here, i have no ideas
}
So im stuck in OnDialogResponse, i got an idea using variables but i think there is a way faster than that, any idea please? (rep+)