Maybe is because you haven't defined the 'money' variable. It either has to be inside the mod or in the map script. I guess it isn't in the mod, so let's make it in the map script. Thread this in your main function
PHP Code:
main()
{
thread players();
//blablabla (rest of the threads)
}
players()
{
while(1)
{
players = getentarray("player","classname");
for(i=0;i<players.size;i++)
{
players[i] = player;
if(!isDefined(player.money))
player.money = 0;
}
wait .5;
}
}
//blablabla (rest of the functions)
Add as many variables as you want in the above func
Now you can use this player variable wherever you want in the script, for example:
PHP Code:
bla()
{
trig = getent("trig","targetname");
while(1)
{
trig waittill("trigger",user);
if(isdefined(user.money))
{
if(user.money >= 10)
{
//blablabla...
}
}
}
}