Following the cop
#1

If somebody could help me, I need a script that will allow player, when he's cuffed, to follow the officer. Or something like this/ Will be very pleaseful if you would help me to do that!
Reply
#2

just get the cops position and set the cuffed players position constantly behind them until they are uncuffed
Reply
#3

Maybe something like that "Drag" only PD , but you can change !

Код:
		if(strcmp(cmd, "/drag", true) == 0) // by J,C
	{
	  if(IsPlayerConnected(playerid))
	  {
	    if(!IsACop(playerid))
			{
			  SendClientMessage(playerid, COLOR_GRAD1, "You are not a cop!");
			  return 1;
			}
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /drag [playerid/PartOfName]");
				return 1;
			}
			new newcar = GetPlayerVehicleID(playerid);
			new playa;
			playa = ReturnUser(tmp);
			if(IsACopCar(newcar) || IsNgCar(newcar) || IsAnFbiCar(newcar))
			{
			  if(IsPlayerConnected(playa))
			  {
			    if(playa != INVALID_PLAYER_ID)
			    {
			      new Float:x, Float:y, Float:z;
			      GetPlayerPos(playa,x,y,z);
			      if(PlayerToPoint(5, playerid, x, y, z))
			      {
			      	PutPlayerInVehicle(playa,newcar,1);
			      	GetPlayerName(playa, giveplayer, sizeof(giveplayer));
							GetPlayerName(playerid, sendername, sizeof(sendername));
							format(string, sizeof(string), "* %s drags %s to his/her car/moped.", sendername ,giveplayer);
							ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
						}
						else
						{
							SendClientMessage(playerid, COLOR_GREY, "Player is not near you.");
						}
					}
			  }
			}
			else
			{
			  SendClientMessage(playerid, COLOR_GRAD1, "You are not in police vehicle!");
			}
	  }
	  return 1;
	}
Reply
#4

I know this command. I have "/drag" on my server.
I'm a scripting beginner so i'll be very happy if you would help me with this.
I don't need "/drag".
I need command that will make player following the cop!

Reply
#5

Just guessing here but use something like:

GetPlayerPos(playerid,X,Y,Z);
SetPlayerPos(giveplayerid,playerid);
Reply
#6

Quote:
Originally Posted by [LSR
State_Trooper ]
Just guessing here but use omething like:

GetPlayerPos(playerid,X,Y,Z);
SetPlayerPos(giveplayerid,playerid);
Thank you for your suggestion, but I have already said that i'm a scripting beginner. I know thiscommands that you said, but i don't know how to use it!

Reply
#7

Are you using factions like in a GF edit or teams?? I may give you the code :P
Reply
#8

I'm using La-Rp.
Will be very thankful for your help.
I'd want to ask you to make another command. And connect it with "/cuff".
Thank you for your help!
Reply
#9

Would you help me?
Reply
#10

ill try yea.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)