Raised This Month: $32 Target: $400
 8% 

Help with code.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
thEsp
BANNED
Join Date: Aug 2017
Old 10-05-2018 , 10:29   Help with code.
Reply With Quote #1

Hi peoples, I need an code that detects name of weapon that youre holding.
Im using current code:
Code:
	if(user_has_weapon(id,CSW_M4A1)){
		//Function
	}
But it does an function if player has weapon rather than if player is holding that weapon.
Can you help me with my code?

Ps im posting this thread in off-topic section. Because I know that if I posted this on Coding Help category, I would get comments like "Post all code", "Why do you need it?"... I just feel safer here

Thanks in advance

Last edited by thEsp; 10-05-2018 at 10:29.
thEsp is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 10-05-2018 , 10:45   Re: Help with code.
Reply With Quote #2

http://amxmodx.org/api/amxmodx/get_user_weapon

Quote:
Originally Posted by thEsp View Post
Ps im posting this thread in off-topic section. Because I know that if I posted this on Coding Help category, I would get comments like "Post all code", "Why do you need it?"... I just feel safer here
That really has nothing to do with where you are posting. The only reason why someone would request you to post more code is because you didn't initially provide enough code for someone to tell what is the problem with it.
__________________
klippy is offline
Old 10-05-2018, 10:50
thEsp
This message has been deleted by asherkin.
Old 10-05-2018, 10:54
thEsp
This message has been deleted by asherkin.
Old 10-05-2018, 11:07
klippy
This message has been deleted by asherkin.
Old 10-05-2018, 11:08
Relaxing
This message has been deleted by asherkin.
Old 10-06-2018, 14:28
OciXCrom
This message has been deleted by asherkin.
Old 10-06-2018, 16:43
thEsp
This message has been deleted by asherkin.
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 10-07-2018 , 06:01   Re: Help with code.
Reply With Quote #3

Quote:
Originally Posted by thEsp View Post
Ps im posting this thread in off-topic section.
Don't do that.
__________________
asherkin is offline
thEsp
BANNED
Join Date: Aug 2017
Old 10-07-2018 , 07:02   Re: Help with code.
Reply With Quote #4

Quote:
Originally Posted by asherkin View Post
Don't do that.
Sorry sir. But In help section there are just too many trollers.
- I apologize, thEsp
thEsp is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 10-07-2018 , 14:00   Re: Help with code.
Reply With Quote #5

Quote:
Originally Posted by thEsp View Post
Sorry sir. But In help section there are just too many trollers.
- I apologize, thEsp
If "trollers" bother you then you should stop posting on the internet. You just need to learn to ignore people who post trolling posts.

Asking for more code or asking why you need to do something is not trolling. It is often very important in helping determine what the proper solution to your problem is. It is extremely common for people to ask for one thing but actually want something entirely different (also known as the XY Problem).

Having said that, you can refuse to answer any question you like but it's often important to determine what you are actually trying to do to give you the best help possible. So, don't answer questions that you don't want to and simply wait for an answer. Do not post in another section on this website with the same question (it's generally the same people looking at the threads making it pointless to post it multiple times).

Back on-topic, did you get your problem solved with get_user_weapon() or do you still need help?
__________________

Last edited by fysiks; 10-07-2018 at 14:03.
fysiks is offline
thEsp
BANNED
Join Date: Aug 2017
Old 10-07-2018 , 15:37   Re: Help with code.
Reply With Quote #6

Quote:
Originally Posted by fysiks View Post
If "trollers" bother you then you should stop posting on the internet. You just need to learn to ignore people who post trolling posts.

Asking for more code or asking why you need to do something is not trolling. It is often very important in helping determine what the proper solution to your problem is. It is extremely common for people to ask for one thing but actually want something entirely different (also known as the XY Problem).

Having said that, you can refuse to answer any question you like but it's often important to determine what you are actually trying to do to give you the best help possible. So, don't answer questions that you don't want to and simply wait for an answer. Do not post in another section on this website with the same question (it's generally the same people looking at the threads making it pointless to post it multiple times).

Back on-topic, did you get your problem solved with get_user_weapon() or do you still need help?
Yes sir. I found help from plugins.
thEsp is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:59.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode