Non-Rp name Kick
#4

pawn Код:
dcmd_kicknonrp(playerid,params[])
{
    new target;
    if(!sscanf(params,"u",target))
    {
        if(IsPlayerConnected(target))
        {
            new Playername[MAX_PLAYER_NAME],str[70];
            GetPlayerName(target,Playername,sizeof(Playername));
            format(str,sizeof(str),"* %s was kicked, come back with a roleplay name.",Playername);
            SendClientMessageToAll(-1,str);
            Kick(target);
        }
        else return SendClientMessage(playerid,-1,"Invalid player.");
    }
    else return SendClientMessage(playerid,-1,"Error: /kicknonrp [ID].");
}
You may need the DCMD define. I used DCMD here cause it's faster than strcmp and easier to use (but I suggest you ZCMD)

pawn Код:
#define dcmd(%1,%2,%3) if (!strcmp((%3)[1], #%1, true, (%2)) && ((((%3)[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || (((%3)[(%2) + 1] == ' ') && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
Jochem
Reply


Messages In This Thread
Non-Rp name Kick - by uprp - 26.08.2011, 17:11
Re: Non-Rp name Kick - by Jochemd - 26.08.2011, 17:15
Re: Non-Rp name Kick - by uprp - 26.08.2011, 17:18
Re: Non-Rp name Kick - by Jochemd - 26.08.2011, 17:20
Re: Non-Rp name Kick - by uprp - 26.08.2011, 17:22
Re: Non-Rp name Kick - by KeeDee - 26.08.2011, 17:24
Re: Non-Rp name Kick - by Jochemd - 26.08.2011, 17:26
Re: Non-Rp name Kick - by uprp - 26.08.2011, 17:29
Re: Non-Rp name Kick - by uprp - 26.08.2011, 17:37
Re: Non-Rp name Kick - by KoczkaHUN - 26.08.2011, 17:40

Forum Jump:


Users browsing this thread: 1 Guest(s)