Y_ini help!
#3

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.
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
Reply


Messages In This Thread
Y_ini help! - by Ballu Miaa - 07.02.2012, 14:46
Re: Y_ini help! - by Madd Kat - 07.02.2012, 15:22
Re: Y_ini help! - by Konstantinos - 07.02.2012, 15:23
Re: Y_ini help! - by IceCube! - 07.02.2012, 15:25

Forum Jump:


Users browsing this thread: 1 Guest(s)