Following the cop
#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


Messages In This Thread
Following the cop - by mike555 - 06.04.2010, 21:34
Re: Following the cop - by Beaver07 - 06.04.2010, 23:38
Re: Following the cop - by yosswat - 06.04.2010, 23:44
Re: Following the cop - by mike555 - 07.04.2010, 07:24
Re: Following the cop - by [LSR]State_Trooper - 07.04.2010, 07:41
Re: Following the cop - by mike555 - 07.04.2010, 08:05
Re: Following the cop - by [LSR]State_Trooper - 07.04.2010, 08:39
Re: Following the cop - by mike555 - 07.04.2010, 09:08
Re: Following the cop - by mike555 - 07.04.2010, 12:39
Re: Following the cop - by [LSR]State_Trooper - 07.04.2010, 13:33

Forum Jump:


Users browsing this thread: 2 Guest(s)