SA-MP Forums Archive
[Help] /buydriving - 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: [Help] /buydriving (/showthread.php?tid=442751)



[Help] /buydriving - Pajser - 08.06.2013

The script: I'm using Ravens RolePlay GM
Description about the problem: If I have no driving license and I want to get it so, I will go to licenses center and there type /buydriving,then I will get driving test with text and if I passed it,then I will get driving test. The problem is there on the last checkpoint,when the player enter in the checkpoint it doesn't work,well checkpoint will not be disabled and anything of text wouldn't be showed like "You finished your driving test etc..". On my home server when I'm id 0 always it always works for me,but for other id's on linux it doesn't work
Part of the script: I will give this,if you need something else,just say

Код:
}
	if(IgracPolaze[playerid] == 1)
	{
	    new carid = GetPlayerVehicleID(playerid);
	    if(IsAPolaganjeVozilo(carid))
	    {
			if(CP[playerid] == 1000) {printf("Odradjen CP %d",CP[playerid]);DisablePlayerCheckpoint(playerid);SetPlayerCheckpoint(playerid,555.8055,-1582.7268,15.9400,4.0); CP[playerid] = 1001; return 1;}
			else if(CP[playerid] == 1001) {printf("Odradjen CP %d",CP[playerid]);DisablePlayerCheckpoint(playerid);SetPlayerCheckpoint(playerid,452.1725,-1575.4485,25.2337,4.0); CP[playerid] = 1002; return 1;}
			else if(CP[playerid] == 1002) {printf("Odradjen CP %d",CP[playerid]);DisablePlayerCheckpoint(playerid); DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,404.4110,-1480.0077,31.0073,4.0); CP[playerid] = 1003; return 1;}
			else if(CP[playerid] == 1003) {printf("Odradjen CP %d",CP[playerid]);DisablePlayerCheckpoint(playerid); DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,325.7561,-1571.5514,33.0360,4.0); CP[playerid] = 1004; return 1;}
			else if(CP[playerid] == 1004) {printf("Odradjen CP %d",CP[playerid]);DisablePlayerCheckpoint(playerid); DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,258.7735,-1572.4921,32.9258,4.0); CP[playerid] = 1005; return 1;}
			else if(CP[playerid] == 1005) {printf("Odradjen CP %d",CP[playerid]);DisablePlayerCheckpoint(playerid); DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,286.2873,-1502.7004,32.5583,4.0); CP[playerid] = 1006; return 1;}
			else if(CP[playerid] == 1006) { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,192.0265,-1519.6936,12.5399,4.0); CP[playerid] = 1007; return 1;}
			else if(CP[playerid] == 1007) { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,251.8208,-1438.5563,13.3708,4.0); CP[playerid] = 1008; return 1;}
			else if(CP[playerid] == 1008) { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,474.7064,-1308.0428,15.2654,4.0); CP[playerid] = 1009; return 1;}
			else if(CP[playerid] == 1009) { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,656.9050,-1202.3230,18.0067,4.0); CP[playerid] = 1010; return 1;}
			else if(CP[playerid] == 1010) { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,753.5446,-1066.8289,23.6670,4.0); CP[playerid] = 1011; return 1;}
			else if(CP[playerid] == 1011) { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,953.1033,-975.3172,38.6708,4.0); CP[playerid] = 1012; return 1;}
			else if(CP[playerid] == 1012) { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,961.1972,-1039.6890,30.0189,4.0); CP[playerid] = 1013; return 1;}
			else if(CP[playerid] == 1013) { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,940.5981,-1184.5752,19.5120,4.0); CP[playerid] = 1014; return 1;}
			else if(CP[playerid] == 1014) { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,914.9889,-1365.1594,13.1355,4.0); CP[playerid] = 1015; return 1;}
			else if(CP[playerid] == 1015) { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,916.3383,-1737.6366,13.3141,4.0); CP[playerid] = 1016; return 1;}
			else if(CP[playerid] == 1016) { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,643.8130,-1731.2504,13.5770,4.0); CP[playerid] = 1017; return 1;}
			else if(CP[playerid] == 1017) { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,639.2842,-1560.0924,15.2835,4.0); CP[playerid] = 1018; return 1;}
			else if(CP[playerid] == 1018) { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,686.1772,-1548.1727,14.7817,4.0); CP[playerid] = 1019; return 1;}
			else if(IsPlayerInRangeOfPoint(playerid, 5.0, 686.1772,-1548.1727,14.7817))
			{
       			IgracPolaze[playerid] = 0;
		    	VoziloPolaze[playerid] = 0;
		    	new Float:Health; GetVehicleHealth(polaganjevozilo[playerid],Health);
		    	SetVehicleToRespawn(GetPlayerVehicleID(playerid));
	    		LinkVehicleToInterior(GetPlayerVehicleID(playerid), 0);
				SafeRemovePlayerFromVehicle(playerid);
		    	if(Health < 850)
		    	{
		    	    DisablePlayerCheckpoint(playerid);
		    	    CP[playerid] = 0;
					SCM(playerid,COLOR_WHITE,"Pali ste na polaganju jer ste ostetili automobil");
					return 1;
				}
				else
				{
				    DisablePlayerCheckpoint(playerid);
		    	    CP[playerid] = 0;
		    		PlayerInfo[playerid][pCarLic] = 1;
		    		SCM(playerid,COLOR_WHITE,"Zavrsili ste polaganje,dobili ste vozacku dozvolu!!");
		    		return 1;
		    	}
			}
		}



