- 0
Nu stiu daca are rost...
-
Recently Browsing 0 members
- No registered users viewing this page.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.
Question
Guest RockStar
Am inceput sa folosesc y_ini pentru Drift World dar am ceva probleme...cand ies de pe server se salveaza tot perfect dar cand intru nu se incarca si nu stiu ce are
)
Am postat si pe .com dar vad ca nu stie nimeni acolo...
Am zis sa incerc si aici cu toate ca nu prea cred ca stiti foarte multi y_ini.
Ehh..ei bine asta este codul:
forward Load_PlayerData( playerid, name[ ], value[ ] );
public Load_PlayerData( playerid, name[ ], value[ ] )
{
INI_Int("MONEY", RPlayerData[ playerid ][ R_MONEY ] );
INI_Int("SCORE", RPlayerData[ playerid ][ R_SCORE ] );
INI_Int("LEVEL", RPlayerData[ playerid ][ R_LEVEL ] );
return 1;
}
LoadStats( playerid )
{
new UserFile[ 32 ];
format( UserFile, sizeof ( UserFile ), "Radmin/%s.ini", pName( playerid ) );
INI_ParseFile(UserFile, "Load_%s", .bExtra = true, .extra = playerid);
}
SaveStats( playerid )
{
new UserFile[ 32 ];
format( UserFile, sizeof ( UserFile ), "Radmin/%s.ini", pName( playerid ) );
new INI:file = INI_Open( UserFile );
INI_SetTag(file, "PlayerData");
INI_WriteInt(file, "MONEY", RPlayerData[ playerid ][ R_MONEY ] );
INI_WriteInt(file, "SCORE", RPlayerData[ playerid ][ R_SCORE ] );
INI_WriteInt(file, "LEVEL", RPlayerData[ playerid ][ R_LEVEL ] );
INI_Close( file );
}
Postul de pe .com > http://forum.sa-mp.com/showthread.php?t=265818
13 answers to this question
Recommended Posts