Jump to content
  • 0

pomoc Anti speed


RmT_Kjuba

Dotaz

čus dal jsem si do modu anti Speed hack a trošku upravil ale kdyz chcu zabudovat že když ma hrač hydru tak to pro nej neplati nejde to

 

 

public OnPlayerUpdate(playerid)

{

if(GetPlayerVehicleID(playerid) == 520) return 0;

if(IsPlayerConnected(playerid)) // Když je hráč připojenej

{

if(IsPlayerInAnyVehicle(playerid)) // Když je v autě

{

if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)

{

if(GetPlayerSpeed(playerid,true) > 320) // Když je rychlost větší jak 500

{

new string[128]; // nadefinujeme string

format(string,sizeof(string),"[ AntiCheat ] Hráč %s byl kicknut za [ SpeedHack/AIRBRK ]",Jmeno(playerid)); // Zformátujeme string že byl kickunt

SendClientMessageToAll(cervena,string); // Napíšeme všem string COLOR_BILA si změnte

Kick(playerid); // Kickneme hráče

}

}

}

}

 

return 1;

}

uz sem skousel i if(GetPlayerVehicleID(playerid) != 520) atp..ale proste nereaguje dik za pomoc

Link to comment
Share on other sites

10 odpovědí na tuto otázku

Recommended Posts

  • 0

to ale nebere ID modelu auta...ale cislo ktery bylo vozidlu prirazeny kdyz se vytvorilo...takze to nefunguje jenom pro auto ktery se vytvorilo jako 520.

Link to comment
Share on other sites

  • 0

if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 520) return 0;

Vehicleid je index auta v módu, stejně jako playerid

ID 520 (hydra) je Model id, index modelu

Teď by už mělo jet :v::boss:

 

//edit předběhli mě

Link to comment
Share on other sites

  • 0
Super.. Snad to funguje jen mám problém s jedním errorem

PS: Mám pawno 0.3

 

error 017: undefined symbol "GetPlayerSpeed"

 

Tak to by tu funkci musel mít pán nadefinovanou...

 

 

Dej si tohle pod include:

stock GetPlayerSpeed(playerid, bool:kmh)
{
   new Float:Vx,Float:Vy,Float:Vz,Float:rtn;
   if(IsPlayerInAnyVehicle(playerid)) GetVehicleVelocity(GetPlayerVehicleID(playerid),Vx,Vy,Vz); else GetPlayerVelocity(playerid,Vx,Vy,Vz);
   rtn = floatsqroot(floatabs(floatpower(Vx + Vy + Vz,2)));
   return kmh?floatround(rtn * 100 * 1.61):floatround(rtn * 100);
}

Link to comment
Share on other sites

  • 0
Super.. Snad to funguje jen mám problém s jedním errorem

PS: Mám pawno 0.3

 

error 017: undefined symbol "GetPlayerSpeed"

 

Tak to by tu funkci musel mít pán nadefinovanou...

 

 

Dej si tohle pod include:

stock GetPlayerSpeed(playerid, bool:kmh)
{
   new Float:Vx,Float:Vy,Float:Vz,Float:rtn;
   if(IsPlayerInAnyVehicle(playerid)) GetVehicleVelocity(GetPlayerVehicleID(playerid),Vx,Vy,Vz); else GetPlayerVelocity(playerid,Vx,Vy,Vz);
   rtn = floatsqroot(floatabs(floatpower(Vx + Vy + Vz,2)));
   return kmh?floatround(rtn * 100 * 1.61):floatround(rtn * 100);
}

 

Díky.. Skusil jsem, nefunguje.. Jel jsem 570 a nic :?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...