Big Problem!!
#1

why do money each time i come in my server the set to -50...how could i do it so if i leave with 500$ then when i go back i get 500$ back ...why?whats cauzing?dont know..
Reply
#2

Please help anybody i have a server of 30 people and locked please help say answer..
Reply
#3

OMG,I am actually a bit astonished you could not realize you need a DataBase system.
Reply
#4

Saving sistem?
OFF:Sunt roman si eo
ENG:im romanian too
Reply
#5

Yes you need a saving system,and that can be easily done using Y_INI wich is my favorite DataBase system,you can find links here :https://sampforum.blast.hk/showthread.php?tid=175565.At a first look it may look complicated BUT IT'S NOT if you read it integrally.
Reply
#6

Yes you need a saving system to save your money. I recommend MySQL.

E:// Too late.
Reply
#7

Here i have saving sistem..
PHP код:
    format(var, 32"Money=%d\n",PlayerInfo[playerid][pCash]);fwrite(hFile, var);
                        
PlayerInfo[playerid][pCash] = GetPlayerCash(playerid); 
Reply
#8

YES,you do but you need to load the data,and you can't do that without a DataBase from files in wich you STORE the player's info...
Reply
#9

Steps for creation:

1.) Make a new variable using the "new" function.
2.) Put GetPlayerCash function under OnPlayerDisconnect callback.
3.) And, GivePlayerCash function under OnPlayerSpawn callback.

Example :

new pMoney;

OnPlayerSpawn - GivePlayerCash(playerid, {variable} );

OnPlayerDisconnect - - GetPlayerCash(playerid);


---------------------------------------------

Get a database system to store the variable of the cash onto player accounts.
Reply
#10

i just put mysql and thats all??
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)