SA-MP Forums Archive
Car coordinates!! +1Rep - 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: Car coordinates!! +1Rep (/showthread.php?tid=305505)



Car coordinates!! +1Rep - PRototype-RP - 22.12.2011

How do i get coordinates for the back of a trashmaster and the roof of a police cars?? I will put a video of it in 10 min.


Re: Car coordinates!! +1Rep - PRototype-RP - 22.12.2011

Heres the link [ame="http://www.youtube.com/watch?v=kJ-QwvUA7HE&list=UUdB6W8o1EH471G2tHwFtvog&index=1&fea ture=plcp"]http://www.youtube.com/watch?v=kJ-QwvUA7HE&list=UUdB6W8o1EH471G2tHwFtvog&index=1&fea ture=plcp[/ame]


Re: Car coordinates!! +1Rep - coole210 - 22.12.2011

Try this:

Код:
new TrashMaster[MAX_PLAYERS]=-1;
public OnPlayerExitVehicle(playerid,vehicleid)
{
if(GetVehicleModel(vehicleid) == 508)
{
TrashMaster[playerid] = vehicleid;
}
else
{
TrashMaster[playerid] = -1;
}
}
//In a command:
if(TrashMaster[playerid] == -1) return SendClientMessage(playerid,color,"You don't have a trashmaster !");
new Float:Pos[3];
GetVehiclePos(TrashMaster[playerid],Pos[0],Pos[1],Pos[2]);
if(!IsPlayerInRangeOfPoint(playerid,5,Pos[0],Pos[1]-6,Pos[2])) return SendClientMessage(playerid,color,"You aren't close enough to the garbage dump point");
Untested