31.07.2010, 03:57
Just follow my tuturial - will find on tuturials page..
also need a small timer for showing the money (Green money)
In the Timer Put
pawn Код:
stock GiveScash(playerid, cash)
{
PlayerInfo[playerid][Scash] += cash;
//dont know about returns - check wiki - in search type "stock"
}
stock SetScash(playerid, cash)
{
PlayerInfo[playerid][Scash] = cash;
}
stock ResetScash(playerid)
{
PlayerInfo[playerid][Scash] = 0;
}
In the Timer Put
pawn Код:
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(GetPlayerMoney(i) != PlayerInfo[i][Scash])
{
ResetPlayerMoney(i);
GivePlayerMoney(i,PlayerInfo[i][Scash]);
}
}