27.11.2017, 20:44
Also you can use Dini
You need to include includes, and have basic register system
Add stock
in public OnPlayerSpawn(playerid)
in public OnPlayerDisconnect(playerid)
in public OnPlayerDeath
You need to include includes, and have basic register system
PHP код:
#include <dini>
PHP код:
enum pInfo
{
pScore
}
new PlayerInfo[ MAX_PLAYERS ][ pInfo ];
PHP код:
stock GetName(playerid)
{
new name[ MAX_PLAYER_NAME+1 ];
GetPlayerName(playerid, name, sizeof( name ));
return name;
}
PHP код:
new str[ 256+1 ];
format( str, sizeof( str ), "%s.ini", GetName(playerid));
SetPlayerScore(playerid, dini_Int( file, "Score");
PHP код:
dini_IntSet( file, "Score", PlayerInfo[ playerid ][ pScore ]);
PHP код:
PlayerInfo[ killerid ][ pScore ] ++;