Wysłany: 2013-10-17, 20:43
Rumun
Wiek: 30 Na forum: 5235 dni Posty: 316
Nick w MP: Rumun
Piwa : 25
Witam.Mam problem z anty speed hackiem.Gdy wsi?dziemy do pojazdu od razu jest ban.Oto kod.
Kod:
public OnPlayerUpdate(playerid)
{
if(IsPlayerInAnyVehicle(playerid) && GetPlayerVehicleSpeed(playerid)>700)
{
new string[256];
format(string,128,"Gracz %s zosta? zbanowany.Pow?d: Speed Hack.",PlayerName(playerid));
SendClientMessageToAll(-1,string);
format(string,sizeof(string),"Zosta?e?/a? zbanowany/a.Pow?d: Speed Hack." );
SendClientMessage(playerid, 0xffffffff,string);
SetTimerEx("banEx", 500, false, "d", playerid);
}
return 1;
}
forward Float:GetPlayerVehicleSpeed(playerid);
Float:GetPlayerVehicleSpeed(playerid)
{
new Float:Vx,Float:Vy,Float:Vz;
GetVehicleVelocity(GetPlayerVehicleID(playerid),Vx,Vy,Vz);
return floatmul(floatmul(floatsqroot(floatpower(floatabs(Vx),2)+floatpower(floatabs(Vy),2)+floatpower(floatabs(Vz),2)),100),1.61);
}
Za pomoc piwko i respekt.
Wysłany: 2013-10-17, 20:49
Sillence
Wiek: 26 Na forum: 5157 dni Posty: 1514
Nick w MP: Sillence
Piwa : 1517
Rumun , Zobacz ten kod:
Kod: public OnPlayerUpdate(playerid)
{
if(GetVehicleSpeed(GetPlayerVehicleID(playerid)) > 700)
{
new string[256];
format(string,128,"Gracz %s zosta? zbanowany.Pow?d: Speed Hack.",PlayerName(playerid));
SendClientMessageToAll(-1,string);
format(string,sizeof(string),"Zosta?e?/a? zbanowany/a.Pow?d: Speed Hack." );
SendClientMessage(playerid, 0xffffffff,string);
SetTimerEx("banEx", 500, false, "d", playerid);
}
return 1;
}
stock GetVehicleSpeed(vehicleid)
{
new Float:xPos[3];
GetVehicleVelocity(vehicleid, xPos[0], xPos[1], xPos[2]);
return floatround(floatsqroot(xPos[0] * xPos[0] + xPos[1] * xPos[1] + xPos[2] * xPos[2]) * 170.00);
}
Tagi: anty
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: