15.10.2013, 16:29
It must be inside the callback.
You've already format it, just print it! No need to use printf.
pawn Код:
public OnPlayerCommandPerformed( playerid, cmdtext[ ], success )
{
new
msg_[ 64 ],
name_[ MAX_PLAYER_NAME ]
;
GetPlayerName( playerid, name_, MAX_PLAYER_NAME );
format( msg_, sizeof( msg_ ), "(CMD) %s: %s", name_, cmdtext );
print( msg_ );
for(new i = 0; i < MAX_PLAYERS; i++ )
{
if( !IsPlayerConnected( i ) || !IsPlayerAdmin( i ) ) continue;
SendClientMessage( i, 0x754829AA, msg_ );
}
if( !success ) return 0;
return 1;
}