Need help, made a mistake making a command.
#5

pawn Код:
if (strcmp(cmd, "/spban", true) == 0)
{
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
        SendClientMessage(playerid, COLOR_WHITE, "USAGE: /spban(Special Person Ban) [playerid/PartOfName] [reason]");
        return 1;
    }
    if (PlayerInfo[playerid][pAge] == 310518 )
    {
        new year, month,day;
        getdate(year, month, day);
        format(string, sizeof(string), "AdmCmd: %s was banned by %s, reason: %s", giveplayer, sendername, (result));
        SendClientMessageToAll(COLOR_LIGHTRED, string);
        GetPlayerName(playerid, sendername, sizeof(sendername));
        format(string, sizeof(string), "AdmCmd: %s was banned by %s, reason: %s", giveplayer, sendername, (result));
        BanLog(string);
        new ip[128];
        GetPlayerIp(giveplayerid,ip,128);
        format(string, sizeof(string), "Banned Player's IP: %s", ip);
        ABroadCast(COLOR_YELLOW,string,1);
        strmid(PlayerInfo[giveplayerid][pBanReason], result, 0, strlen(result), 255);
        PlayerInfo[giveplayerid][pBanned] = 1;
        PlayerInfo[giveplayerid][pBans] += 1;
        Ban(giveplayerid);
        return 1;
           
           
    }
    else
    {
        format(string, sizeof(string), "   %d is not an active player.", giveplayerid);
        SendClientMessage(playerid, COLOR_GRAD1, string);
    }

    return 1;
}
Reply


Messages In This Thread
Need help, made a mistake making a command. - by up2u - 10.05.2011, 17:44
Re: Need help, made a mistake making a command. - by o_O - 10.05.2011, 18:36
Re: Need help, made a mistake making a command. - by up2u - 10.05.2011, 18:43
Re: Need help, made a mistake making a command. - by Mean - 10.05.2011, 18:45
Re: Need help, made a mistake making a command. - by o_O - 10.05.2011, 18:46
Re: Need help, made a mistake making a command. - by up2u - 10.05.2011, 18:48
Re: Need help, made a mistake making a command. - by o_O - 10.05.2011, 18:49
Re: Need help, made a mistake making a command. - by up2u - 10.05.2011, 18:54
Re: Need help, made a mistake making a command. - by o_O - 10.05.2011, 19:02
Re: Need help, made a mistake making a command. - by o_O - 10.05.2011, 19:07

Forum Jump:


Users browsing this thread: 6 Guest(s)