SA-MP Forums Archive
[FilterScript] Speedgun; excellent for RP servers! - 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: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] Speedgun; excellent for RP servers! (/showthread.php?tid=186339)

Pages: 1 2


Re: Speedgun; excellent for RP servers! - Elviss - 30.10.2010

Bugg all player can sea thes speed
Please report thes


Re: Speedgun; excellent for RP servers! - WillyP - 30.10.2010

Quote:
Originally Posted by Elviss
Посмотреть сообщение
Bugg all player can sea thes speed
Please report thes
thats not a bug..


Re: Speedgun; excellent for RP servers! - oliver12 - 30.10.2010

That's better, but in V2 are 3 Bug's.


Re: Speedgun; excellent for RP servers! - WillyP - 30.10.2010

Quote:
Originally Posted by oliver12
Посмотреть сообщение
That's better, but in V2 are 3 Bug's.
tell me

8char


Re: Speedgun; excellent for RP servers! - oliver12 - 30.10.2010

1.That's what Elviss Say(If it isn't a bug, then OK)
2.Even if Policeman is in LS and the racer is in SF, policeman can still know racer's speed.
3. I forgot
(I tell last bugg later)
Sorry for very bad English


Re: Speedgun; excellent for RP servers! - WillyP - 30.10.2010

reason 2 is invalid


Re: Speedgun; excellent for RP servers! - MisterTickle - 30.10.2010

How would I go about making it so if a vehicle isn't close by it doesn't check the speed cause just some normal aiming it keeps displaying the speed even if you're not aiming at a vehicle


Re: Speedgun; excellent for RP servers! - wups - 04.11.2010

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.
What if i want to aim at a vehicle that is not the closest one? For example i get out of a car, and aim at a player. I will still see my vehicle speed.


Re: Speedgun; excellent for RP servers! - WillyP - 04.11.2010

Quote:
Originally Posted by wups
Посмотреть сообщение
What if i want to aim at a vehicle that is not the closest one? For example i get out of a car, and aim at a player. I will still see my vehicle speed.
In V3 It's got a fix for that. I'll be doing it soon, I'm coding for other people ATM.


Re: Speedgun; excellent for RP servers! - juuleman - 22.11.2010

Nice one!