CMD: drag
#1

How i can do it drag the suspect to last car i want help please

Код:
CMD:drag(playerid,params[])
{
      if(gTeam[playerid] == Swat)
      {
        new id, Float:x,Float:y,Float:z,tname[MAX_PLAYER_NAME];
        if(sscanf(params, "d", id)) return SendClientMessage(playerid, -1,"{ff0000}[USAGE]: {ffffff}/drag [ID]");
        if(GetPlayerWantedLevel(id) >= 4)
        {
			if(!IsPlayerConnected(id)) return SendClientMessage(playerid,-1,"{ff0000}[ERROR]: {ffffff}This player isn't online!");
			if(playerid == id) return SendClientMessage(playerid, -1, "{ff0000}[ERROR]: {ffffff}You can't drag your self");
			if(!IsPlayerAttachedObjectSlotUsed(id, 0)) return SendClientMessage(playerid,RED,"{ff0000}[ERROR]: {ffffff}The player must be cuffed to use this command on him.");
			GetPlayerPos(playerid, x, y, z);
			if(IsPlayerInRangeOfPoint(id, 5.0, x, y, z))
			{
	   					if(IsPlayerInAnyVehicle(id)) return SendClientMessage(playerid, RED,"{ff0000}[ERROR]: {ffffff}This player is in vehicle, Try to get him out, then re-use the command.");
	   					if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, RED,"{ff0000}[ERROR]: {ffffff}You must be in a vehcile to use this command.");
	   					PutPlayerInVehicle(id, GetPlayerVehicleID(playerid), 1);
	   					TogglePlayerControllable(id, 0);
						GetPlayerName(id,tname,sizeof(tname));
						format(Jstring,sizeof(Jstring)," {00FFFFFF}[SWAT COMMAND]:{ffffff} You have dragged the player: %s(%d) succesfully, take him to the check point.",tname,id);
						SendClientMessage(playerid,SwatC,Jstring);
			}
        } else return SendClientMessage(playerid,-1,"{ff0000}[ERROR]: {ffffff}This player isn't wanted.");
      } else return SendClientMessage(playerid, RED,"{ff0000}[ERROR]: {ffffff}You have to be in the S.W.A.T skin to use this command.");
      return 1;
}
Reply


Messages In This Thread
CMD: drag - by Bigjohn - 28.02.2018, 12:34
Re: CMD: drag - by Sew_Sumi - 28.02.2018, 12:38
Re: CMD: drag - by PepsiCola23 - 28.02.2018, 12:55
Re: CMD: drag - by Sew_Sumi - 28.02.2018, 13:00
Re: CMD: drag - by PepsiCola23 - 28.02.2018, 13:02
Re: CMD: drag - by Sew_Sumi - 28.02.2018, 13:07
Re: CMD: drag - by PepsiCola23 - 28.02.2018, 13:09

Forum Jump:


Users browsing this thread: 2 Guest(s)