18.01.2011, 02:21
pawn Код:
if( strcmp( cmdtext, "/leavenote", true ) == 0 )
{
if( PlayerInfo[ playerid ][ pAdmin ] >= 1337 )
{
new
string[ 128 ],
File: open = fopen( "adminnotes.txt", io_append );
;
format( string, sizeof( string ), "%s", cmdtext[ 11 ] );
fwrite( open, string );
fclose( open );
}
return 1;
}
Please note that this is just a sample. You will need to make sure the file exists before writing to it ( in this case ). I would also suggest adding a check to make sure the file is valid.