Thread: Block Button ID
View Single Post
maqi
Senior Member
Join Date: Apr 2017
Location: Serbia
Old 06-16-2018 , 17:20   Re: Block Button ID
Reply With Quote #9

I hope you understand what we are doing and not just copy pasting tho

Now, You read the file correctly, you wan't to check if a player pushed a button from your array right ?

You can't use g_iButtons[ButtonIDs], because ButtonIDs is just a counter ( You should change its name tho ), so if ButtonIDs == 3, You would just be getting iButtons[3], but in our example it would cause an index out of bounds error anyway.

So what you need to use is loop through all g_iButtons and check if any of them match.
__________________
stuff
maqi is offline