/Command *HELP*
#1

Hey, I want to kick players who execute this command, but how do I make it so whenever they type /command 1 they'll be kicked from the server?

Code:

if(strcmp(cmdtext, "/Command", true) == 0)
{
//Random message
SendClientMessage(playerid, 0xFF0000FF, "Kicked");
SetTimerEx("DelayedKick", 1000, false, "i", playerid);
return 1;
}

It's hard to explain, but basically, if the player types /Command (ANYNUMBER FROM 1-1000) they will be kicked? Cause I don't wanna type this a 1000 times i.e like this:

if(strcmp(cmdtext, "/Command 1", true) == 0)
{
//Random message
SendClientMessage(playerid, 0xFF0000FF, "Kicked");
SetTimerEx("DelayedKick", 1000, false, "i", playerid);
return 1;
}

if(strcmp(cmdtext, "/Command 2", true) == 0)
{
//Random message
SendClientMessage(playerid, 0xFF0000FF, "Kicked");
SetTimerEx("DelayedKick", 1000, false, "i", playerid);
return 1;
}

And so on..I'm terrible at describing things...sorry.
Reply


Messages In This Thread
/Command *HELP* - by TheSkyBlueTeam - 23.07.2015, 18:24
Re: /Command *HELP* - by TheSkyBlueTeam - 23.07.2015, 19:36
Re: /Command *HELP* - by Abagail - 23.07.2015, 19:39
AW: /Command *HELP* - by Mencent - 23.07.2015, 19:44
Re: AW: /Command *HELP* - by Abagail - 23.07.2015, 19:50
Re: /Command *HELP* - by TheSkyBlueTeam - 23.07.2015, 19:52
AW: Re: AW: /Command *HELP* - by Mencent - 23.07.2015, 19:58
Re: AW: /Command *HELP* - by TheSkyBlueTeam - 23.07.2015, 20:20
AW: /Command *HELP* - by Mencent - 23.07.2015, 20:23
Re: AW: /Command *HELP* - by TheSkyBlueTeam - 23.07.2015, 20:29

Forum Jump:


Users browsing this thread: 4 Guest(s)