PDA

View Full Version : Car coordinates!! +1Rep


PRototype-RP
22/12/2011, 06:10 PM
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.

PRototype-RP
22/12/2011, 08:32 PM
Heres the link http://www.youtube.com/watch?v=kJ-QwvUA7HE&list=UUdB6W8o1EH471G2tHwFtvog&index=1&feature=plcp

coole210
22/12/2011, 10:17 PM
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