Quote:
Originally Posted by Blizzard_87
another way of doing it is to make a stock...
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
}
cs_set_user_money( id, money - cost )
return PLUGIN_HANDLED;
}
not 100% sure ive done it right as I'm only going off what you showed in your code.
|
Actually, it isnt code that I need. The
command that I meant is already coded. So SetGlow(id, 1) is used to set glow of player to 1 (coded color). So I need to add coded command to this command and execute it at the if(). Like: func_money(id, 10 (if user have 10 money), -10 (set user money -10), SetGlow(id, 1) or other command - this is the command to execute at specified place in code) So that.