SA-MP Forums Archive
How to kick with Part Of Name? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: How to kick with Part Of Name? (/showthread.php?tid=208203)



How to kick with Part Of Name? - ]B4E[kengston - 08.01.2011

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.


Re: How to kick with Part Of Name? - Lorenc_ - 08.01.2011

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...


Re: How to kick with Part Of Name? - yarrum3 - 08.01.2011

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;
}



AW: How to kick with Part Of Name? - ]B4E[kengston - 08.01.2011

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