Anti kill help
#2

anti-car kill:

make a timer. Which will count every 500 millseconds. Under ongamemodeinit:

for(new i = 0; i < MAX_PLAYERS; i++)
{
SetTimerEx("godforvehicle",500,false,"d", i);
}

and then something like:

Quote:

/*public godforvehicle(playerid)
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 511) // for vehicle model 511 anti kill.
{
GetVehicleHealth(vehicle, vehiclehealth);
if(vehiclehealth < 1000)
{
RepairVehicle(vehicle);
}
}
return 1;
}

Anti teamkill: SetPlayerTeam (look at wiki).

anti spawnkill: you can use godmode for like 9 seconds, SetPlayerHealth(playerid, 999999999); and then in a public function of the timer, you set the health back to 100. use SetTimerEx(" your public function ", 9000, false, "d", playerid);
Reply


Messages In This Thread
Anti kill help - by [WTF]Godfather - 25.02.2011, 12:37
Re: Anti kill help - by Baboon - 25.02.2011, 12:52
Re : Anti kill help - by [WTF]Godfather - 25.02.2011, 12:58

Forum Jump:


Users browsing this thread: 1 Guest(s)