Slap Command
#12

put this in script One rep please i need it
Code:
	}
	if(strcmp(cmd, "/slap", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_WHITE, "USAGE: /slap [playerid/PartOfName]");
				return 1;
			}
			new playa;
			new Float:slx, Float:sly, Float:slz;
			playa = ReturnUser(tmp);
			if(PlayerInfo[playerid][pAdmin] >=2)
			{
			    if(IsPlayerConnected(playa))
			    {
			        if(playa != INVALID_PLAYER_ID)
			        {
			            GetPlayerName(playa, giveplayer, sizeof(giveplayer));
						GetPlayerName(playerid, sendername, sizeof(sendername));
			            if(PlayerInfo[playa][pAdmin] > PlayerInfo[playerid][pAdmin])
						{
						    format(string, sizeof(string), "AdmCmd: %s was slapped, reason: Attempting to slap a higher admin.", sendername);
							ABroadCast(COLOR_LIGHTRED, string, 1);
							GetPlayerPos(playerid, slx, sly, slz);
							SetPlayerPos(playerid, slx, sly, slz+5);
							PlayerPlaySound(playerid, 1130, slx, sly, slz+5);
							return 1;
						}
						GetPlayerPos(playa, slx, sly, slz);
						SetPlayerPos(playa, slx, sly, slz+5);
						PlayerPlaySound(playa, 1130, slx, sly, slz+5);
						format(string, sizeof(string), "AdmCmd: %s was slapped by %s.",giveplayer ,sendername);
						ABroadCast(COLOR_LIGHTRED,string,1);
					}
				}
			}
			else
			{
				SendClientMessage(playerid, COLOR_GRAD1, "   You are not authorized to use that command !");
			}
		}
Reply


Messages In This Thread
Slap Command - by Michael_Cruise - 13.06.2012, 09:44
Re: Slap Command - by JaKe Elite - 13.06.2012, 09:57
Re: Slap Command - by Sanady - 13.06.2012, 09:58
Re: Slap Command - by Vince - 13.06.2012, 10:00
Re: Slap Command - by milanosie - 13.06.2012, 10:04
Re: Slap Command - by Michael_Cruise - 13.06.2012, 10:13
Re: Slap Command - by Michael_Cruise - 13.06.2012, 10:27
Re: Slap Command - by JaKe Elite - 13.06.2012, 10:41
Re: Slap Command - by Nuke547 - 13.06.2012, 10:50
Re: Slap Command - by Michael_Cruise - 13.06.2012, 11:04
Re: Slap Command - by -CaRRoT - 13.06.2012, 11:08
Re: Slap Command - by Nicks - 13.06.2012, 11:12
Re: Slap Command - by jop9888 - 13.06.2012, 11:29
Re: Slap Command - by Michael_Cruise - 13.06.2012, 11:41
Re: Slap Command - by WeCstoR - 09.12.2012, 10:38
Re: Slap Command - by mittukuttan - 22.01.2013, 12:01
Re: Slap Command - by PaulDinam - 22.01.2013, 12:19
AW: Slap Command - by Blackazur - 22.01.2013, 12:25
Re: Slap Command - by Threshold - 22.01.2013, 12:50
Re: Slap Command - by Coffeely - 16.03.2014, 14:42
Re: Slap Command - by iThePunisher - 16.03.2014, 14:57
Re: Slap Command - by Greaper - 16.03.2014, 15:02
Re: Slap Command - by Guest4390857394857 - 16.03.2014, 15:12

Forum Jump:


Users browsing this thread: 2 Guest(s)