saving mone system ?
#1

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
Reply
#2

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;
}
Reply
#3

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

Reply
#4

idk if this will help

Quote:

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

Reply
#5

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

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...
Reply
#7

thanks guys it dint work but thank trying
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)