/noclip or /fly
#5

I have a simpler solution. You can yourself lucky because I already scripted this function.

Код:
stock SetPlayerForwardVelocity(playerid,Float:Velocity, Float:Z1)
{
new Float:Getx1, Float:Gety1, Float:Getz1;
new Float:AngleZ1;
new Float:SpeedX1, Float:SpeedY1;
new Float:Mulx1, Float:Muly1;
GetPlayerVelocity(playerid, Getx1 ,Gety1 ,Getz1);
GetPlayerFacingAngle(playerid,AngleZ1);
SpeedX1 = floatsin(-AngleZ1, degrees);
SpeedY1 = floatcos(-AngleZ1, degrees);
Mulx1 = floatmul(Velocity, SpeedX1);
Muly1 = floatmul(Velocity, SpeedY1);
SetPlayerVelocity(playerid, floatadd(Mulx1,Getx1), floatadd(Muly1, Gety1), floatadd(Getz1, Z1));
return 1;
}
And for /fly:

Код:
return SetPlayerForwardVelocity(playerid,0.6, 0.4);
Reply


Messages In This Thread
/noclip or /fly - by grantism - 24.06.2012, 08:29
Re: /noclip or /fly - by Grand_Micha - 24.06.2012, 08:42
Re: /noclip or /fly - by McFellow - 24.06.2012, 09:08
Re: /noclip or /fly - by McFellow - 24.06.2012, 09:11
Re: /noclip or /fly - by Grand_Micha - 24.06.2012, 09:15

Forum Jump:


Users browsing this thread: 3 Guest(s)