07.02.2012, 15:23
Get player's name and store it in a variable. Then SetPlayerName( The ID of the player to set the name of, The name to set ); and GetPlayerName (to get the new name) and create the new file with the name.
Last use fremove to delete the account from the first player's name.
Last use fremove to delete the account from the first player's name.
pawn Код:
// Setname Command
new
id, Name[ MAX_PLAYER_NAME ], NewName[ MAX_PLAYER_NAME ], string[ 32 ], str[ 32 ], varname[ 24 ];
GetPlayerName( id, Name, MAX_PLAYER_NAME );
format( string, sizeof( string ), "Users\%s.ini", Name );
SetPlayerName( id, varname );
GetPlayerName( id, NewName, MAX_PLAYER_NAME );
format( str, sizeof( str ), "Users\%s.ini", NewName ); // The File Location
new INI:File = INI_Open( str );
// Rest
INI_Close(file);
fremove( string ); // Remove the first Account Name