Posts: 498
Threads: 233
Joined: Aug 2013
Reputation:
0
Well i have made a code under this OnPlayerChangeWeapon ,it works but i found a bug,it is that I have made 2 codes,each code for 1 weapon,like 1 code for deagle and 1 for shotgun,lets say i have a deagle and a shotgun in my hands ,if i change from any gun expect for shotgun to deagle it will do deagle's code,and when i change to shotgun it does shotgun's code,but when i change from shotgun to deagle,deagle code happens and then shotgun code comes after it and bugs the deagle's code,because for each weapon there is a turn on and a turn off,so when i turn on deagle shotgun turns it off because under onplayerchangeweapon deagle's code happens before shtogun's,how is it possible to fix it?
Posts: 214
Threads: 18
Joined: Oct 2014
Reputation:
0
It is not possible for us to fix it without seeing the code. However, have you tried returning 1 or 0; after deagle's code? By doing this the code under it won't be called.
Posts: 498
Threads: 233
Joined: Aug 2013
Reputation:
0
What do you mean,well,when i change from deagle to shotgun it runs the code and when i change from shotgun to deagle it runs deagle code again then shotgun's code again because it's under it
Posts: 1,547
Threads: 122
Joined: Jun 2014
Reputation:
0
keeping us in the dark wont help mate.
care to show the code like deadpool said? and also explain in detail xD
Posts: 498
Threads: 233
Joined: Aug 2013
Reputation:
0
if you really cant understand my problem then you gotta learn english,i have explained everything and btw fixed.