Dialog Ain't responding. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Dialog Ain't responding. (
/showthread.php?tid=387327)
Dialog Ain't responding. -
Black Axe - 24.10.2012
Well - The Dialog pops up. .But when I Try clicking on anything - No respond
Code :
PHP код:
if(strcmp(cmd, "/mycommand", true) == 0)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
for(new i = 0; i < sizeof(yo); i++)
{
if(IsPlayerInRangeOfPoint(playerid, 2, bla bla bla))
{
ShowPlayerDialog(playerid, DIALOG_ID, DIALOG_STYLE_LIST,"Itmes","The Items","Purchase","Cancel");
return 1;
}
}
SendClientMessage(playerid,COLOR_WHITE,".:: Error : Just an error");
return 1;
}
PHP код:
if(dialogid == DIALOG_ID)
{
if(response)
{
if(listitem == 0)
{
if(PlayerInfo[playerid][myvar] >= 5)
{
// my code
}
}
if(listitem == 1)
{
if(PlayerInfo[playerid][myvar] >= 20)
{
// my code
}
}
if(listitem == 2)
{
if(PlayerInfo[playerid][myvar] >= 40)
{
// my code
}
}
if(listitem == 3)
{
if(PlayerInfo[playerid][myvar] >= 70)
{
// my code
}
}
if(listitem == 5)
{
if(PlayerInfo[playerid][pmyvar] >= 100)
{
// my code
}
}
}
return 1;
}
Help would be really Appreciated
Re: Dialog Ain't responding. -
Riddick94 - 24.10.2012
Are you sure your array [myvar] is bigger than or equal to 5? And about coordinations of IsPlayerInRangeOfPoint, and the last point can be.. increase your FLOAT value for a range in IsPlayerInRangeFunction.