Anti kill help
#1

Well as you see on my signature im working on a gm to share it to samp people
But i got a problem
How to make an a anti-car kill, and anti team kill, and of course anti spawn kill
Thanks
Reply
#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
#3

Anti car kill is like a player kill another player with his car i want an anti of this
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)