Raised This Month: $ Target: $400
 0% 

+ commands


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Stormsys
Member
Join Date: Oct 2005
Old 10-16-2005 , 12:53   + commands
Reply With Quote #1

how exsaclty can a +command be used

so it keep repeating the function TestFunct, whenh the bind button is held down


thanks
Stormsys is offline
Zenith77
Veteran Member
Join Date: Aug 2005
Old 10-16-2005 , 13:05  
Reply With Quote #2

+commands repeat until you let go of the button.
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
Stormsys
Member
Join Date: Oct 2005
Old 10-16-2005 , 13:23  
Reply With Quote #3

yeh thats what i thought 2, but it ony semes to do the command once ....

do i use
register_concmd
or
register_clcmd
Stormsys is offline
broertje
Senior Member
Join Date: Mar 2005
Old 10-16-2005 , 13:38  
Reply With Quote #4

register_clcmd
broertje is offline
Stormsys
Member
Join Date: Oct 2005
Old 10-16-2005 , 13:46  
Reply With Quote #5

yreh just tryed it but same thiong it look like it6 ony repetes the function once so ...

i think unine /\ said, it just has +w/e once and tells the script to stop by -w/e, but how i make the function repeat ansd then stop
Stormsys is offline
broertje
Senior Member
Join Date: Mar 2005
Old 10-16-2005 , 13:48  
Reply With Quote #6

i dont understand,post the small(not that i can help,but can always try:d)
broertje is offline
Stormsys
Member
Join Date: Oct 2005
Old 10-16-2005 , 13:54  
Reply With Quote #7

Code:
        register_clcmd("+sshp_restore", "MB", ADMIN_LEVEL_F,"- gives an admin there 16000 money back")         register_clcmd("-sshp_restore", "MB", ADMIN_LEVEL_F,"- gives an admin there 16000 money back")

and the func
Code:
public MB(id) { if (!(get_user_flags(id)&ADMIN_LEVEL_F)) {         }else{         cs_set_user_money(id, 16000)     } }

ok then it sets it once, im still holding the button i press f1
at buyzone, it uses the money but dosent get it back to 16000 untill i let go(set it to do it once more then -command shows)

now is there i way i can have the function gooing in loops on a timer or somming untill -command to stop the loop
Stormsys is offline
broertje
Senior Member
Join Date: Mar 2005
Old 10-16-2005 , 14:02  
Reply With Quote #8

i'm not sure,but i have this...im going to try it out now,
Code:
#include <amxmodx> #include <amxmisc> #include <cstrike> #define PLUGIN "New Plugin" #define VERSION "1.0" #define AUTHOR "Author" public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)              register_clcmd("+sshp_restore", "MB", ADMIN_LEVEL_F,"- gives an admin there 16000 money back") } public MB(id) { if (!(get_user_flags(id)&ADMIN_LEVEL_F)) {           }else{         cs_set_user_money(id, 16000)       } }
broertje is offline
broertje
Senior Member
Join Date: Mar 2005
Old 10-16-2005 , 14:05  
Reply With Quote #9

works for me,
so bind a key to +sshp_restore and if you use that key you recieve 16000,is it that you want?
broertje is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 10-16-2005 , 14:10  
Reply With Quote #10

If you want a continuous use, you have to do something like this...

Code:
public plugin_init() {    register_clcmd("+command","command_start");    register_clcmd("-command","command_stop"); } public command_start(id) {    set_task(1.0,"money",id); } public command_stop(id) {    remove_task(id); } public money(id) {    cs_set_user_money(id,16000);    set_task(1.0,"money",id); }
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX 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 23:47.


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