[HELP] I made a CMD /park
#2

Yes.. your code makes no sense at all.. VehX, VehY, VehZ.. they're global variables but they're not arrays - therefore they will just assume the same value for the last car that was parked, erasing earlier data.. you use GetPlayerPos when you should be using GetVehiclePos for accuracy, same with GetVehicleZAngle instead of GetPlayerFacingAngle, and while we're at it you could do this
pawn Код:
new vid = GetPlayerVehicleID(playerid);

GetVehiclePos(vid, VehX[vid], VehY[vid], VehZ[vid]);
GetVehicleZAngle(vid, vehAng[vid]);
Apart from that you only check if the player is in any vehicle, and if that vehicle is owned by anyone, you'll need to verify that the player owns the vehicle, and that he is currently driving it
Reply


Messages In This Thread
[HELP] I made a CMD /park - by Castle - 17.03.2009, 13:21
Re: [HELP] I made a CMD /park - by [RP]Rav - 17.03.2009, 14:20
Re: [HELP] I made a CMD /park - by Castle - 17.03.2009, 14:23
Re: [HELP] I made a CMD /park - by [RP]Rav - 17.03.2009, 14:27
Re: [HELP] I made a CMD /park - by Castle - 17.03.2009, 14:36
Re: [HELP] I made a CMD /park - by [RP]Rav - 17.03.2009, 14:44
Re: [HELP] I made a CMD /park - by Castle - 17.03.2009, 15:03

Forum Jump:


Users browsing this thread: 2 Guest(s)