SA-MP Forums Archive
Help with gps - 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: Help with gps (/showthread.php?tid=162039)



Help with gps - gupey1984 - 22.07.2010

I need help with gps to fine your car this dont work

Код:
else if(strcmp(x_nr,"gps1",true) == 0)
	        {
                if(PlayerInfo[playerid][pPcarkey])
                {
                        new Float:X,Float:Y,Float:Z;
		                SetPlayerCheckpoint(playerid, X,Y,Z,5);
                        GetVehiclePos(pPcarkey, X,Y,Z);
                        return 1;
                }
	          }



Re: Help with gps - MisterTickle - 22.07.2010

Shouldn't SetPlayerCheckpoint(playerid, X,Y,Z,5); be after you get the Vehicle Position like this

Код:
else if(strcmp(x_nr,"gps1",true) == 0)
	        {
                if(PlayerInfo[playerid][pPcarkey])
                {
                        new Float:X,Float:Y,Float:Z;
                        GetVehiclePos(pPcarkey, X,Y,Z);
		        SetPlayerCheckpoint(playerid, X,Y,Z,5);
                        return 1;
                }
	          }



Re: Help with gps - gupey1984 - 22.07.2010

It didnt work


Re: Help with gps - Carlton - 22.07.2010

pawn Код:
else if(strcmp(x_nr,"gps1",true) == 0) {
   if(PlayerInfo[playerid][pPcarkey])
   {
         new Float:X,Float:Y,Float:Z;
         GetVehiclePos(PlayerInfo[playerid][pPcarkey], X,Y,Z);
     SetPlayerCheckpoint(playerid, X,Y,Z,5);
         return 1;
   }
}



Re: Help with gps - gupey1984 - 22.07.2010

Thank you that works