Setting weapon ammo
Hi there, i need your help now.
Lets look at my menu's case 4(which give glock). PHP Code:
So i've succesfully gave myself a nice glock18. Also successfully set my back pack ammo to 0. But when i try to set the weapons, hmm primary ammo?, it spits an error whilst in debug. Look: Code:
[AMXX]Run time error 10: native error (native "cs_set_weapon_ammo") |
Re: Setting weapon ammo
Insert "engine" module.
PHP Code:
|
Re: Setting weapon ammo
You have to pass the weapon entity index, not the player index.
PHP Code:
|
Re: Setting weapon ammo
@ master 4 life
Thanks! Since im sort of newbie(just bout month of coding and only 1 plugin of 1 approved), i dont use engine and i certainly don't know anything about engine commands. I prefer i shall learn it. Again thanks a lot :) @ connor Your way is better i guess in some cases, but i prefer master4life's way: [+] Shorter code [+] Simplier [-] Extra module usage And your code: [+] Single-module usage(non cstrike + engine) [-] Bit longer Again THANKS EVERYONE! |
Re: Setting weapon ammo
Quote:
|
Re: Setting weapon ammo
master4life's code uses 1 more native, and i'm not sure it's safe.
|
| All times are GMT -4. The time now is 07:26. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.