[FilterScript] Speedgun; excellent for RP servers!
#12

Quote:
Originally Posted by willsuckformoney
Посмотреть сообщение
pawn Код:
stock GetPlayerSpeed(playerid) //MPH
{
    new veh = GetClosestVehicle(playerid), pSpeed[MAX_PLAYERS];
    if (veh)
    {
        new Float:x,Float:y,Float:z/*,string[128]*/;
        GetVehiclePos(veh,x,y,z);
        //IsPlayerAimingAt(veh,x,y,z,25);
        new Float:speed_x,Float:speed_y,Float:speed_z,Float:final_speed,final_speed_int;
        GetVehicleVelocity(veh, speed_x, speed_y, speed_z);
        final_speed = floatsqroot(((speed_x*speed_x)+(speed_y*speed_y))+(speed_z*speed_z))*85.4166672; // 136.666667 = kmph  // 85.4166672= mph
        final_speed_int = floatround(final_speed,floatround_round);
        /*format(string,sizeof(string),"Speed: %i MPH",final_speed_int,2000);
        SendClientMessage(playerid,lightblue,string);*/

        pSpeed[playerid] = final_speed+int,2000;
    }
    return 1;
}
Something like that should work, that is not tested so I am not sure if it will work. Nice work with this.
thanks, im trying to fix my gamemode problems atm
Reply


Messages In This Thread
Speedgun; excellent for RP servers! UPDATED V2! - by WillyP - 28.10.2010, 18:26
Re: Speedgun; excellent for RP servers! - by Las Venturas CNR - 28.10.2010, 18:29
Re: Speedgun; excellent for RP servers! - by WillyP - 28.10.2010, 18:30
Re: Speedgun; excellent for RP servers! - by Las Venturas CNR - 28.10.2010, 18:32
Re: Speedgun; excellent for RP servers! - by WillyP - 28.10.2010, 18:35
Re: Speedgun; excellent for RP servers! - by Matej_ - 28.10.2010, 18:39
Re: Speedgun; excellent for RP servers! - by WillyP - 28.10.2010, 18:42
Re: Speedgun; excellent for RP servers! - by Luis- - 28.10.2010, 19:17
Re: Speedgun; excellent for RP servers! - by sten112 - 28.10.2010, 22:46
Re: Speedgun; excellent for RP servers! - by WillyP - 28.10.2010, 22:52
Re: Speedgun; excellent for RP servers! - by willsuckformoney - 28.10.2010, 23:11
Re: Speedgun; excellent for RP servers! - by WillyP - 28.10.2010, 23:18
Re: Speedgun; excellent for RP servers! - by Mr.Jvxmc - 29.10.2010, 00:01
Re: Speedgun; excellent for RP servers! - by Robert_Crawford - 29.10.2010, 00:18
Re: Speedgun; excellent for RP servers! - by WillyP - 29.10.2010, 01:04
Re: Speedgun; excellent for RP servers! - by oliver12 - 30.10.2010, 12:36
Re: Speedgun; excellent for RP servers! - by WillyP - 30.10.2010, 13:05
Re: Speedgun; excellent for RP servers! - by oliver12 - 30.10.2010, 13:56
Re: Speedgun; excellent for RP servers! - by WillyP - 30.10.2010, 15:03
Re: Speedgun; excellent for RP servers! - by Elviss - 30.10.2010, 15:06
Re: Speedgun; excellent for RP servers! - by Elviss - 30.10.2010, 15:18
Re: Speedgun; excellent for RP servers! - by WillyP - 30.10.2010, 15:20
Re: Speedgun; excellent for RP servers! - by oliver12 - 30.10.2010, 15:24
Re: Speedgun; excellent for RP servers! - by WillyP - 30.10.2010, 15:25
Re: Speedgun; excellent for RP servers! - by oliver12 - 30.10.2010, 15:46
Re: Speedgun; excellent for RP servers! - by WillyP - 30.10.2010, 16:48
Re: Speedgun; excellent for RP servers! - by MisterTickle - 30.10.2010, 19:45
Re: Speedgun; excellent for RP servers! - by wups - 04.11.2010, 17:21
Re: Speedgun; excellent for RP servers! - by WillyP - 04.11.2010, 17:26
Re: Speedgun; excellent for RP servers! - by juuleman - 22.11.2010, 15:29

Forum Jump:


Users browsing this thread: 4 Guest(s)