SA-MP Forums Archive
/tackle command - 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: /tackle command (/showthread.php?tid=171068)



/tackle command - Kevin_Joshen - 25.08.2010

Does anyone have a /tackle command, that will tackle the designated player for 8 seconds, or mind telling me how it's done?


It must work for Ravens RP, 0.3b







thanks.
Kevin


Re: /tackle command - Burridge - 25.08.2010

https://sampforum.blast.hk/showthread.php?tid=118885

Use this topic.


Re: /tackle command - Mike_Peterson - 25.08.2010

i just made an /stumble/ /trip command for an other edited Godfather RP (so same as Raven i suppose)


Re: /tackle command - Kevin_Joshen - 25.08.2010

Quote:
Originally Posted by Mike_Peterson
View Post
i just made an /stumble/ /trip command for an other edited Godfather RP (so same as Raven i suppose)
do you think it would work?


Re: /tackle command - Steven82 - 25.08.2010

Yes......


Re: /tackle command - WillyP - 25.08.2010

i want it!


Re: /tackle command - Kevin_Joshen - 25.08.2010

so can you give us the script maybe? =D


Can Anyone help me with this?


Re: /tackle command - Kevin_Joshen - 26.08.2010

bump......


Re: /tackle command - Kevin_Joshen - 26.08.2010

Can some one PLEASE HELP ME?


Re: /tackle command - Mike_Peterson - 26.08.2010

fine fine, here it is
Code:
	if(strcmp(cmd, "/trip", true) == 0 || strcmp(cmd, "/stumble", true) == 0)
	{
		if(IsPlayerConnected(playerid))
		{
			if(PlayerInfo[playerid][pAdmin] < 1)
			{
  			SendClientMessage(playerid, COLOR_GREY, "You need to be atleast admin level 1 to use this command.");
	    	return 1;
	    	}
		    if(gPlayerLogged[playerid] == 0)
	        {
	            SendClientMessage(playerid, COLOR_GREY, "You need to login first.");
		        return 1;
	        }
	        if(PlayerInfo[playerid][pLevel] < 3)
	        {
	            SendClientMessage(playerid, COLOR_GREY, "You need to be atleast level 3 to use this command.");
	            return 1;
	        }
	        if(KnockedDown[playerid] == 1)
	        {
	            SendClientMessage(playerid, COLOR_GREY, "Can't stumble when you're tripped down.");
	            return 1;
	        }
            if(PlayerBoxing[playerid] != 0)
            {
                SendClientMessage(playerid, COLOR_GREY, "Can't use that command while boxing.");
                return 1;
            }
	        tmp = strtok(cmdtext, idx);
	        if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_WHITE, "USAGE: /stumble(trip) [Playerid/PartOfName]");
				return 1;
			}
			giveplayerid = ReturnUser(tmp);
			if(IsPlayerConnected(giveplayerid))
			{
			    if(giveplayerid != INVALID_PLAYER_ID)
			    {
			        if (ProxDetectorS(2.0, playerid, giveplayerid))
			        {
           				if(KnockedDown[giveplayerid] != 1)
			        	{
			        	    if(giveplayerid == playerid)
			        	    {
			        	        SendClientMessage(playerid, COLOR_GREY, "   You can not let yourself get tripped.");
			        	        return 1;
			        	    }
			        	    if(PlayerInfo[giveplayerid][pSex] == 2)
			        	    {
			        	        SendClientMessage(playerid, COLOR_GREY, "Are you sure you want to stumble a woman?");
			        	        return 1;
			        	    }
			        	    if(IsPlayerInAnyVehicle(giveplayerid))
			        	    {
			        	        return 1;
			        	    }
			            	new giveplayername[MAX_PLAYER_NAME];
			            	GetPlayerName(playerid, sendername, sizeof(sendername));
			            	GetPlayerName(giveplayerid, giveplayername, sizeof(giveplayername));
			            	new rands = random(2)+1;
							format(string, sizeof(string), "* %s attempts to stumble %s to let him fall.", sendername, giveplayername);
							ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                            //ApplyAnimation(playerid,"FIGHT_D","FightD_3",4.0,0,1,1,0,0);
							if(rands == 1)
							{
							    TogglePlayerControllable(giveplayerid, 0);
							    ApplyAnimation(giveplayerid,"BEACH", "bather", 4.0, 1, 0, 0, 0, 0);
								//ApplyAnimation(giveplayerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
								SetTimerEx("ClearKnock", 20000, false, "i", giveplayerid);
								KnockedDown[giveplayerid] = 1;
								format(string, sizeof(string), "* %s succeeds to stumble %s.", sendername,giveplayername);
								ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
							}
							else
							{
							    format(string, sizeof(string), "* %s sees %s's leg and avoids it, %s fails to let him stumble.", giveplayername,sendername, sendername);
                                ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
							}
							return 1;
						}
						else
						{
						    SendClientMessage(playerid, COLOR_GREY, "Player is tripped already.");
						}
			        }
			        else
			        {
			            SendClientMessage(playerid, COLOR_GREY, "Player is not near you.");
			        }
			    }
			}
		}
		return 1;
	}