SA-MP Forums Archive
Kick for minigun etc. - 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)
+--- Thread: Kick for minigun etc. (/showthread.php?tid=382881)



Kick for minigun etc. - Ernestas_ - 05.10.2012

Код:
public OnPlayerUpdate(playerid)
{
	if(GetPlayerWeapon(playerid) == 344 || GetPlayerWeapon(playerid) == 359 || GetPlayerWeapon(playerid) == 360 || GetPlayerWeapon(playerid) == 361 || GetPlayerWeapon(playerid) == 362 ){
		Kick(playerid);
	    SendClientMessage(playerid, COLOR_ORANGE, "* Buvai iрkickintas uю neleistinus ginklus!");
	}
	return 1;
}
What's wrong with this?


Re: Kick for minigun etc. - Smally - 05.10.2012

Explain what happens...


Re: Kick for minigun etc. - Kyle - 05.10.2012

Those weapon id's are incorrect.

Use this for the id: https://sampwiki.blast.hk/wiki/Weapons

Edit: I see you used the Object Model ID instead of the ID. Also it's not wise to put it under OnPlayerUpdate. I would suggest a timer every 2 seconds.