Kicking with YSI
#1

Hello,

I'am using YSI (Author: ******), basic scripting.
I want to kick, slap, giveauthority, makeleader and so on.
At this moment I only can do that on myself (ex. /kickme)
Now, you have this kick command without YSI
Code:
//----------------------------- [ KICK ]----------------------------------------
	if(strcmp(cmd, "/kick", true, 10) == 0)
{
	tmp = strtok(cmdtext, idx);
	if(!strlen(tmp))
{
	SendClientMessage(playerid, COLOR_YELLOW, "[!] USAGE: /kick [playerid] (auto assigned reason)");
	return 1;
}
	new playa = strval(tmp);
	GetPlayerName(playa, giveplayer, sizeof(giveplayer));
	GetPlayerName(playerid, sendername, sizeof(sendername));
	if(pAdmin[playerid] >= 1)
{
	if(logged[playerid] == 1)
{
	SendClientMessage(playa, COLOR_RED, "You were kicked from the server!");
	format(string, sizeof(string), "[!] AdmCmd: %s was kicked by %s, Reason: Behaving Innapropriatly",sendername, giveplayer);
	SendClientMessageToAll(COLOR_ADMIN, string);
	Kick(playa);
	return 1;
}
}
	else
{
	SendClientMessage(playerid, COLOR_RED, "[!] You cannot use this command!");
}
	return 1;
}
How is it made on YSI (Author: ******) ?

ex. kill command of ysi
Code:
Command_(kill)
{
	if (help)
	{
		// The player typed "/help drop" not "/drop"
		Text_Send(playerid, "KILL_HELP");
	}
					else if (IsPlayerAdmin(playerid))
	{
		// Player typed "/kill"
		SetPlayerHealth(playerid, 0.0);
	}
	else
	{
	  Text_Send(playerid, "NO_ADMIN");
	}
	return 1;
}
KnooL
Reply


Messages In This Thread
Kicking with YSI - by KnooL - 15.11.2009, 10:40
Re: Kicking with YSI - by Google63 - 15.11.2009, 11:43
Re: Kicking with YSI - by KnooL - 15.11.2009, 11:54
Re: Kicking with YSI - by KnooL - 15.11.2009, 15:29
Re: Kicking with YSI - by KnooL - 16.11.2009, 15:07
Re: Kicking with YSI - by Zeex - 16.11.2009, 15:30
Re: Kicking with YSI - by KnooL - 16.11.2009, 17:26
Re: Kicking with YSI - by KnooL - 17.11.2009, 13:31
Re: Kicking with YSI - by KnooL - 18.11.2009, 11:56
Re: Kicking with YSI - by KnooL - 19.11.2009, 14:51

Forum Jump:


Users browsing this thread: 1 Guest(s)