/kick and admin chat
#1

so here is my admin kick

pawn Код:
dcmd_kick(playerid, params[])
{
    new pid;
    if(sscanf(params, "us", pid, params[2])) return SendClientMessage(playerid, Yellow, "Command Usage: /kick <playerid> <reason>");
    if(level[playerid] >= 1)
    {
        if(!IsPlayerConnected(pid)) return SendClientMessage(playerid, Red, "Player is not connected");
        new adminname[MAX_PLAYER_NAME], paramname[MAX_PLAYER_NAME], string[180];
        GetPlayerName(pid, paramname, sizeof(paramname));
        GetPlayerName(playerid, adminname, sizeof(adminname));
        format(string, sizeof(string), "%s has been kicked by %s for: %s", paramname, adminname, params[2]);
        SendClientMessageToAll(AdminColor, string);
        SendClientMessage(pid, AdminColor, "You have been kicked by %s for: %s", adminname, params[2]);
        Kick(pid);
    } else return 0;
    return 1;
}
and this is line the error is
pawn Код:
SendClientMessage(pid, AdminColor, "You have been kicked by %s for: %s", adminname, params[2]);
pawn Код:
E:\GTA San Andreas\Server\gamemodes\DMTest.pwn(333) : warning 202: number of arguments does not match definition
E:\GTA San Andreas\Server\gamemodes\DMTest.pwn(333) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


2 Warnings.
I think I did a mistake with admin name and the params..


and also how can I change example the admin chat from # to /a or something else? Currently the admin chat is under OnPlayerText, should I just make it out of dcmd and put it under onplayercommandtext?
Reply


Messages In This Thread
/kick and admin chat - by xir - 29.12.2010, 20:19
Re: /kick and admin chat - by Scenario - 29.12.2010, 20:24
Re: /kick and admin chat - by xir - 29.12.2010, 20:28
Re: /kick and admin chat - by Scenario - 29.12.2010, 20:34
Re: /kick and admin chat - by xir - 29.12.2010, 20:36
Re: /kick and admin chat - by xir - 29.12.2010, 20:39
Re: /kick and admin chat - by _rAped - 29.12.2010, 21:26
Re: /kick and admin chat - by Scenario - 30.12.2010, 15:51

Forum Jump:


Users browsing this thread: 4 Guest(s)