Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2013-10-17, 20:43


Rumun







Wiek: 30
Na forum: 5235 dni
Posty: 316
Nick w MP: Rumun

Piwa: 25

Respekt: 69

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. ;)

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-10-17, 20:49


Sillence







Wiek: 26
Na forum: 5157 dni
Posty: 1514
Nick w MP: Sillence

Piwa: 1517

Respekt: 416,3
Respekt: 416,3

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);
}


Postaw piwo autorowi tego posta
 

 
Tagi: anty
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » PAWN » [INNE] anty sh Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku