GetPlayerSpeed
#10

Paste it on top of the script:

pawn Код:
stock Float:GetPlayerSpeed(playerid, bool:KMH)
{
    new Float:Speed, Float:vX, Float:vY, Float:vZ;
    if(!IsPlayerInAnyVehicle(playerid)) GetPlayerVelocity(playerid, vX, vY, vZ);
    else GetVehicleVelocity(GetPlayerVehicleID(playerid), vX, vY, vZ);
    Speed = floatsqroot(((vX*vX)+(vY*vY))+(vZ*vZ));
    return KMH ? (Speed*100.0) : (Speed*62.1371);
}
Reply


Messages In This Thread
GetPlayerSpeed - by Dripac - 01.03.2012, 15:10
Re: GetPlayerSpeed - by iTorran - 01.03.2012, 15:25
Re: GetPlayerSpeed - by Dripac - 01.03.2012, 15:47
Re: GetPlayerSpeed - by milanosie - 01.03.2012, 15:50
Re: GetPlayerSpeed - by Dripac - 01.03.2012, 15:57
Re: GetPlayerSpeed - by Ballu Miaa - 01.03.2012, 16:04
Re: GetPlayerSpeed - by milanosie - 01.03.2012, 16:21
Re: GetPlayerSpeed - by Ballu Miaa - 01.03.2012, 16:24
Re: GetPlayerSpeed - by milanosie - 01.03.2012, 17:34
Re: GetPlayerSpeed - by iPLEOMAX - 01.03.2012, 19:21

Forum Jump:


Users browsing this thread: 8 Guest(s)