Why does this ...
#8

Quote:
Originally Posted by funky1234
Посмотреть сообщение
Is the plugin named "sscanf" loading? Could you show us your server_log.txt (initialisation part)?
Quote:
Originally Posted by iRemix
Посмотреть сообщение
Try this:

pawn Код:
dcmd_kick(playerid, params[])
{
    if(AccountInfo[playerid][AdminLevel] <=1)
    {
        new pName[24], pVictim[24], gMessage[250], iD, gReason[250];
        if(sscanf(params, "us[250]", iD, gReason)) return SendClientMessage(playerid, 0xFFFFFFFF, "Usage: /kick [playerid] [reason]");
        else if(iD == playerid) return SendClientMessage(playerid, 0xFFFFFFFF, "You cannot use this command on yourself.");
        else if(!IsPlayerConnected(iD)) return return SendClientMessage(playerid, 0xFFFFFFFF, "That player is not connected.");
        else
        {
            GetPlayerName(playerid, pName, sizeof(pName));
            GetPlayerName(iD, gVictim, sizeof(gVictim));
           
            format(gMessage, sizeof(gMessage), "* Server: %s has been kicked from the server by %s. Reason: %s", gVictim, pName, gReason);
            SendClientMessageToAll(0xFF0000FF, gMessage);
           
            Kick(iD);
        }
    }
    else
    {
        SendClientMessage(playerid, COLOR_RED, "* You are not an admin.");
    }
    return 1;
}
If that fails to load, make sure you've downloaded the correct version of sscanf, and also make sure that you've added it to the plugins line on your config.ini

+ Rep if I've helped.
Yeah i forget to plugins sscanf

both thanks and Rep
Reply


Messages In This Thread
Why does this ... - by [D]ry[D]esert - 29.04.2012, 12:07
Re: Why does this ... - by Finn - 29.04.2012, 12:08
Re: Why does this ... - by Ash. - 29.04.2012, 12:10
Re: Why does this ... - by [D]ry[D]esert - 29.04.2012, 12:10
Re: Why does this ... - by [D]ry[D]esert - 29.04.2012, 12:34
Re: Why does this ... - by Ash. - 29.04.2012, 13:30
Re: Why does this ... - by iRemix - 29.04.2012, 16:24
Re: Why does this ... - by [D]ry[D]esert - 29.04.2012, 17:07
Re: Why does this ... - by [D]ry[D]esert - 29.04.2012, 17:12
Re: Why does this ... - by Crazymax - 29.04.2012, 17:14

Forum Jump:


Users browsing this thread: 1 Guest(s)