SA-MP Forums Archive
Quiz - 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: Quiz (/showthread.php?tid=338410)



Quiz - Alex.Cone - 29.04.2012

I have made RP quiz but I have one problem. First if player give incorrect answer he will be kicked and I set
Код:
PlayerInfo[playerid][Quiz] = 0;
And if player pass quiz I set
Код:
PlayerInfo[playerid][Quiz] = 1;
And I made under OnPlayerConnect this:
Код:
if(PlayerInfo[playerid][Quiz] == 0)
 		{
 	    	ShowPlayerDialog(playerid,5,DIALOG_STYLE_MSGBOX,"RP Quiz","Next","");
		}
And I have saved this:
Код:
INI_WriteInt(File, "Quiz", PlayerInfo[playerid][Quiz]);
But It won't write in scriptfiles "Quiz = 1", it's allways "Quiz = 0", why?


Re: Quiz - Littlehelper - 29.04.2012

Please mention where are you doing the saving process?
Right after when player pass the Quiz or after the disconnect?


Re: Quiz - Alex.Cone - 29.04.2012

SCM(playerid, GREY,"You have passed Quiz");
PlayerInfo[playerid][Quiz] = 1;

After last question.


Re: Quiz - Littlehelper - 29.04.2012

Try replacing this
pawn Код:
INI_WriteInt(File, "Quiz", PlayerInfo[playerid][Quiz]);
With this:
pawn Код:
PlayerInfo[playerid][Quiz] = INI_WriteInt(File, "Quiz", PlayerInfo[playerid][Quiz]);



Re: Quiz - Alex.Cone - 29.04.2012

Same again -.-


Re: Quiz - Crazymax - 29.04.2012

show us the lines where you save it... load it.. etc