01.01.2013, 10:13
pawn Код:
CMD:newb(playerid, params[])
{
if(!strlen(params)) return SendClientMessage(playerid,COLOR_GREY, "USAGE: /newb [question]");
new Lname[MAX_PLAYER_NAME], string[128];
GetPlayerName(playerid,Lname,sizeof(Lname));
format(string, sizeof(string), "[NEWBIE]%s {FFFFFF}%s", Lname, params);
SendClientMessageToAll(COLOR_BLUE, string);
new year, month, day, Hour, Minute, Second;
getdate(year, month, day);
gettime(Hour, Minute, Second);
format(string,sizeof(string),"[%d/%d/%d :: %02d:%02d:%02d] - %s has used the command /newb (%s) \r\n", day, month, year, Hour, Minute, Second, Lname, params);
cmdlog = fopen("files/logs/chat.txt", io_append);
fwrite(cmdlog,string);
fclose(cmdlog);
return 1;
}