command not work /accept
#1

Hello All plesae when i type /accept job why is not work tell me again /accept job and i type it and again

+4rep who help me really!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Here the Code of the Command

Код:
CMD:accept(playerid, params[])//656
{
	new x_job[64], string[128];
	if(sscanf(params, "s[64]", x_job))
	{
		SCM(playerid, COLOR_WHITE, "|__________________ Accept __________________|");
		SCM(playerid, COLOR_WHITE, "USAGE: accept [name]");
		SCM(playerid, COLOR_GREY, "Available names: Live, Medic, Ticket, Heal, job, car");
		SCM(playerid, COLOR_WHITE, "|____________________________________________|");
		return 1;
	}
	if(strcmp(x_job,"family",true) == 0)
	{
	    if(FamilyOffer[playerid] < 999)
	    {
	        if(IsPlayerConnected(FamilyOffer[playerid]))
	        {
	            if(PlayerInfo[FamilyOffer[playerid]][pFMember] != 255)
	            {
	                if(PlayerInfo[playerid][pMember] != 0 || PlayerInfo[playerid][pLeader] != 0 || PlayerInfo[playerid][pFMember] != 255)
	                {
	                    SCM(playerid, COLOR_GREY, "   You are already in a Faction / Family !");
				        return 1;
	                }
	            	new family = PlayerInfo[FamilyOffer[playerid]][pFMember];
					format(string, sizeof(string), "* You have accepted %s's request to join %s, you are now a Member of it.", GPN(FamilyOffer[playerid]), FamilyInfo[family][FamilyName]);
					SCM(playerid, COLOR_LIGHTBLUE, string);
					format(string, sizeof(string), "* %s has accepted your request and is now a Member of your Family.", GPN(playerid));
					SCM(FamilyOffer[playerid], COLOR_LIGHTBLUE, string);
					PlayerInfo[playerid][pFMember] = family;
					ChosenSkin[playerid] = FamilyInfo[PlayerInfo[playerid][pFMember]][FamilySkin1];
					SetPlayerSkin(playerid, ChosenSkin[playerid]);
					FamilyOffer[playerid] = 999;
					FamilyInfo[family][FamilyMembers] ++;
					SaveFamilies();
					return 1;
				}
				else
				{
				    SCM(playerid, COLOR_GREY, "   The player who invited you is no longer a member of a family !");
	    			return 1;
				}
	        }
		}
		else
		{
		    SCM(playerid, COLOR_GREY, "   Nobody sent you a family invite !");
		    return 1;
		}
	}
	else if(strcmp(x_job,"divorce",true) == 0)
	{
	    if(DivorceOffer[playerid] < 999)
	    {
	        if(IsPlayerConnected(DivorceOffer[playerid]))
	        {
	            if(ProxDetectorS(10.0, playerid, DivorceOffer[playerid]))
				{
					format(string, sizeof(string), "* You have accepted %s's request to divorce", GPN(DivorceOffer[playerid]));
					SCM(playerid, COLOR_WHITE, string);
					format(string, sizeof(string), "* %s has accepted your to devorce", GPN(playerid));
					SCM(DivorceOffer[playerid], COLOR_WHITE, string);
					ClearMarriage(playerid);
					ClearMarriage(DivorceOffer[playerid]);
					PlayerInfo[playerid][pPhousekey] = 9999;
					PlayerInfo[playerid][pPbiskey] = 9999;
					return 1;
				}
				else
				{
				    SCM(playerid, COLOR_GREY, "   The player that sent you the Divorce Papers is not near you !");
				    return 1;
				}
	        }
		}
		else
		{
		    SCM(playerid, COLOR_GREY, "   No-one sent you any Divorce Papers !");
		    return 1;
		}
	}
	else if(strcmp(x_job,"witness",true) == 0)
	{
	    if(MarryWitnessOffer[playerid] < 999)
	    {
	        if(IsPlayerConnected(MarryWitnessOffer[playerid]))
	        {
	            if(ProxDetectorS(10.0, playerid, MarryWitnessOffer[playerid]))
				{
					format(string, sizeof(string), "* You have accepted %s's request to be his Marriage Witness.", GPN(MarryWitnessOffer[playerid]));
					SCM(playerid, COLOR_WHITE, string);
					format(string, sizeof(string), "* %s has accepted your request to be your Marriage Witness.", GPN(playerid));
					SCM(MarryWitnessOffer[playerid], COLOR_WHITE, string);
					MarryWitness[MarryWitnessOffer[playerid]] = playerid;
					MarryWitnessOffer[playerid] = 999;
					return 1;
				}
				else
				{
				    SCM(playerid, COLOR_GREY, "   The player that requested you to be his Marriage Witness is not near you !");
				    return 1;
				}
	        }
		}
		else
		{
		    SCM(playerid, COLOR_GREY, "   No-one asked you to be his Marriage Witness !");
		    return 1;
		}
	}
    else if(strcmp(x_job,"marriage",true) == 0)
	{
	    if(ProposeOffer[playerid] < 999)
	    {
	        if(!IsPlayerInRangeOfPoint(playerid, 10, 2232.3047,-1333.1543,23.9815))
	        {
	            SCM(playerid, COLOR_GREY, "   You are not at the Church in Jefferson !");
	            return 1;
	        }
	        if(IsPlayerConnected(ProposeOffer[playerid]))
	        {
	            if(ProxDetectorS(10.0, playerid, ProposeOffer[playerid]))
				{
				    if(MarryWitness[ProposeOffer[playerid]] == 999)
				    {
				        SCM(playerid, COLOR_GREY, "   The proposer doesn't have a Marriage Witness !");
				        return 1;
				    }
				    if(IsPlayerConnected(MarryWitness[ProposeOffer[playerid]]))
				    {
					    if(ProxDetectorS(12.0, ProposeOffer[playerid], MarryWitness[ProposeOffer[playerid]]))
						{
							format(string, sizeof(string), "* You have accepted %s's request to be your Husband.", GPN(ProposeOffer[playerid]));
							SCM(playerid, COLOR_WHITE, string);
							format(string, sizeof(string), "* %s has accepted your request to be your Wife.", GPN(playerid));
							SCM(ProposeOffer[playerid], COLOR_WHITE, string);
							format(string, sizeof(string), "Priest: %s do you take %s as your lovely Husband? (type 'yes', anything else will reject the Marriage)", GPN(playerid), GPN(ProposeOffer[playerid]));
							SCM(playerid, COLOR_WHITE, string);
							MarriageCeremoney[playerid] = 1;
							ProposedTo[ProposeOffer[playerid]] = playerid;
							GotProposedBy[playerid] = ProposeOffer[playerid];
							MarryWitness[ProposeOffer[playerid]] = 999;
							ProposeOffer[playerid] = 999;
							return 1;
						}
						else
						{
						    SCM(playerid, COLOR_GREY, "   The Marriage Witness is not near your proposer !");
						    return 1;
						}
					}
					return 1;
				}
				else
				{
				    SCM(playerid, COLOR_GREY, "   The player that proposed to you is not near you !");
				    return 1;
				}
	        }
		}
		else
		{
		    SCM(playerid, COLOR_GREY, "   No-one Proposed to you !");
		    return 1;
		}
	}
	else if(strcmp(x_job,"ticket",true) == 0)
	{
	    if(TicketOffer[playerid] < 999)
	    {
	        if(IsPlayerConnected(TicketOffer[playerid]))
	        {
	            if (ProxDetectorS(5.0, playerid, TicketOffer[playerid]))
				{
					format(string, sizeof(string), "* You have paid the Ticket of $%d to Officer %s.", TicketMoney[playerid], GPN(TicketOffer[playerid]));
					SCM(playerid, COLOR_WHITE, string);
					format(string, sizeof(string), "* %s has paid your Ticket of $%d.", GPN(playerid), TicketMoney[playerid]);
					SCM(TicketOffer[playerid], COLOR_WHITE, string);
					SafeGivePlayerMoney(playerid, - TicketMoney[playerid]);
					SafeGivePlayerMoney(TicketOffer[playerid], TicketMoney[playerid]);
					TicketOffer[playerid] = 999;
					TicketMoney[playerid] = 0;
					return 1;
				}
				else
				{
				    SCM(playerid, COLOR_GREY, "   The Officer is not near you !");
				    return 1;
				}
	        }
		}
		else
		{
		    SCM(playerid, COLOR_GREY, "   No-one offered you a Ticket !");
		    return 1;
		}
	}
	else if(strcmp(x_job,"medic",true) == 0)
	{
	    if(PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pLeader] == 4)
	    {
            if(MedicCallTime[playerid] > 0)
            {
                SCM(playerid, COLOR_GREY, "   You have already accepted a Medic Call !");
			    return 1;
            }
            if(MedicCall < 999)
            {
                if(IsPlayerConnected(MedicCall))
                {
                	format(string, sizeof(string), "* You have accepted the Medic Call from %s, you have 30 Seconds to get there.",GPN(MedicCall));
					SCM(playerid, COLOR_WHITE, string);
					SCM(playerid, COLOR_WHITE, "* After the 30 Seconds the Red Marker will dissapear.");
                    format(string, sizeof(string), "* Medic %s has accepted your Medic Call please wait at your current Position.",GPN(playerid));
					SCM(MedicCall, COLOR_WHITE, string);
					new Float:X,Float:Y,Float:Z;
					GetPlayerPos(MedicCall, X, Y, Z);
					SafeSetPlayerCheckpoint(playerid, X, Y, Z, 5,22,0);
					SCM(playerid, COLOR_LIGHTBLUE, "Medic Caller. Goto redmarker!!");
					MedicCallTime[playerid] = 1;
					MedicCall = 999;
					return 1;
				}
            }
            else
            {
                SCM(playerid, COLOR_GREY, "   No-one called for a Medic yet !");
		    	return 1;
            }
		}
		else
		{
		    SCM(playerid, COLOR_GREY, "   You are not a Medic !");
		    return 1;
		}
	}
	else if(strcmp(x_job,"live",true) == 0)
	{
	    if(LiveOffer[playerid] < 999)
	    {
			if(IsPlayerConnected(LiveOffer[playerid]))
	        {
		        if (ProxDetectorS(5.0, playerid, LiveOffer[playerid]))
				{
				    SCM(playerid, COLOR_WHITE, "* You are frozen till the Live Conversation ends.");
					SCM(LiveOffer[playerid], COLOR_WHITE, "* You are frozen till the Live Conversation ends (use /live again).");
					TogglePlayerControllable(playerid, 0);
					TogglePlayerControllable(LiveOffer[playerid], 0);
					TalkingLive[playerid] = LiveOffer[playerid];
					TalkingLive[LiveOffer[playerid]] = playerid;
					LiveOffer[playerid] = 999;
					return 1;
				}
				else
				{
				    SCM(playerid, COLOR_GREY, "   You are to far away from the News Reporter !");
					return 1;
				}
			}
			return 1;
		}
		else
		{
		    SCM(playerid, COLOR_GREY, "   No-one gave you a Live Conversation offer !");
		    return 1;
		}
	}
	else if(strcmp(x_job,"heal",true) == 0)
	{
	    if(HealOffer[playerid] < 999)
	    {
	        if(GetPlayerCash(playerid) > HealPrice[playerid])
		    {
			    if(IsPlayerConnected(HealOffer[playerid]))
			    {
					format(string, sizeof(string), "* You accepted the Heal for $%d from Medic %s.",HealPrice[playerid],GPN(HealOffer[playerid]));
					SCM(playerid, COLOR_WHITE, string);
					format(string, sizeof(string), "* %s accepted your Heal, and the $%d was added to your PayCheck.",GPN(playerid),HealPrice[playerid]);
					SCM(HealOffer[playerid], COLOR_WHITE, string);
					SafeGivePlayerMoney(HealOffer[playerid], HealPrice[playerid]);
					SafeGivePlayerMoney(playerid, -HealPrice[playerid]);
					SetPlayerHealth(playerid, 100);
			        HealOffer[playerid] = 999;
					HealPrice[playerid] = 0;
					return 1;
				}
			}
			else
			{
			    SCM(playerid, COLOR_GREY, "   You can't afford the heal !");
			    return 1;
			}
	    }
	    else
	    {
	        SCM(playerid, COLOR_GREY, "   No-one offered to heal you !");
	        return 1;
	    }
	}
	else if(strcmp(x_job,"job",true) == 0)
	{
		if(GettingJob[playerid] == 0) return SCM(playerid, -1 , "You haven't even attempted to get a job yet you bum.");
		if(PlayerInfo[playerid][pJob][0] == 0)
		{
		    if(GettingJob[playerid] != 0)
		    {
		        PlayerInfo[playerid][pJob][0] = GettingJob[playerid];
				GettingJob[playerid] = -1;
				SCM(playerid, COLOR_LIMEGREEN , "You are now employed! Congrats, now get to work.");
		    }
		}
		else if(PlayerInfo[playerid][pJob][1] == 0)
		{
		    if(GettingJob[playerid] != 0)
		    {
		        PlayerInfo[playerid][pJob][1] = GettingJob[playerid];
		        GettingJob[playerid] = -1;
				SCM(playerid, COLOR_LIMEGREEN , "You are now employed! Congrats, now get to work.");
		    }
		}
		else SCM(playerid, -1, "You already have two jobs you must quit one first!");
	}
	else if(strcmp(x_job,"taxi",true) == 0)
	{
		if(PlayerInfo[playerid][pJob][0] == 9 || PlayerInfo[playerid][pJob][1] == 9)
		{
			if(TakeTaxi[playerid] == 1)
			{
				SCM(playerid, COLOR_GREY, "[TAXI DISPATCH] You have already accepted a call. Take care of that customer first!");
				return 1;
			}
			if(CabCall != -1)
			{
				if(IsPlayerConnected(CabCall))
				{
					TakeTaxi[playerid] = 1;
					format(string, sizeof(string), "[TAXI DISPATCH] You have accepted the call from %s. Go pick them up!",GPN(CabCall)); SCM(playerid, COLOR_LIMEGREEN, string);
					format(string, sizeof(string), "[TAXI DISPATCH] Driver %s is on their way to pick you up. Please wait where you are.",GPN(playerid)); SCM(CabCall, COLOR_YELLOW, string);
					new Float:CabPos[3]; GetPlayerPos(CabCall, CabPos[0], CabPos[1], CabPos[2]);
					SafeSetPlayerCheckpoint(playerid, CabPos[0], CabPos[1], CabPos[2], 5.0,19,0); CabCall = -1;
					stop CallTimer2;
					return 1;
				}
			}
			else
			{
				SCM(playerid, COLOR_GREY, "[TAXI DISPATCH] There is no one in need of a taxi at this time.");
				return 1;
			}
		}
		else
		{
			SCM(playerid, COLOR_LIGHTRED, "If you want to be a cab driver, go to Unity Station and /join.");
			return 1;
		}
	}
	else if(strcmp(x_job,"lawyer",true) == 0)
	{
		if(PlayerInfo[playerid][pJob][0] == 11 || PlayerInfo[playerid][pJob][1] == 11)
		{
			if(LawCall != -1)
			{
				if(LawCall == playerid)
					return SCM(playerid, COLOR_LIGHTRED, "The LS Lawyers Association is smarter than that");

				if(PlayerInfo[playerid][pJailed] >= 1)
					return SCM(playerid, COLOR_LIGHTRED, "You can't accept calls when you yourself are in jail. Shame on you");

				if(IsPlayerConnected(LawCall))
				{
					new location[24];
					switch(PlayerInfo[LawCall][pJailed])
					{
						case 2: { location = "LSPD HQ"; }
						case 3: { location = "FBI HQ"; }
						case 5: { location = "LS Prison"; }
					}
					format(string, sizeof(string), "[LS Lawyers Association] You have accepted the case of %s. He or she is being held at the %s",GPN(LawCall), location);
					SCM(playerid, COLOR_LIGHTBLUE, string);
					format(string, sizeof(string), "[LS Lawyers Association] Lawyer %s is on their way.",GPN(playerid));
					SCM(LawCall, COLOR_LIGHTBLUE, string);
					PrisonerID[playerid] = LawCall;
					stop CallTimer3;
					LawCall = -1;
					return 1;
				}
			}
			else
			{
				SCM(playerid, COLOR_LIGHTRED, "[LS Lawyers Association] There is no one in need of a lawyer at this time.");
				return 1;
			}
		}
		else
		{
			SCM(playerid, COLOR_LIGHTRED, "If you want to be a lawyer, go to city hall and /join.");
			return 1;
		}
	}
	else if(strcmp(x_job,"repair",true) == 0)
	{
		if(IsPlayerInAnyVehicle(playerid))
		{
			if(IsPlayerConnected(MechanicID[playerid]))
			{
				if(MechanicID[playerid] != INVALID_PLAYER_ID)
				{
					new Float:health;
					GetVehicleHealth(GetPlayerVehicleID(playerid),health);
					switch(floatround(health,floatround_round))
					{
						case 0 .. 600:   { RepairStage[MechanicID[playerid]] = 5; RepairTimer[playerid] = defer EndMechRepair(playerid); }
						case 601 .. 700: { RepairStage[MechanicID[playerid]] = 4; RepairTimer[playerid] = defer EndMechRepair(playerid); }
						case 701 .. 800: { RepairStage[MechanicID[playerid]] = 3; RepairTimer[playerid] = defer EndMechRepair(playerid); }
						case 801 .. 900: { RepairStage[MechanicID[playerid]] = 2; RepairTimer[playerid] = defer EndMechRepair(playerid); }
						case 901 .. 999: { RepairStage[MechanicID[playerid]] = 1; RepairTimer[playerid] = defer EndMechRepair(playerid); }
					}
					TogglePlayerControllable(playerid, 0);
					TogglePlayerControllable(MechanicID[playerid], 0);
					RepairVeh[MechanicID[playerid]] = GetPlayerVehicleID(playerid);
					ApplyAnimation(MechanicID[playerid], "BOMBER","BOM_Plant_Loop",4.0,1,0,0,1,0);
					SCM(MechanicID[playerid], COLOR_PURPLE, "* The repair has been accepted, and you've started to repair the vehicle. ");
					SCM(MechanicID[playerid], COLOR_PURPLE, "* When this stage is complete /keeprepairing to continue. Make sure you Roleplay the repair!");
					SCM(playerid, COLOR_PURPLE, "* Your vehicle is now being repaired. Sit tight while the work is done. This could take a few minutes.");

					BarType[MechanicID[playerid]] = 3; JobCountdownSeconds[MechanicID[playerid]] = 25;
					SetPlayerProgressBarValue(playerid,JobBar[MechanicID[playerid]],0.0);
					ShowPlayerProgressBar(MechanicID[playerid], JobBar[MechanicID[playerid]]);
					PlayerTextDrawShow(MechanicID[playerid], JobCDTextTD[MechanicID[playerid]]);
					PlayerTextDrawShow(MechanicID[playerid], JobCDBoxTD[MechanicID[playerid]]);
					PlayerTextDrawSetString(MechanicID[playerid], JobCDTextTD[MechanicID[playerid]], "VEHICLE REPAIRS");
					jobcdtimer[MechanicID[playerid]] = SetTimerEx("JobBarUpdate", 1000, true, "i", MechanicID[playerid]);

					BarType[playerid] = 3; JobCountdownSeconds[playerid] = 25;
					SetPlayerProgressBarValue(playerid,JobBar[playerid],0.0);
					ShowPlayerProgressBar(playerid, JobBar[playerid]);
					PlayerTextDrawShow(playerid, JobCDTextTD[playerid]);
					PlayerTextDrawShow(playerid, JobCDBoxTD[playerid]);
					PlayerTextDrawSetString(playerid, JobCDTextTD[playerid], "VEHICLE REPAIRS");
					jobcdtimer[playerid] = SetTimerEx("JobBarUpdate", 1000, true, "i", playerid);
					return 1;
				}
			}
		}
	}
	else if(strcmp(x_job,"refill",true) == 0)
	{
		if(IsPlayerInAnyVehicle(playerid))
		{
			if(IsPlayerConnected(FuelMech[playerid]))
			{
				if(FuelMech[playerid] != INVALID_PLAYER_ID)
				{
					TogglePlayerControllable(playerid, 0);
					TogglePlayerControllable(FuelMech[playerid], 0);
					new vehicle = GetPlayerVehicleID(playerid);
					RefuelingTimer[playerid] = defer EndCarRefuel(vehicle, playerid);
					ApplyAnimation(FuelMech[playerid], "BOMBER","BOM_Plant_Loop",4.0,1,0,0,1,0);
					SCM(FuelMech[playerid], COLOR_PURPLE, "* The refuel has been accepted, and you've started to refuel the vehicle. ");
					SCM(playerid, COLOR_PURPLE, "* Your vehicle is now being refueled. Sit tight while the vehicle is refueled.");

					BarType[FuelMech[playerid]] = 3;
					JobCountdownSeconds[FuelMech[playerid]] = 25;
					SetPlayerProgressBarValue(playerid,JobBar[FuelMech[playerid]],0.0);
					ShowPlayerProgressBar(FuelMech[playerid], JobBar[FuelMech[playerid]]);
					PlayerTextDrawShow(FuelMech[playerid], JobCDTextTD[FuelMech[playerid]]);
					PlayerTextDrawShow(FuelMech[playerid], JobCDBoxTD[FuelMech[playerid]]);
					PlayerTextDrawSetString(FuelMech[playerid], JobCDTextTD[FuelMech[playerid]], " FUELING VEHICLE");
					jobcdtimer[FuelMech[playerid]] = SetTimerEx("JobBarUpdate", 1000, true, "i", FuelMech[playerid]);

					BarType[playerid] = 3;
					JobCountdownSeconds[playerid] = 25;
					SetPlayerProgressBarValue(playerid,JobBar[playerid],0.0);
					ShowPlayerProgressBar(playerid, JobBar[playerid]);
					PlayerTextDrawShow(playerid, JobCDTextTD[playerid]);
					PlayerTextDrawShow(playerid, JobCDBoxTD[playerid]);
					PlayerTextDrawSetString(playerid, JobCDTextTD[playerid], " FUELING VEHICLE");
					jobcdtimer[playerid] = SetTimerEx("JobBarUpdate", 1000, true, "i", playerid);
				}
			}
		}
	}
	else if(strcmp(x_job,"mechanic",true) == 0)
	{
		if(PlayerInfo[playerid][pJob][0] == 4 || PlayerInfo[playerid][pJob][1] == 4)
		{
			if(TakeRepair[playerid] == 999)
			{
				if(MechCall >= 0)
				{
					if(IsPlayerConnected(MechCall))
					{
						new Float:mechpos[3];
						TakeRepair[playerid] = MechCall; TakeRepair[MechCall] = MechCall;
						format(string, sizeof(string), "[LS Mechanic Co.] You have accepted the call from %s. Go help them out!",GPN(MechCall));
						SCM(playerid, COLOR_LIGHTBLUE, string);
						format(string, sizeof(string), "[LS Mechanic Co.] Mechanic %s is on their way. Please wait where you are.",GPN(playerid));
						SCM(MechCall, COLOR_LIGHTBLUE, string);
						GetPlayerPos(MechCall, mechpos[0], mechpos[1], mechpos[2]);
						SafeSetPlayerCheckpoint(playerid, mechpos[0], mechpos[1], mechpos[2], 5.0,27,0);
						stop CallTimer;
						MechCall = -1;
					}
				}
				else { SCM(playerid, COLOR_GRAD2, "[LS Mechanic Co.] There is no one in need of a mechanic at this time."); }
			}
			else { SCM(playerid, COLOR_GRAD2, "[LS Mechanic Co.] You have already accepted a call. Take care of that customer first!"); }
		}
		else { SCM(playerid, COLOR_LIGHTRED, "You are not a mechanic!"); }
	}
	else if(strcmp(x_job,"weed",true) == 0)
	{
		if(DrugOffer[playerid] != -1)
		{
			PlayerInfo[playerid][pDrugs][3] += DrugSale[playerid];
			PlayerInfo[DrugOffer[playerid]][pDrugs][3] -= DrugSale[playerid];
			SafeGivePlayerMoney(playerid, -DrugPrice[playerid]); SafeGivePlayerMoney(DrugOffer[playerid], DrugPrice[playerid]);
			format(string, sizeof(string), "You have sold %d grams of weed for $%d", DrugSale[playerid], DrugPrice[playerid]);
			SCM(DrugOffer[playerid], COLOR_LIMEGREEN, string);
			format(string, sizeof(string), "You have purchased %d grams of weed for $%d", DrugSale[playerid], DrugPrice[playerid]);
			SCM(playerid, COLOR_LIMEGREEN, string);
			DrugSale[playerid] = 0;
			DrugPrice[playerid] = 0;
			DrugOffer[playerid] = -1;
		}
	}
	else if(strcmp(x_job,"cocaine",true) == 0)
	{
		if(DrugOffer[playerid] != -1)
		{
			new id = DrugOffer[playerid], drugs = DrugSale[playerid], price = DrugPrice[playerid];
			PlayerInfo[playerid][pDrugs][4] += drugs; PlayerInfo[id][pDrugs][4] -= drugs;
			SafeGivePlayerMoney(playerid, -price); SafeGivePlayerMoney(id, price);
			DrugOffer[playerid] = -1; DrugSale[playerid] = 0; DrugPrice[playerid] = 0;
			format(string, sizeof(string), "You have sold %d grams of coke for $%d", drugs, price);
			SCM(id, COLOR_LIMEGREEN, string);
			format(string, sizeof(string), "You have purchased %d grams of coke for $%d", drugs, price);
			SCM(playerid, COLOR_LIMEGREEN, string);
		}
	}
	else if(strcmp(x_job,"crack",true) == 0)
	{
		if(DrugOffer[playerid] != -1)
		{
			new id = DrugOffer[playerid], drugs = DrugSale[playerid], price = DrugPrice[playerid];
			PlayerInfo[playerid][pDrugs][5] += drugs; PlayerInfo[id][pDrugs][5] -= drugs;
			SafeGivePlayerMoney(playerid, -price); SafeGivePlayerMoney(id, price);
			DrugOffer[playerid] = -1; DrugSale[playerid] = 0; DrugPrice[playerid] = 0;
			format(string, sizeof(string), "You have sold %d grams of crack for $%d", drugs, price);
			SCM(id, COLOR_LIMEGREEN, string);
			format(string, sizeof(string), "You have purchased %d grams of crack for $%d", drugs, price);
			format(string, sizeof(string), "You have purchased %d grams of crack for $%d", drugs, price);
			SCM(playerid, COLOR_LIMEGREEN, string);
		}
	}
	else if(strcmp(x_job,"release",true) == 0)
	{
		if(IsPlayerConnected(LawyerID[playerid]))
		{
			if(LawyerID[playerid] != -1)
			{
				format(string, sizeof(string), "You have set %s free, and earned $%d. It's been added to you Paycheck.", GPN(playerid), LawyerFee[LawyerID[playerid]]);
				SCM(LawyerID[playerid], COLOR_LIGHTBLUE, string);
				format(string, sizeof(string), "You are now a free man at the cost of %d. Stay out of trouble from now on.", LawyerFee[LawyerID[playerid]]);
				SCM(playerid, COLOR_LIGHTBLUE, string);
				PrisonerID[LawyerID[playerid]] = -1;
				PlayerInfo[LawyerID[playerid]][pPayCheck] += LawyerFee[LawyerID[playerid]];
				SafeGivePlayerMoney(playerid, -LawyerFee[LawyerID[playerid]]);
				PlayerInfo[playerid][pJailTime][0] = 1;
				PlayerInfo[playerid][pJailTime][1] = 0;
				LawyerFee[LawyerID[playerid]] = 0;
				AllowedLawyer[playerid] = 0;
				LawyerID[playerid] = -1;
			}
		}
	}
	else if(strcmp(x_job,"car",true) == 0)
	{
		if(BuyingUsedCar[playerid] == INVALID_PLAYER_ID) return SCM(playerid,-1,"You havn't been offered a car!");
		if(IsPlayerConnected(BuyingUsedCar[playerid]))
	    {
			new playa = BuyingUsedCar[playerid];
			if(GetPlayerCash(playerid) < BuyingUsedCarPrice[playerid]) return SCM(playerid,-1, "you don't have the cash for that!");
	        if(IsPlayerInAnyVehicle(playa))
			{
				new car = GetPlayerVehicleID(playa);
				new Float:pPos[3],m,d,y,cmodel[128];
				GetPlayerPos(playerid,pPos[0],pPos[1],pPos[2]);
				if(car == pC1[playa])
				{
					if(PlayerInfo[playerid][pPcarkey] == 9999)
					{
						pC1[playerid] = CreateVehicle(PlayerInfo[playa][pPcarkey],pPos[0],pPos[1],pPos[2], 0, PlayerInfo[playa][pC1C1], PlayerInfo[playa][pC1C2], -1);
						SetVehicleToRespawn(pC1[playerid]);
						AddVehicleComponent(pC1[playerid], PlayerInfo[playa][pM1C1]);
						AddVehicleComponent(pC1[playerid], PlayerInfo[playa][pM2C1]);
						AddVehicleComponent(pC1[playerid], PlayerInfo[playa][pM3C1]);
						AddVehicleComponent(pC1[playerid], PlayerInfo[playa][pM4C1]);
						AddVehicleComponent(pC1[playerid], PlayerInfo[playa][pM5C1]);
						AddVehicleComponent(pC1[playerid], PlayerInfo[playa][pM6C1]);
						AddVehicleComponent(pC1[playerid], PlayerInfo[playa][pM7C1]);
						AddVehicleComponent(pC1[playerid], PlayerInfo[playa][pM8C1]);
						AddVehicleComponent(pC1[playerid], PlayerInfo[playa][pM9C1]);
						AddVehicleComponent(pC1[playerid], PlayerInfo[playa][pM10C1]);
						AddVehicleComponent(pC1[playerid], PlayerInfo[playa][pM11C1]);
						AddVehicleComponent(pC1[playerid], PlayerInfo[playa][pM12C1]);
						AddVehicleComponent(pC1[playerid], PlayerInfo[playa][pM13C1]);
						AddVehicleComponent(pC1[playerid], PlayerInfo[playa][pM14C1]);
						PutPlayerInVehicle(playerid,pC1[playerid],0);
						for(new i = 0; i < 10; i++)
						{
							CarInfo[pC1[playerid]][cGunTrunk][i]  = PlayerInfo[playerid][pCar1GunTrunk][i];
							CarInfo[pC1[playerid]][cTrunkAmmo][i] = PlayerInfo[playerid][pCar1TrunkAmmo][i];
						}
						PlayerInfo[playerid][pPcarkey] = GetVehicleModel(pC1[playerid]);
						CarInfo[pC1[playerid]][cUid] = playerid;
						PlayerInfo[playerid][pPrice1] = PlayerInfo[playa][pPrice1];
						getdate(y,m,d); GetVehicleName(pC1[playerid], cmodel, sizeof(cmodel));
						format(string, sizeof(string), "[%d/%d/%d][SMC] %s purchased a %s for $%d", m,d,y,GPN(playerid),cmodel,PlayerInfo[playerid][pPrice1]);
						CarLog(string);
					}
					else if(PlayerInfo[playerid][pPcarkey2] == 9999)
					{
						pC2[playerid] = CreateVehicle(PlayerInfo[playa][pPcarkey],pPos[0],pPos[1],pPos[2], 0, PlayerInfo[playa][pC1C1], PlayerInfo[playa][pC1C1], -1);
						SetVehicleToRespawn(pC2[playerid]);
						AddVehicleComponent(pC2[playerid], PlayerInfo[playa][pM1C1]);
						AddVehicleComponent(pC2[playerid], PlayerInfo[playa][pM2C1]);
						AddVehicleComponent(pC2[playerid], PlayerInfo[playa][pM3C1]);
						AddVehicleComponent(pC2[playerid], PlayerInfo[playa][pM4C1]);
						AddVehicleComponent(pC2[playerid], PlayerInfo[playa][pM5C1]);
						AddVehicleComponent(pC2[playerid], PlayerInfo[playa][pM6C1]);
						AddVehicleComponent(pC2[playerid], PlayerInfo[playa][pM7C1]);
						AddVehicleComponent(pC2[playerid], PlayerInfo[playa][pM8C1]);
						AddVehicleComponent(pC2[playerid], PlayerInfo[playa][pM9C1]);
						AddVehicleComponent(pC2[playerid], PlayerInfo[playa][pM10C1]);
						AddVehicleComponent(pC2[playerid], PlayerInfo[playa][pM11C1]);
						AddVehicleComponent(pC2[playerid], PlayerInfo[playa][pM12C1]);
						AddVehicleComponent(pC2[playerid], PlayerInfo[playa][pM13C1]);
						AddVehicleComponent(pC2[playerid], PlayerInfo[playa][pM14C1]);
						PutPlayerInVehicle(playerid,pC2[playerid],0);
						for(new i = 0; i < 10; i++)
						{
							CarInfo[pC2[playerid]][cGunTrunk][i]  = PlayerInfo[playerid][pCar2GunTrunk][i];
							CarInfo[pC2[playerid]][cTrunkAmmo][i] = PlayerInfo[playerid][pCar2TrunkAmmo][i];
						}
						PlayerInfo[playerid][pPcarkey2] = GetVehicleModel(pC2[playerid]);
						CarInfo[pC2[playerid]][cUid] = playerid;
						PlayerInfo[playerid][pPrice2] = PlayerInfo[playa][pPrice2];
						getdate(y,m,d); GetVehicleName(pC2[playerid], cmodel, sizeof(cmodel));
						format(string, sizeof(string), "[%d/%d/%d][SMC] %s purchased a %s for $%d", m,d,y,GPN(playerid),cmodel,PlayerInfo[playerid][pPrice2]);
						CarLog(string);
					}
					else if(PlayerInfo[playerid][pPvipcar] == 9999 && PlayerInfo[playerid][pVIP] >= 2)
					{
					    pC3[playerid] = CreateVehicle(PlayerInfo[playa][pPcarkey],pPos[0],pPos[1],pPos[2], 0, PlayerInfo[playa][pC1C1], PlayerInfo[playa][pC1C2], -1);
						SetVehicleToRespawn(pC3[playerid]);
						AddVehicleComponent(pC3[playerid], PlayerInfo[playa][pM1C1]);
						AddVehicleComponent(pC3[playerid], PlayerInfo[playa][pM2C1]);
						AddVehicleComponent(pC3[playerid], PlayerInfo[playa][pM3C1]);
						AddVehicleComponent(pC3[playerid], PlayerInfo[playa][pM4C1]);
						AddVehicleComponent(pC3[playerid], PlayerInfo[playa][pM5C1]);
						AddVehicleComponent(pC3[playerid], PlayerInfo[playa][pM6C1]);
						AddVehicleComponent(pC3[playerid], PlayerInfo[playa][pM7C1]);
						AddVehicleComponent(pC3[playerid], PlayerInfo[playa][pM8C1]);
						AddVehicleComponent(pC3[playerid], PlayerInfo[playa][pM9C1]);
						AddVehicleComponent(pC3[playerid], PlayerInfo[playa][pM10C1]);
						AddVehicleComponent(pC3[playerid], PlayerInfo[playa][pM11C1]);
						AddVehicleComponent(pC3[playerid], PlayerInfo[playa][pM12C1]);
						AddVehicleComponent(pC3[playerid], PlayerInfo[playa][pM13C1]);
						AddVehicleComponent(pC3[playerid], PlayerInfo[playa][pM14C1]);
					    PutPlayerInVehicle(playerid,pC3[playerid],0);
						for(new i = 0; i < 10; i++)
						{
							CarInfo[pC3[playerid]][cGunTrunk][i]  = PlayerInfo[playerid][pCar3GunTrunk][i];
							CarInfo[pC3[playerid]][cTrunkAmmo][i] = PlayerInfo[playerid][pCar3TrunkAmmo][i];
						}
						PlayerInfo[playerid][pPvipcar] = GetVehicleModel(pC3[playerid]);
						CarInfo[pC3[playerid]][cUid] = playerid;
						PlayerInfo[playerid][pPrice3] = PlayerInfo[playa][pPrice3];
						getdate(y,m,d); GetVehicleName(pC3[playerid], cmodel, sizeof(cmodel));
						format(string, sizeof(string), "[%d/%d/%d][SMC] %s purchased a %s for $%d", m,d,y,GPN(playerid),cmodel,PlayerInfo[playerid][pPrice3]);
						CarLog(string);
					}
					else return SCM(playerid,-1,"You don't have an opened car slot.");
					PlayerInfo[playa][pPcarkey] = 9999;
					PlayerInfo[playa][pC1X] = 0;
					PlayerInfo[playa][pC1Y] = 0;
					PlayerInfo[playa][pC1Z] = 0;
					PlayerInfo[playa][pM1C1] = 0;
					PlayerInfo[playa][pM2C1] = 0;
					PlayerInfo[playa][pM3C1] = 0;
					PlayerInfo[playa][pM4C1] = 0;
					PlayerInfo[playa][pM5C1] = 0;
					PlayerInfo[playa][pM6C1] = 0;
					PlayerInfo[playa][pM7C1] = 0;
					PlayerInfo[playa][pM8C1] = 0;
					PlayerInfo[playa][pM9C1] = 0;
					PlayerInfo[playa][pM10C1] = 0;
					PlayerInfo[playa][pM11C1] = 0;
					PlayerInfo[playa][pM12C1] = 0;
					PlayerInfo[playa][pM13C1] = 0;
					PlayerInfo[playa][pM14C1] = 0;
					SafeRemovePlayerFromVehicle(playa);
					DestroyVehicle(pC1[playa]);
					SafeGivePlayerMoney(playa,BuyingUsedCarPrice[playerid]);
					SafeGivePlayerMoney(playerid,-BuyingUsedCarPrice[playerid]);
					pC1[playa] = -1;
				}
				else if(car == pC2[playa])
				{
					if(PlayerInfo[playerid][pPcarkey] == 9999)
					{
						pC1[playerid] = CreateVehicle(PlayerInfo[playa][pPcarkey2],pPos[0],pPos[1],pPos[2], 0, PlayerInfo[playa][pC2C1], PlayerInfo[playa][pC2C2], -1);
						SetVehicleToRespawn(pC1[playerid]);
						AddVehicleComponent(pC1[playerid], PlayerInfo[playa][pM1C2]);
						AddVehicleComponent(pC1[playerid], PlayerInfo[playa][pM2C2]);
						AddVehicleComponent(pC1[playerid], PlayerInfo[playa][pM3C2]);
						AddVehicleComponent(pC1[playerid], PlayerInfo[playa][pM4C2]);
						AddVehicleComponent(pC1[playerid], PlayerInfo[playa][pM5C2]);
						AddVehicleComponent(pC1[playerid], PlayerInfo[playa][pM6C2]);
						AddVehicleComponent(pC1[playerid], PlayerInfo[playa][pM7C2]);
						AddVehicleComponent(pC1[playerid], PlayerInfo[playa][pM8C2]);
						AddVehicleComponent(pC1[playerid], PlayerInfo[playa][pM9C2]);
						AddVehicleComponent(pC1[playerid], PlayerInfo[playa][pM10C2]);
						AddVehicleComponent(pC1[playerid], PlayerInfo[playa][pM11C2]);
						AddVehicleComponent(pC1[playerid], PlayerInfo[playa][pM12C2]);
						AddVehicleComponent(pC1[playerid], PlayerInfo[playa][pM13C2]);
						AddVehicleComponent(pC1[playerid], PlayerInfo[playa][pM14C2]);
						PutPlayerInVehicle(playerid,pC1[playerid],0);
						for(new i = 0; i < 10; i++)
						{
							CarInfo[pC1[playerid]][cGunTrunk][i]  = PlayerInfo[playerid][pCar1GunTrunk][i];
							CarInfo[pC1[playerid]][cTrunkAmmo][i] = PlayerInfo[playerid][pCar1TrunkAmmo][i];
						}
						PlayerInfo[playerid][pPcarkey] = GetVehicleModel(pC1[playerid]);
						CarInfo[pC1[playerid]][cUid] = playerid;
						PlayerInfo[playerid][pPrice1] = PlayerInfo[playa][pPrice1];
						getdate(y,m,d); GetVehicleName(pC1[playerid], cmodel, sizeof(cmodel));
						format(string, sizeof(string), "[%d/%d/%d][SMC] %s purchased a %s for $%d", m,d,y,GPN(playerid),cmodel,PlayerInfo[playerid][pPrice1]);
						CarLog(string);
					}
					else if(PlayerInfo[playerid][pPcarkey2] == 9999)
					{
						pC2[playerid] = CreateVehicle(PlayerInfo[playa][pPcarkey2],pPos[0],pPos[1],pPos[2], 0, PlayerInfo[playa][pC2C1], PlayerInfo[playa][pC2C2], -1);
						SetVehicleToRespawn(pC2[playerid]);
						AddVehicleComponent(pC2[playerid], PlayerInfo[playa][pM1C2]);
						AddVehicleComponent(pC2[playerid], PlayerInfo[playa][pM2C2]);
						AddVehicleComponent(pC2[playerid], PlayerInfo[playa][pM3C2]);
						AddVehicleComponent(pC2[playerid], PlayerInfo[playa][pM4C2]);
						AddVehicleComponent(pC2[playerid], PlayerInfo[playa][pM5C2]);
						AddVehicleComponent(pC2[playerid], PlayerInfo[playa][pM6C2]);
						AddVehicleComponent(pC2[playerid], PlayerInfo[playa][pM7C2]);
						AddVehicleComponent(pC2[playerid], PlayerInfo[playa][pM8C2]);
						AddVehicleComponent(pC2[playerid], PlayerInfo[playa][pM9C2]);
						AddVehicleComponent(pC2[playerid], PlayerInfo[playa][pM10C2]);
						AddVehicleComponent(pC2[playerid], PlayerInfo[playa][pM11C2]);
						AddVehicleComponent(pC2[playerid], PlayerInfo[playa][pM12C2]);
						AddVehicleComponent(pC2[playerid], PlayerInfo[playa][pM13C2]);
						AddVehicleComponent(pC2[playerid], PlayerInfo[playa][pM14C2]);
						PutPlayerInVehicle(playerid,pC2[playerid],0);
						for(new i = 0; i < 10; i++)
						{
							CarInfo[pC2[playerid]][cGunTrunk][i]  = PlayerInfo[playerid][pCar2GunTrunk][i];
							CarInfo[pC2[playerid]][cTrunkAmmo][i] = PlayerInfo[playerid][pCar2TrunkAmmo][i];
						}
						PlayerInfo[playerid][pPcarkey2] = GetVehicleModel(pC2[playerid]);
						CarInfo[pC2[playerid]][cUid] = playerid;
						PlayerInfo[playerid][pPrice2] = PlayerInfo[playa][pPrice2];
						getdate(y,m,d); GetVehicleName(pC2[playerid], cmodel, sizeof(cmodel));
						format(string, sizeof(string), "[%d/%d/%d][SMC] %s purchased a %s for $%d", m,d,y,GPN(playerid),cmodel,PlayerInfo[playerid][pPrice2]);
						CarLog(string);
					}
                    else if(PlayerInfo[playerid][pPvipcar] == 9999 && PlayerInfo[playerid][pVIP] >= 2)
					{
					    pC3[playerid] = CreateVehicle(PlayerInfo[playa][pPcarkey2],pPos[0],pPos[1],pPos[2], 0, PlayerInfo[playa][pC2C1], PlayerInfo[playa][pC2C2], -1);
						SetVehicleToRespawn(pC3[playerid]);
						AddVehicleComponent(pC3[playerid], PlayerInfo[playa][pM1C2]);
						AddVehicleComponent(pC3[playerid], PlayerInfo[playa][pM2C2]);
						AddVehicleComponent(pC3[playerid], PlayerInfo[playa][pM3C2]);
						AddVehicleComponent(pC3[playerid], PlayerInfo[playa][pM4C2]);
						AddVehicleComponent(pC3[playerid], PlayerInfo[playa][pM5C2]);
						AddVehicleComponent(pC3[playerid], PlayerInfo[playa][pM6C2]);
						AddVehicleComponent(pC3[playerid], PlayerInfo[playa][pM7C2]);
						AddVehicleComponent(pC3[playerid], PlayerInfo[playa][pM8C2]);
						AddVehicleComponent(pC3[playerid], PlayerInfo[playa][pM9C2]);
						AddVehicleComponent(pC3[playerid], PlayerInfo[playa][pM10C2]);
						AddVehicleComponent(pC3[playerid], PlayerInfo[playa][pM11C2]);
						AddVehicleComponent(pC3[playerid], PlayerInfo[playa][pM12C2]);
						AddVehicleComponent(pC3[playerid], PlayerInfo[playa][pM13C2]);
						AddVehicleComponent(pC3[playerid], PlayerInfo[playa][pM14C2]);
					    PutPlayerInVehicle(playerid,pC3[playerid],0);
						for(new i = 0; i < 10; i++)
						{
							CarInfo[pC3[playerid]][cGunTrunk][i]  = PlayerInfo[playerid][pCar3GunTrunk][i];
							CarInfo[pC3[playerid]][cTrunkAmmo][i] = PlayerInfo[playerid][pCar3TrunkAmmo][i];
						}
						PlayerInfo[playerid][pPvipcar] = GetVehicleModel(pC3[playerid]);
						CarInfo[pC3[playerid]][cUid] = playerid;
						PlayerInfo[playerid][pPrice3] = PlayerInfo[playa][pPrice3];
						getdate(y,m,d); GetVehicleName(pC3[playerid], cmodel, sizeof(cmodel));
						format(string, sizeof(string), "[%d/%d/%d][SMC] %s purchased a %s for $%d", m,d,y,GPN(playerid),cmodel,PlayerInfo[playerid][pPrice3]);
						CarLog(string);
					}
					else return SCM(playerid,-1,"You don't have an open car slot.");
					PlayerInfo[playa][pC2X] = 0;
					PlayerInfo[playa][pC2Y] = 0;
					PlayerInfo[playa][pC2Z] = 0;
					PlayerInfo[playa][pM1C2] = 0;
					PlayerInfo[playa][pM2C2] = 0;
					PlayerInfo[playa][pM3C2] = 0;
					PlayerInfo[playa][pM4C2] = 0;
					PlayerInfo[playa][pM5C2] = 0;
					PlayerInfo[playa][pM6C2] = 0;
					PlayerInfo[playa][pM7C2] = 0;
					PlayerInfo[playa][pM8C2] = 0;
					PlayerInfo[playa][pM9C2] = 0;
					PlayerInfo[playa][pM10C2] = 0;
					PlayerInfo[playa][pM11C2] = 0;
					PlayerInfo[playa][pM12C2] = 0;
					PlayerInfo[playa][pM13C2] = 0;
					PlayerInfo[playa][pM14C2] = 0;
					PlayerInfo[playa][pPcarkey2] = 9999;
					pC2[playa] = -1;
					SafeRemovePlayerFromVehicle(playa);
					DestroyVehicle(car);
					SafeGivePlayerMoney(playa,BuyingUsedCarPrice[playerid]);
					SafeGivePlayerMoney(playerid,-BuyingUsedCarPrice[playerid]);
				}
				else if(car == pC3[playa])
				{
					if(PlayerInfo[playerid][pPcarkey] == 9999)
					{
						pC1[playerid] = CreateVehicle(PlayerInfo[playa][pPvipcar],pPos[0],pPos[1],pPos[2], 0, PlayerInfo[playa][pC3C1], PlayerInfo[playa][pC3C2], -1);
						SetVehicleToRespawn(pC1[playerid]);
						AddVehicleComponent(pC1[playerid], PlayerInfo[playa][pM1C3]);
						AddVehicleComponent(pC1[playerid], PlayerInfo[playa][pM2C3]);
						AddVehicleComponent(pC1[playerid], PlayerInfo[playa][pM3C3]);
						AddVehicleComponent(pC1[playerid], PlayerInfo[playa][pM4C3]);
						AddVehicleComponent(pC1[playerid], PlayerInfo[playa][pM5C3]);
						AddVehicleComponent(pC1[playerid], PlayerInfo[playa][pM6C3]);
						AddVehicleComponent(pC1[playerid], PlayerInfo[playa][pM7C3]);
						AddVehicleComponent(pC1[playerid], PlayerInfo[playa][pM8C3]);
						AddVehicleComponent(pC1[playerid], PlayerInfo[playa][pM9C3]);
						AddVehicleComponent(pC1[playerid], PlayerInfo[playa][pM10C3]);
						AddVehicleComponent(pC1[playerid], PlayerInfo[playa][pM11C3]);
						AddVehicleComponent(pC1[playerid], PlayerInfo[playa][pM12C3]);
						AddVehicleComponent(pC1[playerid], PlayerInfo[playa][pM13C3]);
						AddVehicleComponent(pC1[playerid], PlayerInfo[playa][pM14C3]);
						PutPlayerInVehicle(playerid,pC1[playerid],0);
						for(new i = 0; i < 10; i++)
						{
							CarInfo[pC1[playerid]][cGunTrunk][i]  = PlayerInfo[playerid][pCar1GunTrunk][i];
							CarInfo[pC1[playerid]][cTrunkAmmo][i] = PlayerInfo[playerid][pCar1TrunkAmmo][i];
						}
						PlayerInfo[playerid][pPcarkey] = GetVehicleModel(pC1[playerid]);
						CarInfo[pC1[playerid]][cUid] = playerid;
						PlayerInfo[playerid][pPrice1] = PlayerInfo[playa][pPrice1];
						getdate(y,m,d); GetVehicleName(pC1[playerid], cmodel, sizeof(cmodel));
						format(string, sizeof(string), "[%d/%d/%d][SMC] %s purchased a %s for $%d", m,d,y,GPN(playerid),cmodel,PlayerInfo[playerid][pPrice1]);
						CarLog(string);
					}
					else if(PlayerInfo[playerid][pPcarkey2] == 9999)
					{
						pC2[playerid] = CreateVehicle(PlayerInfo[playa][pPvipcar],pPos[0],pPos[1],pPos[2], 0, PlayerInfo[playa][pC3C1], PlayerInfo[playa][pC3C2], -1);
						SetVehicleToRespawn(pC2[playerid]);
						AddVehicleComponent(pC2[playerid], PlayerInfo[playa][pM1C3]);
						AddVehicleComponent(pC2[playerid], PlayerInfo[playa][pM2C3]);
						AddVehicleComponent(pC2[playerid], PlayerInfo[playa][pM3C3]);
						AddVehicleComponent(pC2[playerid], PlayerInfo[playa][pM4C3]);
						AddVehicleComponent(pC2[playerid], PlayerInfo[playa][pM5C3]);
						AddVehicleComponent(pC2[playerid], PlayerInfo[playa][pM6C3]);
						AddVehicleComponent(pC2[playerid], PlayerInfo[playa][pM7C3]);
						AddVehicleComponent(pC2[playerid], PlayerInfo[playa][pM8C3]);
						AddVehicleComponent(pC2[playerid], PlayerInfo[playa][pM9C3]);
						AddVehicleComponent(pC2[playerid], PlayerInfo[playa][pM10C3]);
						AddVehicleComponent(pC2[playerid], PlayerInfo[playa][pM11C3]);
						AddVehicleComponent(pC2[playerid], PlayerInfo[playa][pM12C3]);
						AddVehicleComponent(pC2[playerid], PlayerInfo[playa][pM13C3]);
						AddVehicleComponent(pC2[playerid], PlayerInfo[playa][pM14C3]);
						PutPlayerInVehicle(playerid,pC2[playerid],0);
						for(new i = 0; i < 10; i++)
						{
							CarInfo[pC2[playerid]][cGunTrunk][i]  = PlayerInfo[playerid][pCar2GunTrunk][i];
							CarInfo[pC2[playerid]][cTrunkAmmo][i] = PlayerInfo[playerid][pCar2TrunkAmmo][i];
						}
						PlayerInfo[playerid][pPcarkey2] = GetVehicleModel(pC2[playerid]);
						CarInfo[pC2[playerid]][cUid] = playerid;
						PlayerInfo[playerid][pPrice2] = PlayerInfo[playa][pPrice2];
						getdate(y,m,d); GetVehicleName(pC2[playerid], cmodel, sizeof(cmodel));
						format(string, sizeof(string), "[%d/%d/%d][SMC] %s purchased a %s for $%d", m,d,y,GPN(playerid),cmodel,PlayerInfo[playerid][pPrice2]);
						CarLog(string);
					}
                    else if(PlayerInfo[playerid][pPvipcar] == 9999 && PlayerInfo[playerid][pVIP] >= 2)
					{
					    pC3[playerid] = CreateVehicle(PlayerInfo[playa][pPvipcar],pPos[0],pPos[1],pPos[2], 0, PlayerInfo[playa][pC3C1], PlayerInfo[playa][pC3C2], -1);
						SetVehicleToRespawn(pC3[playerid]);
						AddVehicleComponent(pC3[playerid], PlayerInfo[playa][pM1C3]);
						AddVehicleComponent(pC3[playerid], PlayerInfo[playa][pM2C3]);
						AddVehicleComponent(pC3[playerid], PlayerInfo[playa][pM3C3]);
						AddVehicleComponent(pC3[playerid], PlayerInfo[playa][pM4C3]);
						AddVehicleComponent(pC3[playerid], PlayerInfo[playa][pM5C3]);
						AddVehicleComponent(pC3[playerid], PlayerInfo[playa][pM6C3]);
						AddVehicleComponent(pC3[playerid], PlayerInfo[playa][pM7C3]);
						AddVehicleComponent(pC3[playerid], PlayerInfo[playa][pM8C3]);
						AddVehicleComponent(pC3[playerid], PlayerInfo[playa][pM9C3]);
						AddVehicleComponent(pC3[playerid], PlayerInfo[playa][pM10C3]);
						AddVehicleComponent(pC3[playerid], PlayerInfo[playa][pM11C3]);
						AddVehicleComponent(pC3[playerid], PlayerInfo[playa][pM12C3]);
						AddVehicleComponent(pC3[playerid], PlayerInfo[playa][pM13C3]);
						AddVehicleComponent(pC3[playerid], PlayerInfo[playa][pM14C3]);
						for(new i = 0; i < 10; i++)
						{
							CarInfo[pC3[playerid]][cGunTrunk][i]  = PlayerInfo[playerid][pCar3GunTrunk][i];
							CarInfo[pC3[playerid]][cTrunkAmmo][i] = PlayerInfo[playerid][pCar3TrunkAmmo][i];
						}
					    PutPlayerInVehicle(playerid,pC3[playerid],0);
						PlayerInfo[playerid][pPvipcar] = GetVehicleModel(pC3[playerid]);
						CarInfo[pC3[playerid]][cUid] = playerid;
						PlayerInfo[playerid][pPrice3] = PlayerInfo[playa][pPrice3];
						getdate(y,m,d); GetVehicleName(pC3[playerid], cmodel, sizeof(cmodel));
						format(string, sizeof(string), "[%d/%d/%d][SMC] %s purchased a %s for $%d", m,d,y,GPN(playerid),cmodel,PlayerInfo[playerid][pPrice3]);
						CarLog(string);
					}
					else return SCM(playerid,-1,"You don't have an opened car slot.");
					PlayerInfo[playa][pC3X] = 0;
					PlayerInfo[playa][pC3Y] = 0;
					PlayerInfo[playa][pC3Z] = 0;
					PlayerInfo[playa][pM1C3] = 0;
					PlayerInfo[playa][pM2C3] = 0;
					PlayerInfo[playa][pM3C3] = 0;
					PlayerInfo[playa][pM4C3] = 0;
					PlayerInfo[playa][pM5C3] = 0;
					PlayerInfo[playa][pM6C3] = 0;
					PlayerInfo[playa][pM7C3] = 0;
					PlayerInfo[playa][pM8C3] = 0;
					PlayerInfo[playa][pM9C3] = 0;
					PlayerInfo[playa][pM10C3] = 0;
					PlayerInfo[playa][pM11C3] = 0;
					PlayerInfo[playa][pM12C3] = 0;
					PlayerInfo[playa][pM13C3] = 0;
					PlayerInfo[playa][pM14C3] = 0;
					PlayerInfo[playa][pPvipcar] = 9999;
					pC3[playa] = -1;
					SafeRemovePlayerFromVehicle(playa);
					DestroyVehicle(car);
					SafeGivePlayerMoney(playa,BuyingUsedCarPrice[playerid]);
					SafeGivePlayerMoney(playerid,-BuyingUsedCarPrice[playerid]);
				}
			}
		}
	}
	else if(strcmp(x_job,"house",true) == 0)
	{
		if(BuyingHouse[playerid] == -1)
			return SCM(playerid, COLOR_LIGHTRED, "There is no house to accept");

		PlayerInfo[playerid][pPhousekey] = PlayerInfo[BuyingHouse[playerid]][pPhousekey];
		SafeGivePlayerMoney(BuyingHouse[playerid],BuyingHousePrice[playerid]);
		SafeGivePlayerMoney(playerid,-BuyingHousePrice[playerid]);
		PlayerInfo[playerid][pHousePrice] = PlayerInfo[BuyingHouse[playerid]][pHousePrice];
		PlayerInfo[BuyingHouse[playerid]][pHousePrice] = 0;
		PlayerInfo[BuyingHouse[playerid]][pPhousekey] = 9999;
		format(string,sizeof(string),"You have purchased a house from %s for %d", GPN(BuyingHouse[playerid]), BuyingHousePrice[playerid]);
		SCM(playerid,COLOR_LIGHTBLUE,string);
		format(string,sizeof(string),"You have sold your house to %s for $%d", GPN(playerid), BuyingHousePrice[playerid]);
		SCM(BuyingHouse[playerid],COLOR_LIGHTBLUE,string);
		strmid(HouseInfo[PlayerInfo[playerid][pPhousekey]][hOwner], GPN(playerid), 0, strlen(GPN(playerid)), 255);
		new y,m,d; getdate(y,m,d);
		format(string, sizeof(string), "[%d/%d/%d][SMH] %s Purchased HouseID %d From %s For $%d", m,d,y,GPN(playerid),PlayerInfo[playerid][pPhousekey], GPN(BuyingHouse[playerid]),BuyingHousePrice[playerid]);
		HouseLog(string);
		format(string, sizeof(string), "[%d/%d/%d][SMH] %s Sold HouseID %d For $%d to %s", m,d,y,GPN(BuyingHouse[playerid]),PlayerInfo[playerid][pPhousekey],BuyingHousePrice[playerid],GPN(playerid));
		HouseLog(string);
		FullHouseSave(PlayerInfo[playerid][pPhousekey]);
		OnPropTextdrawUpdate(1,PlayerInfo[playerid][pPhousekey]);
		BuyingHousePrice[playerid] = -1;
		BuyingHouse[playerid] = -1;
	}
	else if(strcmp(x_job,"mats",true) == 0)
	{
		if(BuyingMats[playerid] == -1)
			return SCM(playerid, COLOR_LIGHTRED, "There are no mats to accept");

		SafeGivePlayerMoney(playerid, -BuyingMatsPrice[playerid]);
		SafeGivePlayerMoney(BuyingMatsFrom[playerid], BuyingMatsPrice[playerid]);
		PlayerInfo[playerid][pMats] += BuyingMats[playerid];
		PlayerInfo[BuyingMatsFrom[playerid]][pMats] -= BuyingMats[playerid];
		format(string,sizeof(string),"You have purchased %d mats from %s for %d",BuyingMats[playerid], GPN(BuyingMatsFrom[playerid]), BuyingMatsPrice[playerid]);
		SCM(playerid,COLOR_LIGHTBLUE,string);
		format(string,sizeof(string),"You have sold %d mats to %s for $%d", BuyingMats[playerid], GPN(playerid), BuyingMatsPrice[playerid]);
		SCM(BuyingMatsFrom[playerid],COLOR_LIGHTBLUE,string);
		new y1,m,d,h,mi,s;
		getdate(y1,m,d); gettime(h,mi,s);
		format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s [CMD] -> /givemats %s %d",d,m,y1,h,mi,s,GPN(BuyingMatsFrom[playerid]), GPN(playerid), BuyingMats[playerid]);
		CommandLog(string);
		BuyingMatsFrom[playerid] = -1;
		BuyingMatsPrice[playerid] = -1;
		BuyingMats[playerid] = -1;
	}
	else if(strcmp(x_job,"keys",true) == 0)
	{
		if(GettingKey[playerid] == -1)
			return SCM(playerid, COLOR_LIGHTRED, "There are no keys to accept");

		ExtraKey[playerid] = CarKeyLend[playerid];
		format(string, sizeof(string), "%s has taken the extra key to your car.", GPN(playerid));
		SCM(GettingKey[playerid], COLOR_LIGHTBLUE, string);
		format(string, sizeof(string), "You have taken the extra key to %s's car.", GPN(GettingKey[playerid]));
		SCM(playerid, COLOR_LIGHTBLUE, string);
		GettingKey[playerid] = -1;
		CarKeyLend[playerid] = -1;
	}
	else if(strcmp(x_job,"death",true) == 0)
	{
		if(AcceptDeath[playerid] == 1)
		{
			stop DeathTimer[playerid];
   			AcceptDeath[playerid] = -1;
   			SetPlayerHealth(playerid, 0);
   			justdied[playerid] = 1;
			SetPlayerColor(playerid,0xFFFFFF00);
		}
	}
	return 1;
}
Reply


Messages In This Thread
command not work /accept - by Barnwell - 31.01.2015, 16:06

Forum Jump:


Users browsing this thread: 1 Guest(s)