[Ajuda] Sistema de salvamento
#3

Quote:

public OnPlayerRegister(playerid, password[])
{
if(IsPlayerConnected(playerid))
{
new string3[64];
new playername3[MAX_PLAYER_NAME];
JogadorInfo[playerid][pCash] = GetPlayerMoneyEx(playerid);
GetPlayerName(playerid, playername3, sizeof(playername3));
format(string3, sizeof(string3), "Players/%s.ini", playername3);
new File: hFile = fopen(string3, io_write);
DisablePlayerCheckpoint(playerid);
if (hFile)
{
strmid(JogadorInfo[playerid][pKey], password, 0, strlen(password), 255);
new var[32];
format(var, 32, "Key=%s\n", JogadorInfo[playerid][pKey]);fwrite(hFile, var);
format(var, 32, "Coins=%d\n", JogadorInfo[playerid][pCash]);fwrite(hFile,var);
format(var, 32, "Level=%d\n",JogadorInfo[playerid][pLevel]);fwrite(hFile, var);
format(var, 32, "AdminLevel=%d\n",JogadorInfo[playerid][pAdmin]);fwrite(hFile, var)

Veja se isso pode Resolver !
Reply


Messages In This Thread
Sistema de salvamento - by leobpo - 18.05.2018, 14:22
Re: Sistema de salvamento - by uliano - 18.05.2018, 18:12
Re: Sistema de salvamento - by zNaKa - 18.05.2018, 19:02
Re: Sistema de salvamento - by AutoMatic2 - 18.05.2018, 19:31
Re: Sistema de salvamento - by uliano - 18.05.2018, 19:44

Forum Jump:


Users browsing this thread: 1 Guest(s)