21.04.2015, 17:24
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]); }