what is wrong here ?
#4

here is again something bad..
pawn Код:
CMD:banid(playerid, params[])
{
    if(IsPlayerAdmin2[playerid] == 2)
    {
        new targetid, reason[64], name[24], msg[64];
        if(sscanf(params, "us[64]", targetid, reason)) SendClientMessage(playerid, COLOR_WHITE, "USAGE: /banid <playerid> <reason>");
        if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_RED, "that player is not connected");
        GetPlayerName(targetid, name, sizeof(name));
        format(msg, sizeof(msg), "%s (%d) was banned. Reason: %s", name, targetid, reason);
        SendClientMessageToAll(0xFFFFFFFF, msg);
        if(GetPVarInt(targetid, "Logged"))
        {
            new filename[64];
            format(filename, sizeof(filename), "MaceRP/users/%s.ini", PlayerName(targetid));
            dini_IntSet(filename, "Banned", 1);
        }
        BanEx(targetid, reason);
        GameTextForPlayer(targetid, "You has been banned", 4000, 3);
        return 1;
    }
    else
    {
        SendClientMessage(playerid, COLOR_RED, "You can't use this command.");
        return 1;
    }
}
i'm still getting banned when ill tupe /banid
please somebody tell me what is the problem :/
Reply


Messages In This Thread
what is wrong here ? - by Rafa - 25.07.2011, 17:11
Re: what is wrong here ? - by iPLEOMAX - 25.07.2011, 17:13
Re: what is wrong here ? - by Rafa - 25.07.2011, 17:19
Re: what is wrong here ? - by Rafa - 26.07.2011, 00:02
Re: what is wrong here ? - by Guest3598475934857938411 - 26.07.2011, 00:10
Re: what is wrong here ? - by Rafa - 26.07.2011, 00:22
Re: what is wrong here ? - by Guest3598475934857938411 - 26.07.2011, 11:00

Forum Jump:


Users browsing this thread: 5 Guest(s)