Anti Nitro Hack
#4

For ex. you can set timer which will controll every car occupied by an player, define it's ID into variable and controll if the car has or hasn't got a nitro. If hasn't - Nitro = 0;, if has a Nitro, and previously it was 0 and is not in around Transfender, he's hacking.
Something like that:

Код:
new Nitro[MAX_PLAYERS];
new pCar[MAX_PLAYERS]; (players car)

//OnPlayerConnect
Nitro[playerid] = 0; pCar[playerid] = 0;

//OnGameModeInit
SetTimer("Check", 5000, 1);

public Check() {
	for(new i=0;i<MAX_PLAYERS;i+=1) {
	    if(IsPlayerConnected(i)) {
	        if(IsPlayerInAnyVehicle(i))
	        {
	            if(GetPlayerVehicleID(playerid) == pCar[i]) {
	                if(Nitro[i] == 0 && GetVehicleComponentInSlot(pCar[i], GetVehicleComponentType(1010)) == 1010) {
	                    if(!IsPlayerInRange(i, TRANSFENDR POSITIONS))
	                    {
	                        //Is Hacking
		                    SendClientMessage(i, #FFFFFF, 'You suck man!');
		                    Kick(i);
	                    } else { Nitro[i] = 1; }
	                }
	            }
	            else {
	                pCar[i] = GetPlayerVehicleID(i);
					if(GetVehicleComponentInSlot(pCar[i], GetVehicleComponentType(1010)) == 1010)
					{
						Nitro[i] = 1;
					}
					else {
						Nitro[i] = 0;
					}
	            }
	        }
	    }
	}
}
Reply


Messages In This Thread
Anti Nitro Hack - by Unknown123 - 22.02.2011, 12:25
Re: Anti Nitro Hack - by admantis - 22.02.2011, 12:29
Re: Anti Nitro Hack - by Unknown123 - 22.02.2011, 12:34
Re: Anti Nitro Hack - by Homerman - 22.02.2011, 12:39
Re: Anti Nitro Hack - by Unknown123 - 22.02.2011, 13:21
Re: Anti Nitro Hack - by Homerman - 22.02.2011, 13:25
Re: Anti Nitro Hack - by Unknown123 - 22.02.2011, 13:29

Forum Jump:


Users browsing this thread: 4 Guest(s)