Whats wrong with this code? - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Whats wrong with this code? (
/showthread.php?tid=193967)
Whats wrong with this code? -
Anthonyx3' - 28.11.2010
Hey guy, today isnt my day xD. Been running into multiple mistakes in my code and well im not sure whats wrong with this code:
pawn Код:
if(!response)
{
if(PlayerInfo[playerid][pCitizen] == 0)
{
ShowPlayerDialog(playerid,6,DIALOG_STYLE_INPUT,"Citizenship Information","How Old Are You?","Send","Cancel");
}
if(PlayerInfo[playerid][pCitizen] == 1) return SendClientMessage(playerid, COLOR_RED, "You Are Already A Citizen");
}
It automatically says " You are already a citizen, even when you are not.
Re: Whats wrong with this code? -
Buzzbomb - 28.11.2010
pawn Код:
if(!response)
{
if(PlayerInfo[playerid][pCitizen] == 0)
{
ShowPlayerDialog(playerid,6,DIALOG_STYLE_INPUT,"Citizenship Information","How Old Are You?","Send","Cancel");
}
else
{
if(PlayerInfo[playerid][pCitizen] == 1) return SendClientMessage(playerid, COLOR_RED, "You Are Already A Citizen");
}
}
Re: Whats wrong with this code? -
Zh3r0 - 28.11.2010
This is a better code!
pawn Код:
if(!response)
{
if ( PlayerInfo[ playerid ][ pCitizen ] == 0 )ShowPlayerDialog ( playerid, 6, DIALOG_STYLE_INPUT, "Citizenship Information","How Old Are You?", "Send", "Cancel" );
else SendClientMessage(playerid, COLOR_RED, "You Are Already A Citizen");
}
Try and concentrate whatever you do!