22.02.2011, 12:39
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:
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; } } } } } }