К #define
Код
#define Kick.(%0) SetTimerEx("OnPlayerKick",100,false,"i",%0)
К new
Код
new FP_Ammo_Reloading[MAX_PLAYERS][2];
new FP_Player_Warns_Ammo_Reloading[MAX_PLAYERS];
К forward
Код
forward OnPlayerKick(playerid);
В OnPlayerSpawn
Код
SetPVarInt(playerid,"FP_Protection",1);
В OnPlayerWeaponShot
Код
if(!IsPlayerNPC(playerid)&&GetPVarInt(playerid,"FP_Protection")==1){
FP_Ammo_Reloading[playerid][0]=GetPlayerAmmo(playerid);
if(FP_Ammo_Reloading[playerid][0]==FP_Ammo_Reloading[playerid][1]){
switch(GetPlayerWeapon(playerid)){
case 0,1,2,3,4,5,6,7,8,10,11,12,13,14,15,40,44,45,46:{
FP_Ammo_Reloading[playerid][1]=FP_Ammo_Reloading[playerid][0];
FP_Player_Warns_Ammo_Reloading[playerid]=0;
return 1;
}
}
FP_Player_Warns_Ammo_Reloading[playerid]++;
if(FP_Player_Warns_Ammo_Reloading[playerid]>5){
SendClientMessage(playerid,0xFFFFFFff,"У тебя пули не кончаются и ты был кикнут");
Kick.(playerid);
}
}else{
FP_Ammo_Reloading[playerid][1]=FP_Ammo_Reloading[playerid][0];
FP_Player_Warns_Ammo_Reloading[playerid]=0;
}
}
В конец мода
Код
public OnPlayerKick(playerid)
{
Kick(playerid);
}
Автор: Tracer
Выложил: ExPRO для www.cheat-master.ru