Something wrong with ban commands
#7

Quote:
Originally Posted by Ultima
Посмотреть сообщение
If you wont offer any guy help, why the hell should you bullpost about using sscanf?

@ OP
Sorry mate, but i can't help as im not into dcmd etc, i just wanted to reply to the guy that replied.
I acctualy offred help to him... I told him to use sscanf, that would help him because sscanf if 85%++ much easier... So actually your post is "bullpost" (Think before you post...)
Just look here (This should work, using 'sscanf2' plugin):

pawn Код:
//#include <sscanf2>

dcmd_ban(playerid, params[])
{
    if(!IsPlayerAdmin(playerid))
    {
        new targetid, reason[128];
        if(sscanf(params, "us[128]", targetid, reason)) return SendClientMessage(playerid, red, "USAGE: /ban [playerid] [reason]");
        else if(IsPlayerConnected(targetid)) return SendClientMessage(playerid, red, "ERROR: Player is not connected!");
        {
            new playername[MAX_PLAYER_NAME], targetname[MAX_PLAYER_NAME], string[128];
            GetPlayerName(playerid, playername, sizeof(playername));
            GetPlayerName(targetid, targetname, sizeof(targetname));
           
            format(string,sizeof(string),"%s has been banned by Administrator %s (Reason: %s)",targetname, playername, reason);
            SendClientMessageToAll(red,string);
           
            BanEx(targetid, reason);
        }
    }
    else return  SendClientMessage(playerid, red, "ERROR: You must to be an admin before using this command!");
}
Reply


Messages In This Thread
Something wrong with ban commands - by Libra_PL - 15.02.2011, 18:15
Re: Something wrong with ban commands - by Unknown123 - 15.02.2011, 18:57
Re: Something wrong with ban commands - by Ultima - 15.02.2011, 19:11
Re: Something wrong with ban commands - by Mean - 15.02.2011, 19:18
Re: Something wrong with ban commands - by Libra_PL - 16.02.2011, 07:24
Re: Something wrong with ban commands - by _Tommy - 16.02.2011, 09:06
Re: Something wrong with ban commands - by Unknown123 - 16.02.2011, 16:25

Forum Jump:


Users browsing this thread: 1 Guest(s)