Random Names
#7

Quote:
Originally Posted by Jefff
Посмотреть сообщение
pawn Код:
new NamesRP[][] =
{
    "Danny_Williams",
    "Nick_Harmold",
    "Francisca_Perrotti"
    "Hannah_Ress",
    "Mathilde_Rhynes",
    "Jarod_Otani",
    "Dallas_Poppe",
    "Russell_Secord",
    "Timmy_Taitt",
    "Shantel_Golden",
    "Lavina_Kilpatrick",
    "Janina_Drummond",
    "Stephan_Mohan",
    "Victor_Lown",
    "Chris_Tabler",
    "Hung_Pushard",
    "Jennefer_Forsyth",
    "Tyler_Mitchels"
};

CMD:namekick(playerid, params[])
{
    new playerb;
    if(!IsPlayerLoggedIn(playerid)) SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
    else if(PlayerInfo[playerid][pAdmin] < 1 && PlayerInfo[playerid][pMapper] < 4 && !PlayerInfo[playerid][pMod]) SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
    else if(sscanf(params, "u", playerb)) SendClientMessage(playerid, COLOR_WHITE, "[Usage]: /namekick [playerid]");
    else if(!IsPlayerConnected(playerb)) SendClientMessage(playerid, COLOR_GREY, "Invalid player id.");
    else if(IsPlayerNPC(playerb)) SendClientMessage(playerid, COLOR_GREY, "You can't kick NPCs out of the server.");
    else if(PlayerInfo[playerid][pAdmin] < PlayerInfo[playerb][pAdmin]) SendClientMessage(playerid, COLOR_GREY, "Player has a higher admin level than you.");
    else{
        new string[145],rand = random(sizeof(NamesRP));
        format(string, sizeof(string), "AdmCmd: %s has been kicked by %s (%s), reason: Change your name good example: %s", RPN(playerb), RPN(playerid), RPIP(playerid), NamesRP[rand]);
        SendClientMessageToAll(COLOR_LIGHTRED, string);
        Log("logs/kick.log", string);
        SetTimerEx("kickbugfix", 500, false, "i", playerb);
    }
    return 1;
}
No errors let me check if it works
Reply


Messages In This Thread
Random Names - by lulo356 - 09.12.2014, 23:40
Re: Random Names - by Abagail - 09.12.2014, 23:41
Re: Random Names - by lulo356 - 09.12.2014, 23:43
Re : Random Names - by Dutheil - 09.12.2014, 23:44
Re: Re : Random Names - by lulo356 - 09.12.2014, 23:50
Re: Random Names - by Jefff - 09.12.2014, 23:57
Re: Random Names - by lulo356 - 10.12.2014, 00:05
Re: Random Names - by Schneider - 10.12.2014, 00:11
Re: Random Names - by Vince - 10.12.2014, 05:41

Forum Jump:


Users browsing this thread: 3 Guest(s)