GetPlayerFacingAngle ?!? - 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: GetPlayerFacingAngle ?!? (
/showthread.php?tid=618565)
GetPlayerFacingAngle ?!? -
qUneT - 07.10.2016
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?
Re: GetPlayerFacingAngle ?!? -
Luicy. - 07.10.2016
Mind showing us your code of saving it in your variable?
Re: GetPlayerFacingAngle ?!? -
qUneT - 07.10.2016
Код:
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
Re: GetPlayerFacingAngle ?!? -
Luicy. - 07.10.2016
So that's a /park? Then you have to check the vehicle's angle using GetVehicleZAngle(GetPlayerVehicleID(playerid)), Ai);
Re: GetPlayerFacingAngle ?!? -
qUneT - 07.10.2016
I tried, it just don't work properly
Edit: Done