11.08.2010, 08:52
pawn Код:
stock GiveServerMoney(playerid, amount)
{
SetPVarInt(playerid, "Money", GetPVarInt(playerid, "Money") + amount);
SetPlayerMoney(playerid, GetPlayerMoney(playerid) + amount);
}
stock SetServerMoney(playerid, amount)
{
SetPVarInt(playerid, "Money", amount);
SetPlayerMoney(playerid, amount);
}
stock ResetServerMoney(playerid)
{
ResetPlayerMoney(playerid);
SetPVarInt(playerid, "Money", 0);
}
stock GetServerMoney(playerid)
{
return GetPVarInt(playerid, "Money"); // To compare with client side money
}