Raised This Month: $ Target: $400
 0% 

Moneyblock Action, help please!


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
lukasdaman
Junior Member
Join Date: Dec 2009
Old 09-28-2012 , 09:47   Moneyblock Action, help please!
Reply With Quote #1

This is the actioncode I'm using made by Carlen20:

ActionMoney(id, ent)
{
if ( cs_get_user_team(id) == CS_TEAM_T )
{
if ( !g_cash_used[id] )
{
emit_sound(id, CHAN_STATIC, g_sound_money, 1.0, ATTN_NORM, 0, PITCH_NORM);
new property[5];
GetProperty(ent, 1, property);

cm_set_user_cash(id, cm_get_user_cash(id) + str_to_num(property));
cm_cash_used[id] = true;

set_hudmessage(0, 255, 0, 0.01, 0.18, 0, 0.0, 1.0, 0.25, 0.25, 2);
show_hudmessage(id, "You got %i more Money!", str_to_num(property));
}
}

But I get this error when compiling:

/tmp/textDEjy2S.sma(2083) : error 017: undefined symbol "g_cash_used"
/tmp/textDEjy2S.sma(2083) : warning 215: expression has no effect
/tmp/textDEjy2S.sma(2083) : error 001: expected token: ";", but found "]"
/tmp/textDEjy2S.sma(2083) : error 029: invalid expression, assumed zero
/tmp/textDEjy2S.sma(2083) : fatal error 107: too many error messages on one line

Compilation aborted.
4 Errors.

Anyone got the brainpower I don't have to fix it?


If it's of any use I use these natives:

native cm_get_user_cash(client);

native cm_set_user_cash(client, cash);

stock cm_add_user_cash(client, cash)
{
return cm_add_user_cash(client, cm_get_user_cash(client) + cash);
}
stock cm_sub_user_cash(client, cash)
{
return cm_set_user_cash(client, cm_get_user_cash(client) - cash);
}
lukasdaman is offline
 



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 08:21.


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