Raised This Month: $ Target: $400
 0% 

Entity Use (Like a button)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
milutinke
AlliedModders Donor
Join Date: Jun 2012
Location: Serbia
Old 10-21-2015 , 09:55   Re: Entity Use (Like a button)
Reply With Quote #1

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;
}
milutinke is offline
Send a message via Skype™ to milutinke
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 22:18.


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