GetPlayerFacingAngle ?!?
#1

Hi there, is a problem with GetPlayerFacingAngle or i'm just idiot?

Here's the problem, GetPlayerFacingAngle is not updating, i need to enter an exit a vehicle for it to update, what's the problem?
Reply
#2

Mind showing us your code of saving it in your variable?
Reply
#3

Код:
DestroyVehicle(id);
	new Float:Ai;
	GetPlayerFacingAngle(playerid, Ai);
	
	GetPlayerFacingAngle(playerid, Ai);
	CarsInfo[id][cSpawnA] = Ai;
	new string2[125];
	format(string2,sizeof(string2),"%f",Ai);
	SendClientMessage(playerid,-1,string2);
	
	OwnedCarID[id] = CreateVehicle(CarsInfo[id][cModel], CarsInfo[id][cSpawnX], CarsInfo[id][cSpawnY], CarsInfo[id][cSpawnZ], Ai, CarsInfo[id][cColor1], CarsInfo[id][cColor2], -1);
It's a /park command, if i type /park, it works, but if I type again in another angle it give's me the old angle, i need to exit and enter again form the vehicle to work properly

Edit: I just made a command

Код:
CMD:fang(playerid,params)
{
    new Float:Ai;
	GetPlayerFacingAngle(playerid, Ai);
	new string2[125];
	format(string2,sizeof(string2),"%f",Ai);
	SendClientMessage(playerid,-1,string2);
	return 1;
}
it seems in a vehicle the angle don't update, hmm, i have an idea
Reply
#4

So that's a /park? Then you have to check the vehicle's angle using GetVehicleZAngle(GetPlayerVehicleID(playerid)), Ai);
Reply
#5

I tried, it just don't work properly

Edit: Done
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)