SA-MP Forums Archive
I need this script - 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: I need this script (/showthread.php?tid=468115)



I need this script - Expert99 - 06.10.2013

How to create a script that I will do, that will be released in speed, eg 100 KM / H and when you exceed the speed limit will be fined or wanted by the police


Re: I need this script - DaRk_RaiN - 06.10.2013

Example:
pawn Код:
public OnPlayerUpdate( playerid )
{
    if(GetPlayerSpeed(playerid) > 100)
    {
        SendClientMessage(playerid,-1,"your speed is over 100!");
    }
    return 1;
}
stock GetPlayerSpeed( playerid )
{
    new Float:ST[4];
    GetVehicleVelocity(GetPlayerVehicleID( playerid ),ST[ 0 ],ST[ 1 ],ST[ 2 ] );
    ST[3] = floatsqroot(floatpower(floatabs(ST [ 0 ] ), 2.0 ) + floatpower(floatabs( ST[ 1 ] ), 2.0) + floatpower(floatabs(ST[2 ]), 2.0)) * 179.28625;
    return floatround(ST[3]);
}



Re: I need this script - Expert99 - 06.10.2013

oh thank


Re: I need this script - Expert99 - 08.10.2013

I need only in city