Re: [Help] /buydriving - Pajser - 08.06.2013

Help?


Re: [Help] /buydriving - Pottus - 08.06.2013

Whats Ravens Roleplay never heard of it.


Re: [Help] /buydriving - Pajser - 09.06.2013

Quote:
Originally Posted by [uL]Pottus
Посмотреть сообщение
Whats Ravens Roleplay never heard of it.
LoL you didn't heard for Raven's O.o


Re: [Help] /buydriving - Pottus - 09.06.2013

Well I just did some research into Ravens Roleplay and discovered the code is written ass backwards.


Re: [Help] /buydriving - feartonyb - 09.06.2013

Momcino evo pomoc od nasih ovo ostalo gamad sve

Code:
Код:
	if(IgracPolaze[playerid] == 1)
	{
	    new carid = GetPlayerVehicleID(playerid);
	    if(IsAPolaganjeVozilo(carid))
	    {
			if(CP[playerid] == 1000) {printf("Odradjen CP %d",CP[playerid]);DisablePlayerCheckpoint(playerid);SetPlayerCheckpoint(playerid,555.8055,-1582.7268,15.9400,4.0); CP[playerid] = 1001; return 1;}
			else if(CP[playerid] == 1001) {printf("Odradjen CP %d",CP[playerid]);DisablePlayerCheckpoint(playerid);SetPlayerCheckpoint(playerid,452.1725,-1575.4485,25.2337,4.0); CP[playerid] = 1002; return 1;}
			else if(CP[playerid] == 1002) {printf("Odradjen CP %d",CP[playerid]);DisablePlayerCheckpoint(playerid); DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,404.4110,-1480.0077,31.0073,4.0); CP[playerid] = 1003; return 1;}
			else if(CP[playerid] == 1003) {printf("Odradjen CP %d",CP[playerid]);DisablePlayerCheckpoint(playerid); DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,325.7561,-1571.5514,33.0360,4.0); CP[playerid] = 1004; return 1;}
			else if(CP[playerid] == 1004) {printf("Odradjen CP %d",CP[playerid]);DisablePlayerCheckpoint(playerid); DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,258.7735,-1572.4921,32.9258,4.0); CP[playerid] = 1005; return 1;}
			else if(CP[playerid] == 1005) {printf("Odradjen CP %d",CP[playerid]);DisablePlayerCheckpoint(playerid); DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,286.2873,-1502.7004,32.5583,4.0); CP[playerid] = 1006; return 1;}
			else if(CP[playerid] == 1006) { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,192.0265,-1519.6936,12.5399,4.0); CP[playerid] = 1007; return 1;}
			else if(CP[playerid] == 1007) { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,251.8208,-1438.5563,13.3708,4.0); CP[playerid] = 1008; return 1;}
			else if(CP[playerid] == 1008) { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,474.7064,-1308.0428,15.2654,4.0); CP[playerid] = 1009; return 1;}
			else if(CP[playerid] == 1009) { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,656.9050,-1202.3230,18.0067,4.0); CP[playerid] = 1010; return 1;}
			else if(CP[playerid] == 1010) { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,753.5446,-1066.8289,23.6670,4.0); CP[playerid] = 1011; return 1;}
			else if(CP[playerid] == 1011) { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,953.1033,-975.3172,38.6708,4.0); CP[playerid] = 1012; return 1;}
			else if(CP[playerid] == 1012) { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,961.1972,-1039.6890,30.0189,4.0); CP[playerid] = 1013; return 1;}
			else if(CP[playerid] == 1013) { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,940.5981,-1184.5752,19.5120,4.0); CP[playerid] = 1014; return 1;}
			else if(CP[playerid] == 1014) { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,914.9889,-1365.1594,13.1355,4.0); CP[playerid] = 1015; return 1;}
			else if(CP[playerid] == 1015) { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,916.3383,-1737.6366,13.3141,4.0); CP[playerid] = 1016; return 1;}
			else if(CP[playerid] == 1016) { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,643.8130,-1731.2504,13.5770,4.0); CP[playerid] = 1017; return 1;}
			else if(CP[playerid] == 1017) { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,639.2842,-1560.0924,15.2835,4.0); CP[playerid] = 1018; return 1;}
			else if(CP[playerid] == 1018) { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,686.1772,-1548.1727,14.7817,4.0); CP[playerid] = 1019; return 1;}
			else if(CP[playerid] == 1019)
			{
                        DisablePlayerCheckpoint(playerid); 
       			IgracPolaze[playerid] = 0;
		    	VoziloPolaze[playerid] = 0;
		    	new Float:Health; GetVehicleHealth(polaganjevozilo[playerid],Health);
		    	SetVehicleToRespawn(GetPlayerVehicleID(playerid));
	    		LinkVehicleToInterior(GetPlayerVehicleID(playerid), 0);
				SafeRemovePlayerFromVehicle(playerid);
		    	if(Health < 850)
		    	{
		    	    DisablePlayerCheckpoint(playerid);
		    	    CP[playerid] = 0;
					SCM(playerid,COLOR_WHITE,"Pali ste na polaganju jer ste ostetili automobil");
					return 1;
				}
				else
				{
				    DisablePlayerCheckpoint(playerid);
		    	    CP[playerid] = 0;
		    		PlayerInfo[playerid][pCarLic] = 1;
		    		SCM(playerid,COLOR_WHITE,"Zavrsili ste polaganje,dobili ste vozacku dozvolu!!");
		    		return 1;
		    	}
			}
		}



