anti tune hack - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: anti tune hack (
/showthread.php?tid=303101)
anti tune hack -
[LHT]Bally - 11.12.2011
how would i do a anti tune hack ?
i am making a antihack system and i want anti tune hack
but my server has garages where you can mod your vehicle so dont want players that are modding cars in the garages getting banned.
just wat the players using ****** to mod to be banned
Re: anti tune hack -
[MG]Dimi - 12.12.2011
pawn Код:
public OnVehicleMod(playerid, vehicleid, componentid)
{
new interior = GetPlayerInterior(playerid);
if(interior == 2 && IsPlayerInRangeOfPoint(playerid,15.0,616.7820,-74.815,997.6350)) return 1;//Loco Low
if(interior == 3 && IsPlayerInRangeOfPoint(playerid,15.0,615.2851,-124.2390,997.6350)) return 1; //Wheel Arch Angels
if(interior == 1 && IsPlayerInRangeOfPoint(playerid,15.0,617.5380,-1.9900,1000.6829)) return 1; //Transfender
BanEx(playerid,"Tune Hacks");
return 1;
}
public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
{
new interior = GetPlayerInterior(playerid);
if(interior == 2 && IsPlayerInRangeOfPoint(playerid,15.0,616.7820,-74.815,997.6350)) return 1;//Loco Low
if(interior == 3 && IsPlayerInRangeOfPoint(playerid,15.0,615.2851,-124.2390,997.6350)) return 1; //Wheel Arch Angels
if(interior == 1 && IsPlayerInRangeOfPoint(playerid,15.0,617.5380,-1.9900,1000.6829)) return 1; //Transfender
BanEx(playerid,"Tune Hacks");
return 1;
}
Maybe something like this?
Re: anti tune hack -
wildcookie007 - 12.12.2011
For not 100% accurate system you can detect if he is invehiclemodshop and set a variable inmodshop[playerid]=1; after that, you probably have a timer running checking for tune hack, put if(inmodshop[playerid] == 1) return 1; in the callback.
For 100% accurate system, theres a lot of explaining to do..
Re: anti tune hack -
Phanto90 - 12.12.2011
Quote:
Originally Posted by [MG]Dimi
pawn Код:
public OnVehicleMod(playerid, vehicleid, componentid) { new interior = GetPlayerInterior(playerid); if(interior == 2 && IsPlayerInRangeOfPoint(playerid,15.0,616.7820,-74.815,997.6350)) return 1;//Loco Low if(interior == 3 && IsPlayerInRangeOfPoint(playerid,15.0,615.2851,-124.2390,997.6350)) return 1; //Wheel Arch Angels if(interior == 1 && IsPlayerInRangeOfPoint(playerid,15.0,617.5380,-1.9900,1000.6829)) return 1; //Transfender BanEx(playerid,"Tune Hacks"); return 1; }
public OnVehiclePaintjob(playerid, vehicleid, paintjobid) { new interior = GetPlayerInterior(playerid); if(interior == 2 && IsPlayerInRangeOfPoint(playerid,15.0,616.7820,-74.815,997.6350)) return 1;//Loco Low if(interior == 3 && IsPlayerInRangeOfPoint(playerid,15.0,615.2851,-124.2390,997.6350)) return 1; //Wheel Arch Angels if(interior == 1 && IsPlayerInRangeOfPoint(playerid,15.0,617.5380,-1.9900,1000.6829)) return 1; //Transfender BanEx(playerid,"Tune Hacks"); return 1; }
Maybe something like this?
|
In this way people using ****** will just need to go to that location and use hacks.
I suggest managing Car mods server side by creating an array where you store vehicle's information for each slot (obviously you can't use transfenders or other, you should create a your own vehicle modding system, maybe in dialog because there is no way to check if player selected mods in garage or not)
Respuesta: Re: anti tune hack -
OPremium - 12.12.2011
Quote:
Originally Posted by Phanto90
In this way people using ****** will just need to go to that location and use hacks.
|
Hmm... What about using OnEnterExitModShop
pawn Код:
new bool:IsPlayerInModShop[MAX_PLAYERS];
public OnEnterExitModShop(playerid, enterexit, interiorid)
{
if(!enterexit) IsPlayerInModShop[playerid] = false;
else IsPlayerInModShop[playerid] = true;
return 1;
}
public OnVehicleMod(playerid, vehicleid, componentid)
{
if(!IsPlayerInModShop[playerid])
{
BanEx(playerid, "Tune Hack");
}
}
public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
{
if(!IsPlayerInModShop[playerid])
{
BanEx(playerid, "Tune Hack");
}
}