[HELP] Better description of some natives
get_user_weapons(iPlayer, iWeapons, iNum)
get_weaponid(szWeaponName) What these two actually retrieve ? the weapon index ( CSW_* ) or the entity index ? |
Re: [HELP] Better description of some natives
Code:
Code:
get_user_weapons returns every weapon player owns as bitsum (1<<CSW_KNIFE) and get_weaponid returns the weapon ID (CSW_KNIFE) |
Re: [HELP] Better description of some natives
Any idea how you write this without a stock ?
PHP Code:
PHP Code:
|
Re: [HELP] Better description of some natives
What exactly are you trying to do? I don't see anything wrong with that fm_find_ent_by_owner() function you provided.
|
Re: [HELP] Better description of some natives
Quote:
No 💡 |
Re: [HELP] Better description of some natives
Eh, missed some brackets/what ever initially, figured it out, mostly..
Sorry for newbie questions, i have a hobby lately of learning how every line of code works Here is what i came up with so far, if anyone has any idea how to make it more compact for readability, i'm all ears.. PHP Code:
|
Re: [HELP] Better description of some natives
What's wrong with using find_ent_by_owner?
|
Re: [HELP] Better description of some natives
Quote:
|
Re: [HELP] Better description of some natives
I wanted to make it more compact, without using a stock.. mainly because i want to learn more and also because i'm working on a big project which i plan to make in on single file, so making things more compact/simple would be better ( ex, no 100 function communication )
I also have this problem while coding, called symmetry obsession, it's like a cancer, haha |
Re: [HELP] Better description of some natives
But functions are good for reusability. There's never rnough functions, splitting logic is good. Functions actually make code simpler.
|
| All times are GMT -4. The time now is 17:54. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.