bug in my park command?
#1

hi, i made that command:
Код:
if(!strcmp(cmd, "/parkcar", true))
	{
	    if(!dini_Int(GetFile(playerid), "HaveCar")) return SendClientMessage(playerid,red,"You dont have car");
	    if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,red,"You are not in a car");
		if(vehicleid != CarID(playerid)) return SendClientMessage(playerid,red,".This is not your car");
		
		new Float:X,Float:Y,Float:Z,Float:A;
		GetVehiclePos(vehicleid, X, Y, Z);
		GetVehicleZAngle(vehicleid, A);
		dini_FloatSet(VFile(vehicleid), "ParkX", X);
		dini_FloatSet(VFile(vehicleid), "ParkY", Y);
		dini_FloatSet(VFile(vehicleid), "ParkZ", Z);
		dini_FloatSet(VFile(vehicleid), "ParkA", A);
		SetVehicleToRespawn(vehicleid);
		
		SendClientMessage(playerid,lgreen,".You parked your car");
	    return 1;
	}
and in OnVehicleSpawn:
Код:
if(dini_Float(VFile(vehicleid), "ParkX"))
	{
		SetVehiclePos(vehicleid, dini_Float(VFile(vehicleid), "ParkX"), dini_Float(VFile(vehicleid), "ParkY"), dini_Float(VFile(vehicleid), "ParkZ"));
		SetVehicleZAngle(vehicleid, dini_Float(VFile(vehicleid), "ParkA"));
	}
It is spawning the car in the X, Y, but the Angle is messed up it goes to other direction about 78 degrees..
How can i fix it?
Reply


Messages In This Thread
bug in my park command? - by ben4uka - 31.07.2014, 11:09
Re: bug in my park command? - by Jack_Leslie - 31.07.2014, 12:21
Re: bug in my park command? - by ben4uka - 31.07.2014, 12:23
Re: bug in my park command? - by Jack_Leslie - 31.07.2014, 12:26
Re: bug in my park command? - by ben4uka - 31.07.2014, 12:28
Re: bug in my park command? - by Jack_Leslie - 31.07.2014, 12:30
Re : bug in my park command? - by ManuelNeuer - 31.07.2014, 12:32
Re: bug in my park command? - by Clad - 31.07.2014, 12:42
Re: bug in my park command? - by ben4uka - 31.07.2014, 12:46
Re: bug in my park command? - by Clad - 31.07.2014, 12:54

Forum Jump:


Users browsing this thread: 7 Guest(s)