Re: [Help] /buydriving - Pajser - 10.06.2013

Quote:
Originally Posted by feartonyb
Посмотреть сообщение
Momcino evo pomoc od nasih ovo ostalo gamad sve

Code:
Код:
	if(IgracPolaze[playerid] == 1)
	{
	    new carid = GetPlayerVehicleID(playerid);
	    if(IsAPolaganjeVozilo(carid))
	    {
			if(CP[playerid] == 1000) {printf("Odradjen CP %d",CP[playerid]);DisablePlayerCheckpoint(playerid);SetPlayerCheckpoint(playerid,555.8055,-1582.7268,15.9400,4.0); CP[playerid] = 1001; return 1;}
			else if(CP[playerid] == 1001) {printf("Odradjen CP %d",CP[playerid]);DisablePlayerCheckpoint(playerid);SetPlayerCheckpoint(playerid,452.1725,-1575.4485,25.2337,4.0); CP[playerid] = 1002; return 1;}
			else if(CP[playerid] == 1002) {printf("Odradjen CP %d",CP[playerid]);DisablePlayerCheckpoint(playerid); DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,404.4110,-1480.0077,31.0073,4.0); CP[playerid] = 1003; return 1;}
			else if(CP[playerid] == 1003) {printf("Odradjen CP %d",CP[playerid]);DisablePlayerCheckpoint(playerid); DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,325.7561,-1571.5514,33.0360,4.0); CP[playerid] = 1004; return 1;}
			else if(CP[playerid] == 1004) {printf("Odradjen CP %d",CP[playerid]);DisablePlayerCheckpoint(playerid); DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,258.7735,-1572.4921,32.9258,4.0); CP[playerid] = 1005; return 1;}
			else if(CP[playerid] == 1005) {printf("Odradjen CP %d",CP[playerid]);DisablePlayerCheckpoint(playerid); DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,286.2873,-1502.7004,32.5583,4.0); CP[playerid] = 1006; return 1;}
			else if(CP[playerid] == 1006) { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,192.0265,-1519.6936,12.5399,4.0); CP[playerid] = 1007; return 1;}
			else if(CP[playerid] == 1007) { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,251.8208,-1438.5563,13.3708,4.0); CP[playerid] = 1008; return 1;}
			else if(CP[playerid] == 1008) { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,474.7064,-1308.0428,15.2654,4.0); CP[playerid] = 1009; return 1;}
			else if(CP[playerid] == 1009) { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,656.9050,-1202.3230,18.0067,4.0); CP[playerid] = 1010; return 1;}
			else if(CP[playerid] == 1010) { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,753.5446,-1066.8289,23.6670,4.0); CP[playerid] = 1011; return 1;}
			else if(CP[playerid] == 1011) { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,953.1033,-975.3172,38.6708,4.0); CP[playerid] = 1012; return 1;}
			else if(CP[playerid] == 1012) { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,961.1972,-1039.6890,30.0189,4.0); CP[playerid] = 1013; return 1;}
			else if(CP[playerid] == 1013) { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,940.5981,-1184.5752,19.5120,4.0); CP[playerid] = 1014; return 1;}
			else if(CP[playerid] == 1014) { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,914.9889,-1365.1594,13.1355,4.0); CP[playerid] = 1015; return 1;}
			else if(CP[playerid] == 1015) { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,916.3383,-1737.6366,13.3141,4.0); CP[playerid] = 1016; return 1;}
			else if(CP[playerid] == 1016) { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,643.8130,-1731.2504,13.5770,4.0); CP[playerid] = 1017; return 1;}
			else if(CP[playerid] == 1017) { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,639.2842,-1560.0924,15.2835,4.0); CP[playerid] = 1018; return 1;}
			else if(CP[playerid] == 1018) { DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,686.1772,-1548.1727,14.7817,4.0); CP[playerid] = 1019; return 1;}
			else if(CP[playerid] == 1019)
			{
                        DisablePlayerCheckpoint(playerid); 
       			IgracPolaze[playerid] = 0;
		    	VoziloPolaze[playerid] = 0;
		    	new Float:Health; GetVehicleHealth(polaganjevozilo[playerid],Health);
		    	SetVehicleToRespawn(GetPlayerVehicleID(playerid));
	    		LinkVehicleToInterior(GetPlayerVehicleID(playerid), 0);
				SafeRemovePlayerFromVehicle(playerid);
		    	if(Health < 850)
		    	{
		    	    DisablePlayerCheckpoint(playerid);
		    	    CP[playerid] = 0;
					SCM(playerid,COLOR_WHITE,"Pali ste na polaganju jer ste ostetili automobil");
					return 1;
				}
				else
				{
				    DisablePlayerCheckpoint(playerid);
		    	    CP[playerid] = 0;
		    		PlayerInfo[playerid][pCarLic] = 1;
		    		SCM(playerid,COLOR_WHITE,"Zavrsili ste polaganje,dobili ste vozacku dozvolu!!");
		    		return 1;
		    	}
			}
		}
Hvala a mozes objasniti sta si izmijenio ovdje,jer sve mi je nekako isto,da razumijem


Re: [Help] /buydriving - Pajser - 10.06.2013

Help me please !