Auto-Kick
#1

Hi, I have try to make antiweapon, but it's does not work can someone gime what to put in my gamemode

with times 1sec auto kick?

Thanks
Reply
#2

If your game mode doent have any weapons so you can put a timer there and check that if anyone is having weapon or not... If he/she is having a weapon, the timer will auto-kick him/her..

Код:
forward CheckWeapon(); // Add this line after #include

public CheckWeapon(){ //// And this at the bottom of the page
new i;
for(i=0;i<=MAX_PLAYERS;i++){
 new weaponid;
 weaponid = GetPlayerWeapon(i);
 if(weaponid!=0) Kick(i);
}
return 1;
}


//And Add this line in OnGameModeInit()
SetTimer("CheckWeapon",1,1);
Thank You
-Abhinav
Reply
#3

it's freeroam you must hae weapons
Reply
#4

Quote:
Originally Posted by RemulisLTU
it's freeroam you must hae weapons
then just change:
pawn Код:
if(weaponid!=0) Kick(i);
to

pawn Код:
if(weaponid == GunID){ Kick(i);} // change GunID to the weapon id you wish to kick the player on.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)