18.06.2009, 12:10
Quote:
Originally Posted by KeyWay
Do i need to replace GivePlayerMoney etc. to GivePlayerCash etc. ?
|
Just check if you start the timer, thats the SetTimer part
Originally Posted by KeyWay
Do i need to replace GivePlayerMoney etc. to GivePlayerCash etc. ?
|
Originally Posted by ♣ ⓐⓢⓢ
Quote:
Just check if you start the timer, thats the SetTimer part |
Originally Posted by KeyWay
Well they dont get kicked when i give them money... And i didnt replace the GIvePlayerMoney, so it means this doesnt work?
|
Originally Posted by Norn
OnGameModeInit
pawn Code:
|
Originally Posted by Norn
pawn Code:
|
Originally Posted by KeyWay
No, i added everything that it says, it still doesnt work, maybe because im using Moneyz and NegativeMoneyz FS?
|
Originally Posted by Norn
OnGameModeInit
pawn Code:
|
Originally Posted by Norn
OnGameModeInit
pawn Code:
|
Originally Posted by ♣ ⓐⓢⓢ
Quote:
BUT there is an mistake Quote:
Quote:
|
stock GivePlayerCash(playerid,cash)
SetPVarInt(playerid,"SSM",GetPVarInt(playerid,"SSM")+cash);
stock UpdatePlayerMoney(playerid)
if(GetPVarInt(playerid,"SSM") < GetPlayerMoney(playerid))
GivePlayerMoney(playerid,GetPVarInt(playerid,"SSM")-GetPlayerMoney(playerid));
public OnPlayerUpdate(playerid)
UpdatePlayerMoney(playerid);
I:\Games\RockStar Game Gta San Andreas\Gta Sanandreas\My Script\gamemodes\MyScript.pwn(687) : warning 235: public function lacks forward declaration (symbol "MoneyTimer")
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Warning.
public MoneyTimer()
{
new username[MAX_PLAYER_NAME];
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(GetPlayerCash(i) != GetPlayerMoney(i))
{
ResetMoneyBar(i);//Resets the money in the original moneybar, Do not remove!
UpdateMoneyBar(i,GetPlayerCash(i));//Sets the money in the moneybar to the serverside cash, Do not remove!
new hack = GetPlayerMoney(i) - GetPlayerCash(i);
GetPlayerName(i,username,sizeof(username));
printf("%s has picked up/attempted to spawn $%d.", username,hack);
}
}
}
}
pawn Code:
script pawn Code:
|
forward MoneyTimer();