Problem with Log
#1

Hi, i create log in this command but it have problem, when i use command and open log i says me:
Код:
AdmCmd: Э e isklucen odstrana na Э, pricina: Э
But in command i add to display time name of admin and kicker and reason but dont write that.
Here is command:
Код:
CMD:kick(playerid,params[])
{
    new id,name1[MAX_PLAYER_NAME], reason[35],name2[MAX_PLAYER_NAME], string[128];
    if(PlayerInfo[playerid][pAdmin] < 1) return SCM(playerid, COLOR_GREY,"Nemozete da ja koristite komandata");
    if(sscanf(params,"uz",id,reason)) return SCM(playerid, COLOR_WHITE,"Koristi: /kick [playerid] [pricina]");
    if(!IsPlayerConnected(id)) return SCM(playerid, COLOR_GREY,"Pogresen ID");
    else
    {
	    GetPlayerName(playerid,name1,sizeof(name1));
	    GetPlayerName(id,name2,sizeof(name2));
	    new year,month,day;
        getdate(year, month, day);
	    format(string, sizeof(string),"AdmCmd: %s e isklucen odstrana na %s, pricina: %s",day,month,year,name2,name1,reason);
	    acmdLog(string);
	    GetPlayerName(playerid,name1,sizeof(name1));
	    GetPlayerName(id,name2,sizeof(name2));
	    format(string, sizeof(string),"AdmCmd: %s e isklucen odstrana na %s, pricina: %s",name2,name1,reason);
	    SendClientMessageToAll(COLOR_LIGHTRED,string);
	    Kick(id);
    }
    return 1;
}
What is problem how to fix this ??
Reply
#2

Please help
Reply
#3

I fix the problem with this
But how to make to save in next row in log file ?? Because everything save in one row ??
Reply
#4

Код:
format(string, sizeof(string),"[%02d/%02d/%d] AdmCmd: %s e isklucen odstrana na %s, pricina: %s",day,month,year,name2,name1,reason);
acmdLog(string);
try like this
Reply
#5

Dont work give me like this:
Код:
[15.3.2013]AdmCmd: Kevin_Hawk e isklucen odstrana na Kevin_Hawk, pricina: test[15/03/2013] AdmCmd: Kevin_Hawk e isklucen odstrana na Kevin_Hawk, pricina: 9
I want to make to save in different row
Reply
#6

Код:
format(string, sizeof(string),"[%02d/%02d/%d] AdmCmd: %s e isklucen odstrana na %s, pricina: %s\n",day,month,year,name2,name1,reason);
acmdLog(string);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)