SA-MP Forums Archive
Problem with PNS system - 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: Problem with PNS system (/showthread.php?tid=615579)



Problem with PNS system - InvictusRO - 24.08.2016

I have a problem with my PNS system.
Afeter you enter in PNS it should take your money and put in bizz balance but it don't do this. It only repairs your car.
Код HTML:
 if(IsPlayerInRangeOfPoint(playerid,15.0,1025.0671,-1023.7895,32.1016))
	{
	    GetVehicleHealth(carid, health);
	    if(health == 1000.0)
	    {
			Cash[playerid] -= BizzInfo[36][bEntranceCost];
			Update(playerid, pCashx);
			BizzInfo[36][bTill] += BizzInfo[36][bEntranceCost];
			new str[128];
			mysql_format(SQL,str,sizeof(str),"UPDATE `bizz` SET `Till`='%d' WHERE `ID`='36'",BizzInfo[36][bTill]);
			mysql_tquery(SQL,str,"","");
			format(string,sizeof(string),"~r~-%d$", BizzInfo[36][bEntranceCost]);
   			GameTextForPlayer(playerid, string, 5000, 1);
			return 1;
		}
	}



Re: Problem with PNS system - InvictusRO - 25.08.2016

bump up


Re: Problem with PNS system - Kwarde - 26.08.2016

I don't see a RepairVehicle() function, so something else is causing that.
Also, are you checking to be entering an area? Is it under OnPlayerUpdate?
Also:
forum.sa-mp.com/showthread.php?t=229423