30.12.2010, 03:54
[FeK]DraKiNs, as long as the format variable and the arguments correspond to eachother it works just fine. I've tested it alot and I'm currently using it a lot in a gamemode - not a single crash/faulty message.
Also, opening a file with io_write will empty the file so most of that code is just redundant.
I don't see why you're using static in there; unless you're going to use that function in OnPlayerUpdate or something it won't matter.
Here's a proper freset:
As for the player loop, I'd suggest:
Also, opening a file with io_write will empty the file so most of that code is just redundant.
I don't see why you're using static in there; unless you're going to use that function in OnPlayerUpdate or something it won't matter.
Here's a proper freset:
pawn Код:
freset( const szFilename[ ] )
{
new
File:fpFile = fopen( szFilename, io_write )
;
if ( fpFile )
fclose( fpFile );
}
pawn Код:
static iSlots;
if ( !iSlots )
iSlots = GetMaxPlayers( );
for ( new i = 0; i < iSlots; i++ )
{
if ( !IsPlayerConnected( i ) )
continue;
}