well guys I made an code but I get errors
here is the code:
Code:
GiveMoney(id)
{
new iMoney = cs_get_user_money(id);
if ( iMoney >= 16000 )
{
return PLUGIN_HANDLED;
}
else if ( iMoney < 16000 || iMoney > 11000 )
{
cs_set_user_money(id, 16000);
}
else if ( get_user_team(id) == 3 )
{
set_hudmessage(40, 60, 150, -1.0, 0.84, 0, 0.50, 0.50, 0.50, 0.50, 2);
show_hudmessage(id, "Spectators can't use this fuction");
}
else if ( is_user_alive(id) && !GiveMoney[id] && get_user_team(id) == 1 )
{
cs_set_user_money(id, cs_get_user_money (id) + 5000);
GiveMoney[id] = true;
}
else if ( GiveMoney[id] )
{
set_hudmessage(40, 60, 150, -1.0, 0.84, 0, 0.50, 0.50, 0.50, 0.50, 2);
show_hudmessage(id, "You already got you money on this map");
}
}
this is my warning:
warning 209: function "GiveMoney" should return a value
how can I fix? Thx
P.S: The only way of making givemoney = false is on change map.
P.S2: I just started getting errors after adding the red letters code