Need help
#1

need help,I have failed on this script can someone help me
Код:
 if(IsPlayerInAnyVehicle(playerid))
     	{
     	    if(GetVehicleSpeed(playerid) > 200)
     	    {
     	        TogglePlayerControllable(playerid, false);
                SetPlayerPos(playerid, 1941.1534,-1100.2391,-23.7885);
                ShowPlayerDialog(playerid, DIALOG_PRAVILA,DIALOG_STYLE_MSGBOX,"Anti-Hack", "{FFCC00}[Anticheat]"WHITE"[Anti-Cheat] You Have Been Banned for using Speed	Hack!!!","Ok","");
                BanEx(playerid, "Speed Hack");
			}
		}
Код:
stock GetVehicleSpeed(playerid)
{
    new Float:ST[4];
    if(IsPlayerInAnyVehicle(playerid))
    GetVehicleVelocity(GetPlayerVehicleID(playerid),ST[0],ST[1],ST[2]);
    else GetPlayerVelocity(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)) * 178.8617875;
    return floatround(ST[3]);
}
Reply
#2

On my own include, I use this method:

PHP код:
stock Float:getPlayerSpeed(playerid)
{
    new 
Float:xFloat:yFloat:z;
    if(
IsPlayerInAnyVehicle(playerid))
    {
        
GetVehicleVelocity(GetPlayerVehicleID(playerid), xyz);
        return (
floatsqroot(z) * 180.00);
    }
    
    return 
0.0;

and works.
Reply
#3

Thx,You help me today about this: https://sampforum.blast.hk/showthread.php?tid=571710
and now about this +REP
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)