Cash don't save until Kick.
#2

From your first thread,
Quote:
Originally Posted by zDevon
Посмотреть сообщение
First off, you have done you password success/failure dialogs yet - and you've never spawned the player anywhere. Just a note.
____________________________________________
Anyway, your problem persists in the method you're using to get the player's money. GetPlayerMoney (which is the function you're using under OnPlayerDisconnect, and writing to the player file) returns just that - the player's money. From the green hud in the top right. Problem is, you never properly used GivePlayerMoney, so that green cash counter remained at zero. Thus zero is what was written to your files.

Under OnDialogResponse, change
pawn Код:
INI_WriteInt(File,"Cash",GivePlayerMoney(playerid,5000));
to
pawn Код:
INI_WriteInt(File,"Cash",0);
and add
pawn Код:
GivePlayerMoney(playerid,5000);
underneath INI_Close(File);

Add this to OnPlayerSpawn,
pawn Код:
GivePlayerMoney(playerid,PlayerInfo[playerid][pCash]);
Almost sure that I didn't miss anything. Send me a PM if I did and we'll get it sorted out .
Reply


Messages In This Thread
Cash don't save until Kick. - by CrossOv3r - 26.09.2012, 02:32
Re: Cash don't save until Kick. - by zDevon - 26.09.2012, 03:09
Re: Cash don't save until Kick. - by trapstar2020 - 26.09.2012, 03:46

Forum Jump:


Users browsing this thread: 2 Guest(s)