PDA

View Full Version : Kick for minigun etc.


Ernestas_
05/10/2012, 02:38 PM
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?

Smally
05/10/2012, 02:39 PM
Explain what happens...

Kyle
05/10/2012, 02:40 PM
Those weapon id's are incorrect.

Use this for the id: http://wiki.sa-mp.com/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.