How to kick with Part Of Name?
#1

I'd like to have a kick command where i only have to write the ID or a Part of the Name. If tryed the Godfather command but this doesn't works. Please help me.
Reply
#2

You might wanna check out some admin scripts on this forum, look through there ban cmds etc.. Then after re-write code. BTW. Please use search there are heaps of these threads...
Reply
#3

you will need sscan f and zcmd

Код:
CMD:kick(playerid, params[]) {
	new id, reson[128], string[ 128 ];
	if( sscanf( params, "uz", reson) )
	{
		if(PlayerInfo[playerid][pAdminLevel] >= 1)// put your admin level thing here
		{
			SendClientMessage(playerid, WHITE, "[SEVER]:{20DB16} Usage /kick [ID] [RESON]");
		}
	}
	else
	{
	if(PlayerInfo[playerid][pAdminLevel] >= 1)
	    {
	        if(IsPlayerConnectedEx(id) )
	        {
	        	if(PlayerInfo[playerid][pAdminLevel] >= PlayerInfo[id][pAdminLevel])
		        {
					format(string, sizeof(string), "You have bean KICK By a Admin %s Because of %s", GetNameEx(playerid), params);
					NearByMessage(playerid, WHITE, string);
					Kick( id );
		    	}
	    	}
	    	else
	    	{
	    	    SendClientMessage( playerid, WHITE, "That player is not connected or isn't logged in." );
	    	}
		}
	}
	return 1;
}
Reply
#4

I already have a kick command. But i like to write only a Part of the Name, not the hole id.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)