Bank limit (Using y_ini)
#8

Quote:
Originally Posted by Hiddos
Посмотреть сообщение
Use 'strval(params)' instead of 'params[0]', as strval returns the actual value in the string, and params[x] only returns the (ASCII-) value of the given character.
Thanks for the hint il use it, but now i got a little problem with my code,
as i wanna deposit the same amount twice, it wont write the value in the file, my code:

pawn Код:
CMD:deposit(playerid, params[])
{
    //statements etc...
    new PlayerFile[13 + MAX_PLAYER_NAME];
    format(PlayerFile, sizeof PlayerFile, "Accounts/%s.ini", Encode(PlayaName(playerid)));
    new INI:PlayerAcc = INI_Open(PlayerFile);
    INI_WriteInt(PlayerAcc, "BANK", GetPVarInt(playerid, "Bank") + strval(params));
    INI_Close(PlayerAcc);
    GivePlayerMoney(playerid,-strval(params));
    return 1;
}
Reply


Messages In This Thread
Bank limit (Using y_ini) - by OldDirtyBastard - 24.03.2011, 18:25
Re: Bank limit (Using y_ini) - by Zh3r0 - 24.03.2011, 18:27
Re: Bank limit (Using y_ini) - by OldDirtyBastard - 24.03.2011, 18:28
Re: Bank limit (Using y_ini) - by Zh3r0 - 24.03.2011, 18:31
Re: Bank limit (Using y_ini) - by OldDirtyBastard - 24.03.2011, 19:20
Re: Bank limit (Using y_ini) - by xir - 24.03.2011, 19:48
Re: Bank limit (Using y_ini) - by Hiddos - 24.03.2011, 20:05
Re: Bank limit (Using y_ini) - by OldDirtyBastard - 24.03.2011, 20:50

Forum Jump:


Users browsing this thread: 2 Guest(s)