[Help] /kick command [Please]
#1

I want a command that if you have 100 or more score you can kick a player, you dont have to be an admin

/kick [ID] only, no reason, and if player has more than 100 score, kick [ID] param and take 100 score from player

Thanks if you help
Reply
#2

Wow really?
Wouldnt like to be on your server,

Anyway.. Theres a filterscript that comes with Server Package called base,
There is a /kick command in there, Just edit the admin check to score check
Reply
#3

It cant get abused because for one kick you have to kill about 25 people
Reply
#4

On top after includes:
Код:
#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
OnPlayerCommandText:
Код:
dcmd(kick,4,cmdtext);
At the end of script:
Код:
dcmd_kick(playerid,params[]) {
	if (strlen(params))
	{
	  new id;
		id = strval(params);
		if (GetPlayerScore(playerid) > 99) {
			new PScore = GetPlayerScore(playerid);
		  Kick(id);
		  SendClientMessage(playerid,0xE60000FF,"The player have been kicked!");
			SetPlayerScore(playerid,PScore - 100);
		} else {
		  SendClientMessage(playerid,0xE60000FF,"You don't have enough score to use this command!");
		}
		return 1;
	}
	return SendClientMessage(playerid,ZALIA,"You forgot the player ID!");
}
Reply
#5

I already did, and I needed strcmp
Reply
#6

strcmp slows your server down i think
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)