09.05.2014, 06:38
You have an other solution.
Like me, you can use the " OnPlayerKeyStateChange() " and you make this define and this condition :
Like me, you can use the " OnPlayerKeyStateChange() " and you make this define and this condition :
PHP код:
#define KEY_AIM KEY_HANDBRAKE
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys == KEY_FIRE || newkeys == KEY_AIM) // If the player aims or shoots
{
new weaponid = GetPlayerWeapon(playerid);
if(weaponid == 38) // Minigun is Weapon ID 38
{
ResetPlayerWeapons(playerid);
// Here you ban the player.
return 1;
}
}
return 1;
}

