Player ID Problem -
Wasim - 26.11.2016
I've a problem with player ID's, once a player logs in with an ID higher then 8 it spams a dialog and this player won't be able to close it. I've tried multiple restarts but the problem keeps coming. What could this be?
Re: Player ID Problem -
IceBilizard - 26.11.2016
Can you show the code of that dialog?
Re: Player ID Problem -
Wasim - 26.11.2016
if(clickedid == InventoryText[playerid][3])
{
ShowPlayerDialog(playerid, DIALOG_TRADE, DIALOG_STYLE_INPUT, "{FF8000}Trade", "{FFFFFF}Who would you like to trade with?\n(ID)", "Next", "Cancel");
HideInventory(playerid);
}
Re: Player ID Problem -
IceBilizard - 26.11.2016
Hmm you are using this dialog on any timer or maybe you are doing something wrong on dialog response? like if you are using
PHP код:
if(dialogid == DIALOG_TRADE)
{
if(reponse)
{
//Your stuff
}
else
{
//Showing DIALOG_TRADE again
}
}
Re: Player ID Problem -
Wasim - 26.11.2016
if(dialogid == DIALOG_TRADE)
{
if(response)
{
new string[128], Float
, Float:y, Float:z;
new tradeid = strval(inputtext);
if(!IsPlayerConnected(tradeid)) return ShowPlayerDialog(playerid, DIALOG_TRADE, DIALOG_STYLE_INPUT, "{FF8000}Invalid ID", "{FFFFFF}Who would you like to trade with?\n(ID)", "Next", "Cancel");
if(ptrade[tradeid] != 999) return SendClientMessage(playerid, COLOR_ORANGE, "** {AFAFAF}This player is already trading with someone else.");
if(pdeath[playerid] == 1 || ptazed[playerid] == 1 || pcuffed[playerid] == 1) return SendClientMessage(playerid, COLOR_ORANGE, "** {AFAFAF}This player can't trade anyone in his current condition.");
if(tradeid == playerid) return SendClientMessage(playerid, COLOR_ORANGE, "** {AFAFAF}You can't trade yourself.");
GetPlayerPos(tradeid, x, y, z);
if(!IsPlayerInRangeOfPoint(playerid, 5.0, x, y, z)) return SendClientMessage(playerid, COLOR_ORANGE, "** {AFAFAF}You aren't near this player.");
format(string, sizeof(string), "{FFFFFF}%s would like to trade with you.", GPN(playerid));
ShowPlayerDialog(tradeid, DIALOG_TRADEREQUEST, DIALOG_STYLE_MSGBOX, "{FF8000}Trade", string, "Trade", "Cancel");
ptrade[playerid] = tradeid;
ptrade[tradeid] = playerid;
ptradep1[tradeid] = 1;
ptradep2[tradeid] = 0;
ptradep2[playerid] = 1;
ptradep1[playerid] = 0;
}
}
This is what i have under that dialog