SA-MP Forums Archive
saving mone system ? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: saving mone system ? (/showthread.php?tid=355392)



saving mone system ? - UserName31 - 29.06.2012

hey i have been trying to get a money saving system for cops and robbers script by stevo but wont save the money please help


Re: saving mone system ? - Cxnnor - 29.06.2012

On top of your script.
pawn Код:
enum pInfo
{
    pCash(playerid)(pCash);
}

new PlayerInfo[MAX_PLAYERS][pInfo];

forward LoadUser_data(playerid,name[],value[]);
public LoadUser_data(playerid,name[],value[])
{
    INI_Int("Cash",PlayerInfo[playerid][pCash]);
    return 1;
}
Under OnPlayerDisconnect
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
    new INI:File = INI_Open(UserPath(playerid));
    INI_SetTag(File,"data");
    INI_WriteInt(File,"Cash",PlayerInfo[playerid][pCash]);
    INI_Close(File);
    return 1;
}



Re: saving mone system ? - UserName31 - 30.06.2012

hey thanks but i have this error
can you help me please

PHP код:
C:\Users\Elvis Valentin\Desktop\SFCRRPG\gamemodes\SFCRRPG.pwn(58) : error 001expected token"}"but found "("
C:\Users\Elvis Valentin\Desktop\SFCRRPG\gamemodes\SFCRRPG.pwn(66) : error 017undefined symbol "INI_Int"
C:\Users\Elvis Valentin\Desktop\SFCRRPG\gamemodes\SFCRRPG.pwn(600) : warning 201redefinition of constant/macro (symbol "pInfo")
C:\Users\Elvis Valentin\Desktop\SFCRRPG\gamemodes\SFCRRPG.pwn(603) : error 021symbol already defined"PlayerInfo"
C:\Users\Elvis Valentin\Desktop\SFCRRPG\gamemodes\SFCRRPG.pwn(2423) : warning 225unreachable code
C
:\Users\Elvis Valentin\Desktop\SFCRRPG\gamemodes\SFCRRPG.pwn(2423) : error 017undefined symbol "INI_Open"
C:\Users\Elvis Valentin\Desktop\SFCRRPG\gamemodes\SFCRRPG.pwn(2423) : warning 213tag mismatch
C
:\Users\Elvis Valentin\Desktop\SFCRRPG\gamemodes\SFCRRPG.pwn(2424) : error 017undefined symbol "INI_SetTag"
C:\Users\Elvis Valentin\Desktop\SFCRRPG\gamemodes\SFCRRPG.pwn(2425) : error 017undefined symbol "INI_WriteInt"
C:\Users\Elvis Valentin\Desktop\SFCRRPG\gamemodes\SFCRRPG.pwn(2426) : error 017undefined symbol "INI_Close"
C:\Users\Elvis Valentin\Desktop\SFCRRPG\gamemodes\SFCRRPG.pwn(2423) : warning 204symbol is assigned a value that is never used"File"
C:\Users\Elvis Valentin\Desktop\SFCRRPG\gamemodes\SFCRRPG.pwn(4732) : warning 202number of arguments does not match definition
C
:\Users\Elvis Valentin\Desktop\SFCRRPG\gamemodes\SFCRRPG.pwn(4732) : warning 202number of arguments does not match definition
Pawn compiler 3.2.3664              Copyright 
(c1997-2006ITB CompuPhase
7 Errors




Re: saving mone system ? - UserName31 - 30.06.2012

idk if this will help

Quote:

dUserSetINT(PlayerName(playerid)).("SavedJailTime" ,SavedJailTime[playerid]);




Re: saving mone system ? - StrangeLove - 30.06.2012

put
pawn Код:
#include <YSI\y_ini>
on the top of your script


Re: saving mone system ? - [A]ndrei - 30.06.2012

Quote:
Originally Posted by MrSurfur1
Посмотреть сообщение
put
pawn Код:
#include <YSI\y_ini>
on the top of your script
what if he does not have it? ?? anyways if you dont have it download it then try to compile again and check if it works...


Re: saving mone system ? - UserName31 - 30.06.2012

thanks guys it dint work but thank trying