I am using old phone because my new one is dead xD
So i have Android 2.3.3 and i cant scroll the code, when i can use pc i will see it.
You can add boolean to player and in that way stop user spamming and clicking agin.
Yes there is more efficent ways but this first fell on top of my mind, i have to study so i am bored and lazy to thing about it for longer time
For example:
Code:
...
if( IsAimingAtEnt( id, "..." ) && !ClickedButton[ id ] ) {
//do your stuff
ClickedButton[ id ] = true;
}
//if you want to turn it to switch
else if( IsAimingAtEnt( id, "..." ) && ClickedButton[ id ] ) {
//agin do your stuff
ClickedButton[ id ] = false;
}