03.11.2014, 02:29
i try to solve this problem with 3 hours but i cant solve it.
got someone know how to fix it
pls teach me.
got someone know how to fix it
pls teach me.
PHP код:
#include <a_samp>
#include <YSI\y_ini>
new c4[MAX_PLAYERS];
stock user_ini_file(playerid)
{
new string[ 128 ],user_name[ MAX_PLAYER_NAME ];
GetPlayerName( playerid, user_name, MAX_PLAYER_NAME );
format( string, sizeof ( string ), "/C4/%s.ini", user_name );
return string;
}
forward @load_user_c4( playerid, name[], value[] );
@load_user_c4( playerid, name[], value[] )
{
INI_Int( "c4", c4[ playerid ] );
return ( 1 );
}
public OnPlayerConnect( playerid )
{
new INI:File = INI_Open( user_ini_file( playerid ) );
INI_WriteInt( File, "c4", c4[playerid] );
INI_ParseFile( user_ini_file( playerid ), "load_user_%s", .bExtra = true, .extra = playerid );
return ( 1 );
}
public OnPlayerDisconnect( playerid, reason )
{
new INI:File = INI_Open( user_ini_file( playerid ) );
INI_WriteInt( File, "c4", c4[playerid] );
INI_Close( File );
return ( 1 );
}