Is it possible to give just a empty weapon, no ammo?
#1

Like my title say, is it possible to make a cmd like /givegun and it will only give the gun, no ammo so you will get for example deagle but with 0 ammo.
Is this possible or will the weapon dissapear since it's out of ammo?
Reply
#2

https://sampwiki.blast.hk/wiki/SetPlayerAmmo

With that you can set the player's ammo
Reply
#3

Well there it said right away that setting the ammo to 0 will remove the weapon..
But is there someone who made an include/plugin or something like that to make this work?
Reply
#4

with a little bit of creative mind you could work around it and give the other player the object id (not the weaponid) instead of a weapon. So it would look like the other player has been given a weapon but in fact it is an attached object. If that player buys ammo the attached object/weapon could be replaced as its real weapon of the same model .

BUT...thats just an idea...


Edit: i have no knowledge of anyone making such an include
Reply
#5

No it's not possible.
Reply
#6

Quote:
Originally Posted by DaniceMcHarley
Посмотреть сообщение
No it's not possible.
Yup..but if he realy want it he could try out the idea i posted.
Reply
#7

Why being so crazy in your ideas ? (giving an empty model for example)

Just give a deagle with 1 ammo, put a variable on the player and then check under OnPlayerWeaponShot if the weaponid is deagle and if the player has the variable. If so, then just give one ammo back and if someone/thing was hit, refill the health.
Reply
#8

Quote:
Originally Posted by S4t3K
Посмотреть сообщение
Why being so crazy in your ideas ? (giving an empty model for example)

Just give a deagle with 1 ammo, put a variable on the player and then check under OnPlayerWeaponShot if the weaponid is deagle and if the player has the variable. If so, then just give one ammo back and if someone/thing was hit, refill the health.
Yea thats probably easyer ..well nvm the guy who started this topic can choose what to do now and thats why i replied in the first place.
Reply
#9

Quote:
Originally Posted by S4t3K
Посмотреть сообщение
Why being so crazy in your ideas ? (giving an empty model for example)

Just give a deagle with 1 ammo, put a variable on the player and then check under OnPlayerWeaponShot if the weaponid is deagle and if the player has the variable. If so, then just give one ammo back and if someone/thing was hit, refill the health.
I like your idea but also I don't like the fact that they have "infinite ammo" even though the health of everything it hits get resetted..
Is there any chanse that you can detect if a player shoot and then stop him before the shot is fired?
Reply
#10

Or you can just apply a reloading animation every time LMB/RMB is clicked when having a weapon equipped, no need to complicate things.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)