Raised This Month: $ Target: $400
 0% 

Call command under if of other command


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 04-23-2013 , 07:25   Re: Call command under if of other command
Reply With Quote #1

Code:
stock func_money( id, cost, const command[] ) {     new money = cs_get_user_money(id);         if( money < cost )     {         NoMoney(id)         return PLUGIN_HANDLED;     }         if( equal(command, "SetGod" ) // example: func_money( id, 200, "SetGod" )     {         set_user_godmode( id, 1 ) // execute command here           }     if( equal(command, "SetGlow" ) // example: func_money( id, 250, "SetGlow" )     {         SetGlow( id, 1 ) // Execute Set Glow Here.     }         cs_set_user_money( id, money - cost )         return PLUGIN_HANDLED; }

you can add as many commands in this stock how ever many commands or items you require.

and the command is getting executed in a if().

i dont understand what your last post was trying to say...
__________________
Blizzard_87 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 10:45.


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