For example below, I have there if a player has nova which has less than 8 bullets in his clip, I want him to can not reload.
If there any ideas how can I do that? I searched the whole SP wiki for any command like this, but I could not find it :(
Thank you in advance!
Code: Select all
@Event('weapon_reload')
def weapon_reload(event):
userid = event['userid']
player = Player.from_userid(userid)
weapon = player.get_active_weapon()
checkgun = (weapon.item_definition_index)
nova = 35
result = (str('CAN NOT RELOAD'))
if checkgun == nova:
value = weapon.clip
If value < 7
#here I need to cancel reload...
print (result)