SA-MP Forums Archive
Auto-Kick - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Auto-Kick (/showthread.php?tid=83601)



Auto-Kick - [LNL]Remulis - 26.06.2009

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


Re: Auto-Kick - abhinavdabral - 26.06.2009

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



Re: Auto-Kick - [LNL]Remulis - 26.06.2009

it's freeroam you must hae weapons


Re: Auto-Kick - Stah - 26.06.2009

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.