#1

I updated sscanf and streamer but still, my server still keeps crashing, what is wrong?! *Rage*
It does not crash on local host, why on my public server?!

pawn Код:
COMMAND:kick(playerid,params[])
{
    new id, reason[35], string[128];
    if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessageEx(playerid, COLOUR_LIGHTRED,"You are not authorized to use this command");
    if(sscanf(params,"us",id,reason)) return SendClientMessageEx(playerid, COLOUR_WHITE,"{3CCA75}[{FFFFFF}Usage{3CCA75}]{FFFFFF} /kick [playerid/partofname] [reason]");
    if(!IsPlayerConnected(id)) return SendClientMessageEx(playerid, COLOUR_LIGHTRED,"Invalid player id");
    else
    {
        PlayerInfo[playerid][pKicks] += 1;
        format(string, sizeof(string),"AdmCmd: %s was kicked by %s, reason: %s",GetPlayerNameEx(id),PlayerInfo[playerid][pStaffName],reason);
        SendClientMessageToAllEx(COLOUR_LIGHTRED,string);
        format(string, sizeof(string),"You have been kicked by: %s, reason: %s",PlayerInfo[playerid][pStaffName],reason);
        SendClientMessageToEx(COLOUR_LIGHTRED,string);
        format(string, sizeof(string),"AdmCmd: %s (IP: %s) was kicked by %s (%s) (IP: %s), reason: %s",GetPlayerNameEx(id),GetPlayerIPEx(id),PlayerInfo[playerid][pStaffName],GetPlayerNameEx(playerid),GetPlayerIPEx(playerid),reason);
        Log("logs/kick.log", string);
        Kick(id);
    }
    return 1;
}
Reply
#2

Do you have the logs folder in scriptfiles?

And the kicks.log file too.
Reply
#3

try that

pawn Код:
COMMAND:kick(playerid,params[])
{
    new id, reason[35], string[128];
    if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessageEx(playerid, COLOUR_LIGHTRED,"You are not authorized to use this command");
    if(sscanf(params,"us",id,reason)) return SendClientMessageEx(playerid, COLOUR_WHITE,"{3CCA75}[{FFFFFF}Usage{3CCA75}]{FFFFFF} /kick [playerid/partofname] [reason]");
    if(!IsPlayerConnected(id)) return SendClientMessageEx(playerid, COLOUR_LIGHTRED,"Invalid player id");

    PlayerInfo[playerid][pKicks] += 1;
    format(string, sizeof(string),"AdmCmd: %s was kicked by %s, reason: %s",GetPlayerNameEx(id),PlayerInfo[playerid][pStaffName],reason);
    SendClientMessageToAllEx(COLOUR_LIGHTRED,string);
    format(string, sizeof(string),"You have been kicked by: %s, reason: %s",PlayerInfo[playerid][pStaffName],reason);
    SendClientMessageToEx(COLOUR_LIGHTRED,string);
    format(string, sizeof(string),"AdmCmd: %s (IP: %s) was kicked by %s (%s) (IP: %s), reason: %s",GetPlayerNameEx(id),GetPlayerIPEx(id),PlayerInfo[playerid][pStaffName],GetPlayerNameEx(playerid),GetPlayerIPEx(playerid),reason);
    Log("logs/kick.log", string);
    Kick(id);
    return 1;

}

and as Logitech90 said check if you have logs folder in scriptfiles
Reply
#4

Silly question, but you sure you're using .so plugins if your public server is on Linux?
Reply
#5

Quote:
Originally Posted by VincentDunn
Посмотреть сообщение
Silly question, but you sure you're using .so plugins if your public server is on Linux?
Yea I am using .so for Linux.
Reply
#6

If those files don't exist it will go boom
Reply
#7

Quote:
Originally Posted by kaisersouse
Посмотреть сообщение
If those files don't exist it will go boom
Quote:
Originally Posted by Logitech90
Посмотреть сообщение
Do you have the logs folder in scriptfiles?

And the kicks.log file too.
I do have the kick.log file.
Reply
#8

can you show Log function?
Reply
#9

There is nothing written in it.
Reply
#10

Quote:
Originally Posted by seanny
Посмотреть сообщение
There is nothing written in it.
That's epic.So,how you can expect it will work?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)