SA-MP Forums Archive
Test for Drivers License - 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: Test for Drivers License (/showthread.php?tid=389638)



Test for Drivers License - jakejohnsonusa - 02.11.2012

I need a drivers license test for my RP GM. Currently you can go there and just buy one, But I would like to add a test to be able to GET the drivers license if you PASS. If someone could set one up for me that would be great I will make the questions... But I am a very beginner scripter. I would like there to be 25 Questions A,B,C,D (multiple choice). Thanks so much to whoever can set this up for me.

-jakejohnsonusa

I need to add it to this:
Код:
	if(strcmp(cmd, "/buydriving", true) == 0)
	{
		if(IsPlayerConnected(playerid))
       	{
       	    if(PlayerInfo[playerid][pPassport] == 0) return SendClientMessage(playerid, COLOR_GREY,"* You need a passport before having any license!!");
			if(IsPlayerInRangeOfPoint(playerid, 3,1490.3195,1305.6976,1093.2964))
          	{
            	if(PlayerInfo[playerid][pCarLic] == 0)
				{
				    if(GetPlayerMoney(playerid) < 3500)
				    {
             			SendClientMessage(playerid, COLOR_GREY, "You don't have enough money for a driving license");
             			return 1;
					}
					else
					{
             			SendClientMessage(playerid, COLOR_LIGHTBLUE, "You bought a driving License for $3, 500");
             			SafeGivePlayerMoney(playerid, - 3500);
             			PlayerInfo[playerid][pCarLic] = 1;
             			OnPlayerUpdateEx(playerid);
						new y, m, d;
						new h,mi,s;
						getdate(y,m,d);
						gettime(h,mi,s);
						format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s [CMD] -> /buydriving",d,m,y,h,mi,s,sendername);
						CommandLog(string);
					}
				}
				else
				{
					SendClientMessage(playerid, COLOR_LIGHTBLUE, " You already own a driving license");
					return 1;
				}
			}
		}
  		return 1;
	}



Re: Test for Drivers License - Lorrden - 02.11.2012

Wrong section, post it here.


Re: Test for Drivers License - jakejohnsonusa - 02.11.2012

No- this is the right section, as I am not looking for someone to do it all for me, but rather help me make one and explain the steps. If someone can tell me how to make this and explain each part that would be excellent.
Thanks!

-jakejohnsonusa


Re: Test for Drivers License - jakejohnsonusa - 03.11.2012

Anyone know? Just a simple test dialogue that has 25 Questions A,B,C,D...


Re: Test for Drivers License - Glad2BeHere - 03.11.2012

https://sampforum.blast.hk/showthread.php?tid=382801


Re: Test for Drivers License - jakejohnsonusa - 03.11.2012

LOL that confused me more... Can someone post one with 25 questions... and then read through the script and change questions/answers. Sorry I'm just a horrible scripter, but I'm getting better :P

Please & Thanks: jakejohnsonusa


Re: Test for Drivers License - Glad2BeHere - 03.11.2012

thats very easy got teamviewer? ill show u how 2 do it, if yes inbox me information