All pastes #769304 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-11-11 10:16 UTC
rendered paste body

#include <a_samp>
//#include <my>
#include <dutils>
#include <Dini>
#include <DUDB>

// ------- Spots
#define SPOT_NONE 0
#define SPOT_SCHOOL 1
#define SPOT_SCHOOL_CREEK 2
#define SPOT_JOB_BLUEBERRY 3
#define SPOT_GS_DILLIMORE 4
#define SPOT_FARMER 5
#define SPOT_TRUCK 6
#define SPOT_ALCOHOL 7
#define SPOT_JOB_BARMAN 8
#define SPOT_JOB_ARMS_DROP 9
#define SPOT_Garage 10
#define SPOT_BAR 11
#define SPOT_RANGE 12
#define SPOT_RANGE_INS 13
#define SPOT_RANGE_EINS 14
#define SPOT_RANGE_EXIT 15
#define SPOT_PIZZA 16
#define SPOT_HOSPITAL 17
#define SPOT_MECHANIC 18
#define SPOT_PIZZASTORE 19
#define SPOT_GarageSTORE 20
#define SPOT_BARBERSTORE 21
#define SPOT_BIKESSTORE 22
#define SPOT_FARMEBLUEBERRY 23
#define SPOT_GS_MONTOGOMERY 24
#define SPOT_BUS 25
#define SPOT_SCHOOLSTUDY 26
#define SPOT_TAKEPIZZA 27
#define SPOT_DEMEDICIMAINENTER 28
#define SPOT_DEMEDICIMAINEXIT 29
#define SPOT_DEMEDICIBACKENTER 30
#define SPOT_DEMEDICIBACKEXIT 31
#define SPOT_ICECREAM 32
#define SPOT_ICECREAMGET 33
#define SPOT_JOB_ARMS 34
#define SPOT_JOB_ARMS_GET 35
#define SPOT_CLUB 36

// ------- Text Draws
#define TEXTDRAW_PIZZA 0
#define TEXTDRAW_TRUCK 1
#define TEXTDRAW_FARMER 2
#define TEXTDRAW_MEDIC 3
#define TEXTDRAW_BARMAN 4
#define TEXTDRAW_DRAGRACE 5
#define TEXTDRAW_SPRINTRACE 6
#define TEXTDRAW_ICECREAM 7
#define TEXTDRAW_ARMSDEALER 8
#define TEXTDRAW_MECHANIC 9
#define TEXTDRAW_BUS 10

// ------- Colors
#define COLOR_WHITE 0xFFFFFFFF
#define COLOR_GOLD 0xF7DFB5AA
#define COLOR_GREEN 0xFF0000F
#define COLOR_MEDGREEN 0x6BCF00AA
#define COLOR_YELLOW 0xFFFF00FF
#define COLOR_LOWYELLOW 0xFFFD87AA
#define COLOR_RED 0xFF0000FF
#define COLOR_MEDRED 0xaa3333AA
#define COLOR_DBLUE 0x2641FEAA
#define COLOR_MEDBLUE 0x0099FFFF
#define COLOR_LIGHTBLUE 0x75FFFDAA
#define COLOR_HIGHBLUE 0x102E5AAA
#define COLOR_ORANGE 0xFF654AAA
#define COLOR_GREY 0xA9A9A9FF
#define COLOR_GREYMED 0xC3C3C3FF
#define COLOR_SYSTEM 0xB2EBE0AA
#define COLOR_POLICE 0xFF0000AA
#define COLOR_ADMINC 0xD5CAAEAA
#define COLOR_POLICER 0xBBF2F7AA
#define COLOR_ACIR 0xDE1042AA
#define COLOR_ENGINE 0x00FFCCAA

#define COLOR_FADE1 0xE6E6E6E6
#define COLOR_FADE2 0xC8C8C8C8
#define COLOR_FADE3 0xAAAAAAAA
#define COLOR_FADE4 0x8C8C8C8C
#define COLOR_FADE5 0x6E6E6E6E

// ------- Jobs To Accept
#define ACCEPT_FARMER 0
#define ACCEPT_FARMER2 1
#define ACCEPT_BARMAN 2
#define ACCEPT_MEDIC 3
#define ACCEPT_TRUCKER 4
#define ACCEPT_PIZZA 5
#define ACCEPT_NONE 6
#define ACCEPT_ICECREAM 7
#define ACCEPT_ARMSDEALER 8
#define ACCEPT_MECHANIC 9
#define ACCEPT_BUS 10

// ------- General Store
#define INTB_DILLIMORE 0
#define INTB_MONTOGOMERY 1
#define INTB_PALOMINO 2
#define INTB_NONE 3
// ------- Driving Schools
#define INTB_PALOMINO_DS 4
#define INTB_BLUEBERRY_DS 5
#define INTB_DRINKBAR 6

// ------- Owner
#define OWNER_PIZZA_PURCHASED 0
#define OWNER_PIZZA_NONPURCHASED 1
#define OWNER_Garage_PURCHASED 2
#define OWNER_Garage_NONPURCHASED 3
#define OWNER_BIKES_PURCHASED 4
#define OWNER_BIKES_NONPURCHASED 5
#define OWNER_BARBER_PURCHASED 6
#define OWNER_BARBER_NONPURCHASED 7

#define dcmd(%1,%2,%3) if ((strcmp((%3), "/" #%1, true, (%2) + 1) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, ""))) || (((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
#define dcmd2(%1,%2,%3) if ((strcmp(%3, "/%1", true, %2+1) == 0)&&(((%3[%2+1]==0)&&(dcmd_%1(playerid)))||((%3[%2+1]==32)&&(dcmd_%1(playerid))))) return 1

forward CheckInfo();
forward DoCountDown();
forward PayDay();
forward JobPay();
forward ResetWanted();
forward PlayerHealth();
forward JobTimeCounter();
forward ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5);
forward ProxDetectorS(Float:radi, playerid, targetid);
forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);
forward ABroadCast(color,const string[],level);
forward BroadCast(color,const string[]);
forward PayList(string[]);
forward KickLog(string[]);
forward BanList(string[]);
forward AdvList(string[]);
forward SyncVirtualTime();
forward IsACopCar(carid);
forward IsABikeCar(carid);
forward IsAAmbCar(carid);
forward IsATunnedCar(carid);
forward IsAInsCar(carid);
forward IsAtBank(playerid);
forward IsAt247(playerid);
forward IsAtGasStation(playerid);
forward IsAtPoliceComp(playerid);
forward GetClosestPlayer(p1);
forward DollahScoreUpdate();
forward ShowStats(playerid,targetid);
forward CheckGas();
forward Fillup();
forward SyncUp();
forward Encrypt(string[]);
forward HourFix(hour);
forward OOCOff(color,const string[]);
forward PlayerUpdate();
forward OnPlayerRegister(playerid, password[]);
forward OnPlayerLogin(playerid,password[]);
forward OnPlayerUpdate(playerid);
forward ini_GetKey( line[] );
forward SaveAccounts();
forward ini_GetValue( line[] );
forward SendAdminMessage(color, string[]);
forward SendPoliceMessage(color, string[]);
forward SendFMemberMessage(color, string[]);
forward SetPlayerFree(playerid,declare,reason[]);
forward ClearCrime(playerid);
forward SendAciMessage(color, string[]);
forward Float:GetDistanceBetweenPlayers(p1,p2);
forward SecoundTimeEx();
forward PlayerUnjailTimer();
forward AddsOn();
forward SecondTimer();

new playersonline;
// Classes
new pClass[MAX_PLAYERS];

// Player Account
new bool:PLAYERLIST_authed[MAX_PLAYERS];
new PlayerAccount[MAX_PLAYERS];
new accountstimer;
new RegistrationStep[MAX_PLAYERS];
new RegQuestionWas[MAX_PLAYERS];
new levelcost = 25000;
new levelexp = 4;

// Bank Iteams
new bool:gDice[MAX_PLAYERS];
new bool:Rope[MAX_PLAYERS];
new bool:Clock[MAX_PLAYERS];
new bool:Chain[MAX_PLAYERS];

// Races
new drag;
new race;
new raceblock[MAX_PLAYERS];
new dragblock[MAX_PLAYERS];
new streetrace[MAX_PLAYERS];
new dragrace[MAX_PLAYERS];

// Bus
new BusDrivers = 0;
new TransportDuty[MAX_PLAYERS];
new TransportMoney[MAX_PLAYERS];
new TransportValue[MAX_PLAYERS];
new TransportDriver[MAX_PLAYERS];

// Phone
new CallCost[MAX_PLAYERS];
new callcost = 10; //20 seconds
new cchargetime = 60;
new CellTime[MAX_PLAYERS];
new Mobile[MAX_PLAYERS];
new RingTone[MAX_PLAYERS];
new TransportTime[MAX_PLAYERS];
new TransportCost[MAX_PLAYERS];

// Screens texts
new adds = 1;
new addtimer = 60000;
new gOoc[MAX_PLAYERS];
new noooc = 0;
new countdown[MAX_PLAYERS];
new countblock[MAX_PLAYERS];

// Float's
new Float:TelePos[MAX_PLAYERS][6];
new spot[MAX_PLAYERS];

// Gas Station
#define GasMax 100
#define RunOutTime 5000
#define RefuelWait 5000
#define CAR_AMOUNT 263
new Gas[CAR_AMOUNT];
new gGas[MAX_PLAYERS];
new Refueling[MAX_PLAYERS];
new checkgastimer;
new bool:NoFuel[MAX_PLAYERS];

// cars
new bool:engine[MAX_PLAYERS];

// Jobs
new pizzacheck[MAX_PLAYERS];
new farmercheck[MAX_PLAYERS];
new farmercheck_p[MAX_PLAYERS];
new barmans;
new medics;
new bus;
new farmer;
new farmer1;
new truck;
new pizza;
new armsdealers;
new jobtimer[MAX_PLAYERS];
new jobcounter[MAX_PLAYERS];
new trailergas[MAX_PLAYERS];
new pizzas[MAX_PLAYERS];
new icecreamsellers;
new icecreamunit[MAX_PLAYERS];
new MatsHolding[MAX_PLAYERS];
new MetalsHolding[MAX_PLAYERS];
new OnDuty[MAX_PLAYERS];
new bustrack[MAX_PLAYERS];

// Accepted
new accept_b[MAX_PLAYERS];
new DrinksBought[MAX_PLAYERS];
new PizzasBought[MAX_PLAYERS];

// Offers
new DrinkOffer[MAX_PLAYERS];
new DrinkPrice[MAX_PLAYERS];
new DrinkSold[MAX_PLAYERS];
new PizzaOffer[MAX_PLAYERS];
new PizzaPrice[MAX_PLAYERS];
new IcecreamOffer[MAX_PLAYERS];
new IcecreamPrice[MAX_PLAYERS];
new RepairOffer[MAX_PLAYERS];
new RepairPrice[MAX_PLAYERS];
new RepairCar[MAX_PLAYERS];
new PainKillerOffer[MAX_PLAYERS];
new PainKillerPrice[MAX_PLAYERS];
new HealOffer[MAX_PLAYERS];
new HealPrice[MAX_PLAYERS];
new TicketOffer[MAX_PLAYERS];
new TicketMoney[MAX_PLAYERS];
new MedicCall = 999;
new MedicCallTime[MAX_PLAYERS];
new RefillOffer[MAX_PLAYERS];
new RefillPrice[MAX_PLAYERS];

// Properties
new owner[MAX_PLAYERS];

// Text
new spawntext[MAX_PLAYERS];
new pizzatext[MAX_PLAYERS];
new combinetext[MAX_PLAYERS];
new texttimer[MAX_PLAYERS];
new Text:textdraw[MAX_TEXT_DRAWS];
new textdrawtimer[MAX_PLAYERS];

// Menu's
new Menu:menu[MAX_PLAYERS];

// Player Time
new ghour = 0;
new shour;
new timeshift = 0;
new synctimer;
new sectimer;

// Player
new f_health[MAX_PLAYERS];
new BigEar[MAX_PLAYERS];
new ConsumingMoney[MAX_PLAYERS];
new bool:PlayerCuffed[MAX_PLAYERS];
new JailPrice[MAX_PLAYERS];
new PlayerCuffedTime[MAX_PLAYERS];
new PrisonCamera[MAX_PLAYERS];
new bool:PlayerTied[MAX_PLAYERS];
new bool:PlayerChained[MAX_PLAYERS];
new bool:realchat = true;

new CurrentMoney[MAX_PLAYERS];
//=From my.inc:=================================================================
stock IsPlayerInSphere(playerid,Float:x,Float:y,Float:z,radius) //By Sacky
{
if(GetPlayerDistanceToPointEx(playerid,x,y,z) < radius){
return 1;
}
return 0;
}
stock GetPlayerDistanceToPointEx(playerid,Float:x,Float:y,Float:z) //By Sacky
{
new Float:x1,Float:y1,Float:z1;
new Float:tmpdis;
GetPlayerPos(playerid,x1,y1,z1);
tmpdis = floatsqroot(floatpower(floatabs(floatsub(x,x1)),2)+floatpower(floatabs(floatsub(y,y1)),2)+floatpower(floatabs(floatsub(z,z1)),2));
return floatround(tmpdis);
}
stock IsPlayerInCircle(playerid,Float:x,Float:y,radius) //By Sacky
{
if(GetPlayerDistanceToPoint(playerid,x,y) < radius){
return 1;
}
return 0;
}
stock GetPlayerDistanceToPoint(playerid,Float:x,Float:y) //By Sacky
{
new Float:x1,Float:y1,Float:z1;
new Float:tmpdis;
GetPlayerPos(playerid,x1,y1,z1);
tmpdis = floatsqroot(floatpower(floatabs(floatsub(x,x1)),2)+floatpower(floatabs(floatsub(y,y1)),2));
return floatround(tmpdis);
}
stock id2file(const playerid)
{
	new file[128];
	new playerName[64];

    GetPlayerName(playerid,playerName,sizeof(playerName));
    format(file,sizeof(file),"players_%s.txt",playerName);

	return file;
}
/*BIG TNX TO Sacky!!!*/
//==============================================================================
enum pCrime
{
	pBplayer[32],
	pAccusing[32],
	pAccusedof[32],
	pVictim[32],
};
new PlayerCrime[MAX_PLAYERS][pCrime];

enum pInfo
{
    pKey[128],
	pAdmin,
	pCivilian,
	pPolice,
	pInstructor,
	pFMember,
	pFLeader,
	pAci,
	pCarLic,
	pGunLic,
	pSailLic,
	pJob,
	pDelivery,
	pJailTime,
	pJailed,
	pArrested,
	pMoney,
	pRegistered,
	pLoggedTries,
	pContractTime,
	pMaterials,
	pArmsDealerSkill,
	pMechanicSkill,
	pPainKillers,
	pLivingArea,
	pPhonenumber,
	pKills,
	pDeaths,
	pAccount,
	pModel,
	pChar,
	pPayCheck,
	pLevel,
	pPhoneBook,
	pCockie,
	pCutter,
	pConnectTime,
	pExp,
	pRank,
	pWarns,
	
};

new PlayerInfo[MAX_PLAYERS][pInfo];


enum pHouse
{
	pInfoHouse,
	
};

new PlayerHouse[MAX_PLAYERS][pHouse];

// LOCK/OPEN

new bool:DMVdoor[MAX_PLAYERS];

// Message System


// Checkpoint Counter
new vf_check[MAX_PLAYERS] = 1;
new vf1_check[MAX_PLAYERS] = 1;
new pizza_check[MAX_PLAYERS] = 1;

// INTERIOR BLOCKS
new int_b[MAX_PLAYERS];
new playerinclub;

new PlayerPeds[127][1] = {
{264},
{164},// ACI 1
{163},// ACI 2
{286},// ACI 3
{288},// ViperKing - Cheif 4
{282},// Police Class 5
{186},// Mayor 6
{147},// School Manager 7
{171},// Instructor Class 8
{120},// Crime Familey 9
{68},// Crime Familey 10
{125},// Crime Familey 11
{111},// Crime Familey 12
{274},{275},{276}, // PPARAMEDICS 12 - 14
{198},//CIVILIANS
{157},{158},{159},{160},{161},{9},{148},{13},{248},{156},{46},
{262},{17},{21},{19},{28},{249},{66},{67},{20},{190},{165},{24},{200},
{170},{250},{124},{126},{224},{206},{127},{233},{240},{241},
{234},{235},{72},{225},{221},{220},{54},{15},{34},{32},{33},
{44},{38},{132},{259},{64},{43},{7},{112},{111},{30},{210},
{59},{60},{242},{231},{257},{207},{184},{150},{183},{182},
{78},{177},{26},{261},{217},{27},{153},{100},{29},
{36},{37},{50},{98},{101},{122},{22},{214},{58},{141},{133},
{223},{132},{35},{258},{195},{189},{222},{121},{187},{185},{229},{202},{215},
{70},{14},{128},{134},{95},{136},{96},{61},{211},{228},{227} // 127
};


//------------------------------------------------------------------------------

dcmd_farmer(const playerid, const params[])
{

    if (strcmp(params,"soemem",true)==0)
    {

    }

	else if (strcmp(params,"palomino",true)==0)
  	{
		if (spot[playerid] == SPOT_FARMEBLUEBERRY)
 		{
   			if(PlayerInfo[playerid][pJob] == 0)
	    	{
				if(PlayerInfo[playerid][pCivilian] == 1)
				{
   					if(PlayerInfo[playerid][pCarLic] == 1)
			    	{
				        if(farmer1 < 3)
				        {
        				accept_b[playerid] = ACCEPT_FARMER2;
        				SendClientMessage(playerid,COLOR_WHITE,"* in order to start this job type /accept job, or to deny /deny job.");
        				}
        				else
						{
						SendClientMessage(playerid,COLOR_WHITE,"Farme: were sorry, but all the farmer slots in use this moment");
						}
        			}
					else
 	       			{
        			SendClientMessage(playerid,COLOR_GREY,"Farme: you must have a driving license before you can work here!");
  					}
       			}
				else
 	       		{
        		SendClientMessage(playerid,COLOR_WHITE,"Farme: Only civilians can work here!");
        		}
			}
			else
			{
        	SendClientMessage(playerid,COLOR_GREY,"Farme: you cant work here right now,finish your job and try again later.");
			}
		}
		else
		{
		
		}
	}



	else if (strcmp(params,"blueberry",true)==0)
   	{
 		if (spot[playerid] == SPOT_FARMER)
 		{
   			if(PlayerInfo[playerid][pJob] == 0)
       	    {
				if(PlayerInfo[playerid][pCivilian] == 1)
				{
				    if(PlayerInfo[playerid][pCarLic] == 1)
				    {
				        if(farmer < 6)
				        {
        				accept_b[playerid] = ACCEPT_FARMER;
        				SendClientMessage(playerid,COLOR_WHITE,"* in order to start this job type /accept job, or to deny /deny job.");
        				}
        				else
						{
						SendClientMessage(playerid,COLOR_WHITE,"Farme: were sorry, but all the farmer slots in use this moment");
						}
        			}
					else
 	       			{
        			SendClientMessage(playerid,COLOR_WHITE,"Farme: You can't work here if you dont have a driving license!");
  					}
       			}
				else
 	       		{
        		SendClientMessage(playerid,COLOR_WHITE,"Farme: Only civilians can work here!");
        		}
			}
			else
			{
        	SendClientMessage(playerid,COLOR_GREY,"Farme: you cant work here right now,finish your job and try again later.");
			}
		}
		else
		{

		}
	}
	
	return 1;
}

dcmd_deny(const playerid, const params[])
{

    if (strcmp(params,"somemem",true)==0)
    {
    
    
    }

 	if (strcmp(params,"job",true)==0)
  	{
   		if(accept_b[playerid] == ACCEPT_BARMAN)
     	{
     	accept_b[playerid] = ACCEPT_NONE;
		SendClientMessage(playerid,COLOR_WHITE,"SERVER: Your barman job has denied");
     	}

   		if(accept_b[playerid] == ACCEPT_MEDIC)
     	{
     	accept_b[playerid] = ACCEPT_NONE;
     	SendClientMessage(playerid,COLOR_WHITE,"SERVER: Your medic job has denied");
     	}

   		if(accept_b[playerid] == ACCEPT_TRUCKER)
     	{
     	accept_b[playerid] = ACCEPT_NONE;
     	SendClientMessage(playerid,COLOR_WHITE,"SERVER: Your trucker job has denied");
     	}

   		if(accept_b[playerid] == ACCEPT_PIZZA)
     	{
     	accept_b[playerid] = ACCEPT_NONE;
     	SendClientMessage(playerid,COLOR_WHITE,"SERVER: Your pizzaboy job has denied");
     	}

   		if(accept_b[playerid] == ACCEPT_FARMER)
     	{
     	accept_b[playerid] = ACCEPT_NONE;
     	SendClientMessage(playerid,COLOR_WHITE,"SERVER: Your farmer job has denied");
     	}

   		if(accept_b[playerid] == ACCEPT_FARMER2)
     	{
     	accept_b[playerid] = ACCEPT_NONE;
     	SendClientMessage(playerid,COLOR_WHITE,"SERVER: Your farmer job has denied");
     	}
   }

	return 1;
}


main()
{
}

public OnGameModeInit()
{
	SetGameModeText("Countryside RP");
	ShowPlayerMarkers(0);
	ShowNameTags(1);
 	AllowInteriorWeapons(1);
 	UsePlayerPedAnims();
 	

 	
 	// Text Draws
 	textdraw[ TEXTDRAW_PIZZA ] = TextDrawCreate(142.0, 360.0, "Now that you have confirmed you want the job, you got a~n~5 hour Contract.Your job will be finish when half hour~n~pass, untill then you'll have to work.~n~~r~commands~w~: /quitjob, /Jobhelp~n~(type /done when you finish to read)");
    textdraw[ TEXTDRAW_TRUCK ] = TextDrawCreate(142.0, 360.0, "Now that you have confirmed you want the job, you got a~n~5 hour Contract.Your job will be finish when half hour~n~pass, untill then you'll have to work.~n~~r~commands~w~: /quitjob,/Jobhelp~n~(type /done when you finish to read)");
    textdraw[ TEXTDRAW_FARMER ] = TextDrawCreate(142.0, 360.0, "Now that you have confirmed you want the job, you got a~n~5 hour Contract.Your job will be finish when half hour~n~pass, untill then you'll have to work.~n~~r~commands~w~: /quitjob, /Jobhelp~n~(type /done when you finish to read)");
    textdraw[ TEXTDRAW_MEDIC ] = TextDrawCreate(142.0, 360.0, "Now that you have confirmed you want the job, you got a~n~5 hour Contract.Your job will be finish when 3 hour~n~pass, untill then you'll have to work.~n~~r~commands~w~: /quitjob, /Jobhelp, /heal~n~(type /done when you finish to read)");
    textdraw[ TEXTDRAW_BARMAN ] = TextDrawCreate(142.0, 360.0, "Now that you have confirmed you want the job, you got a~n~5 hour Contract. you are a barman now.~n~~r~commands~w~: /quitjob, /Jobhelp, /sell drink~n~(type /done when you finish to read)");
    textdraw[ TEXTDRAW_DRAGRACE ] = TextDrawCreate(142.0, 360.0, "Get into the vehicle and read the instructions.~n~Drive to the north blueberry beach area and get the car!");
    textdraw[ TEXTDRAW_SPRINTRACE ] = TextDrawCreate(142.0, 360.0, "Get into the vehicle and read the instructions. (type /done when you finish to read)");
    textdraw[ TEXTDRAW_ICECREAM ] = TextDrawCreate(142.0, 360.0, "Now that you have confirmed you want the job, you got a~n~5 hour Contract. you are a barman now.~n~~r~commands~w~: /quitjob, /Jobhelp, /sell icecream~n~(type /done when you finish to read)");
    textdraw[ TEXTDRAW_ARMSDEALER ] = TextDrawCreate(142.0, 360.0, "Now that you have confirmed you want the job, you got a~n~5 hour Contract. you are a armds dealer now,~n~~r~commands~w~: /quitjob, /Jobhelp, /sell gun /materials~n~(type /done when you finish to read)");
    textdraw[ TEXTDRAW_MECHANIC ] = TextDrawCreate(142.0, 360.0, "Now that you have confirmed you want the job, you got a~n~5 hour Contract. you are a mechanic now,~n~~r~commands~w~: /quitjob, /refill, /repair~n~(type /done when you finish to read)");
    textdraw[ TEXTDRAW_BUS ] = TextDrawCreate(142.0, 360.0, "Now that you have confirmed you want the job, you got a~n~5 hour Contract. you are a mechanic now,~n~~r~commands~w~: /quitjob, /fare /duty~n~(type /done when you finish to read)");
    
   	for(new c=0;c<CAR_AMOUNT;c++)
	{
		Gas[c] = GasMax;
	}
    
	// Timers
	SetTimer("CheckInfo",1000,1); // CheckInfo
	SetTimer("DoCountDown",1000,1); // DoCountDown
	SetTimer("PayDay",60000,1); // SpawnDelay
	SetTimer("JobPay",240000,1); // Pay For Store Owmers
	SetTimer("ResetWanted",180000,1); // -Wanted Player Level
	SetTimer("JobTimeCounter",60000,1); // Adding Hours To Job Contract
	SetTimer("PlayerUpdate",600000,1); // Saveing Player Info Every 10 Min!!
	accountstimer = SetTimer("SaveAccounts", 1800000, 1); // Save All Online Player Accounts
	SetTimer("PlayerUnjailTimer",1000,1);
	synctimer = SetTimer("SyncUp", 10000, 1);
	sectimer = SetTimer("SecondTimer", 1000, 1);
	checkgastimer = SetTimer("CheckGas", RunOutTime, 1);

 	new h,m;
    CalculateVirtualTime(h,m);
    printf("\nVirtual Time: %02d:%02d\n", h,m);
    SetTimer("SyncVirtualTime",120000,1);
   	HourFix(ghour);
	ghour = shour;

	// Objects
	CreateObject(983, 1203.991088, 5.767820, 1003.121826, 0.000000, 0.000000, 90.000000); // CLUB VIP GATE 1
 	CreateObject(8229, 192.828002, -163.002243, 2.318124, 0.000000, 0.000000, -90.000000); // Pizzeria Wall 2
 	CreateObject(2885, 207.871673, -229.881469, 6.578618, 0.000000, 0.000000, 270.000000); // Garage Wall 3
 	CreateObject(1368, 697.350463, -538.985412, 16.025938, 0.000000, 0.000000, -180.000000); // Safsal 4
 	CreateObject(1368, 694.350463, -538.985412, 16.025938, 0.000000, 0.000000, -180.000000); // Safsal 5
	CreateObject(7096, 607.505065, -549.181701, 19.495939, 0.000000, 0.000000, 450.000000); // Police Stairs 6
	CreateObject(1800, 262.912384, 74.484916, 1000.019042, 0.000000, 0.000000, 0.000000); // Prison Bed 7
	CreateObject(1541, -224.132461, 1403.651123, 28.015626, 0.000000, 0.000000, 270.000000); // Bar - Drinks 8
	CreateObject(1547, -223.906631, 1403.625610, 27.728443, 0.000000, 0.000000, 450.000000); // Bar Mapit 9

	// Palomino Creek Familey House!!
	CreateObject(3603, 2095.106201, -109.866989, 5.866685, 0.000000, 0.000000, 6606.000000); // House 10
	CreateObject(1232, 2108.526367, -102.689216, 3.339891, 0.000000, 0.000000, 0.000000); // Light Left 11
	CreateObject(1232, 2106.018066, -99.267036, 3.339891, 0.000000, 0.000000, 0.000000);// Light Right 12
	CreateObject(1432, 2080.943603, -104.876953, 0.919505, 0.000000, 0.000000, 0.000000); // Table 3 Seats 13
	CreateObject(982, 2136.537109, 31.708822, 26.157997, 0.000000, 0.000000, 90.000000);// 14
	CreateObject(982, 2162.136962, 31.695514, 26.156011, 0.000000, 0.000000, 90.000000);// 15
	CreateObject(983, 2174.956054, 28.687381, 25.295772, 15.000000, 0.000000, 0.000000);// 16
	CreateObject(984, 2174.926025, 19.538507, 22.268764, 19.000000, 0.000000, 0.000000);// 17
	CreateObject(983, 2174.974121, 10.460927, 19.179311, 19.000000, 0.000000, 0.000000);// 18
	CreateObject(983, 2176.526855, -23.691658, 25.724628, -13.000000, 0.000000, 0.000000);// 19
	CreateObject(983, 2176.531494, -17.438999, 24.282602, -13.000000, 0.000000, 0.000000);// 20
	CreateObject(983, 2176.563476, -11.721313, 21.999284, -27.000000, 0.000000, 0.000000);// 21
	CreateObject(967, 2174.195068, -5.889108, 16.803985, 0.000000, 0.000000, 0.000000);// 22
	CreateObject(966, 2175.000732, -3.764794, 17.361150, -1.000000, 4.000000, -90.000000);// 23
	CreateObject(968, 2175.021972, -3.451509, 18.212814, 0.000000, 86.000000, 90.000000);// 24
	CreateObject(983, 2174.961669, 6.917045, 18.332942, 0.000000, 0.000000, 0.000000); // 25
	CreateObject(983, 2213.958984, -104.051368, 26.154375, 0.000000, 0.000000, 2.000000); // 26
	CreateObject(773, 2214.420410, -108.477622, 25.394374, 0.000000, 0.000000, 0.000000); // 27
	CreateObject(984, 2227.505615, -108.339828, 26.184373, 0.000000, 0.000000, 91.099998); // 28
	CreateObject(983, 2219.505126, -108.486274, 26.234373, 0.000000, 0.000000, 91.000000); // 29
	
	// Club Enter - VIP PLACE
	CreateObject(1500, 1204.846191, 5.863771, 999.921875, 0.000000, 0.000000, 180.000000); // 30
	CreateObject(1500, 1206.306640, 5.780851, 999.921875, 0.000000, 0.000000, 180.000000); // 31

	// Bus Station
	CreateObject(1257, 241.780838, 22.072807, 2.729687, 0.000000, 0.000000, 0.000000); // 32
	CreateObject(1257, 217.175415, -311.706695, 1.786813, 0.000000, 0.000000, 0.000000); // 33
	CreateObject(1257, 650.795959, -469.545593, 16.605941, 0.000000, 0.000000, 0.000000); // 34
	CreateObject(1257, 1261.296875, 162.448547, 19.864292, 0.000000, 0.000000, -21.000000); // 35
	CreateObject(1257, 1348.279052, 404.398071, 19.774688, 0.000000, 0.000000, 156.110000); // 36
	CreateObject(1257, 2206.433105, 32.603485, 26.774374, 0.000000, 0.000000, 270.000000); // 37
	CreateObject(1257, 2353.009277, 210.575866, 26.776563, 0.000000, 0.000000, 0.000000); // 38
	CreateObject(1257, 1225.320922, 328.942932, 19.806892, 0.000000, 0.000000, -24.000000); // 39
	CreateObject(1257, 1222.853271, 323.458953, 19.806892, 0.000000, 0.000000, -23.000000); // 40
	CreateObject(1257, 1217.961669, 270.880950, 19.806892, 0.000000, 0.000000, 246.999984); // 41
	
	// POLICE GATES
	CreateObject(985, 640.107604, -613.751159, 16.935939, 0.000000, 0.000000, 180.000000); // 42
	CreateObject(985, 632.261474, -613.751159, 16.935939, 0.000000, 0.000000, 0.000000); // 43
	CreateObject(985, 624.381958, -613.751159, 16.935939, 0.000000, 0.000000, 0.000000); // 44
	CreateObject(985, 616.569885, -613.751159, 16.935939, 0.000000, 0.000000, 0.000000); // 45
	CreateObject(985, 607.311889, -591.546386, 16.935939, 0.000000, 0.000000, 90.000000); // 46
	CreateObject(985, 607.320068, -583.768005, 16.935939, 0.000000, 0.000000, 270.000000); // 47
	CreateObject(985, 643.994506, -609.820922, 16.935939, 0.000000, 0.000000, 90.000000); // 48
	CreateObject(985, 640.056762, -605.887512, 16.935939, 0.000000, 0.000000, 0.000000); // 49
	CreateObject(985, 636.139160, -601.947814, 16.935939, 0.000000, 0.000000, 90.000000); // 50
	CreateObject(985, 636.135864, -594.139709, 16.935939, 0.000000, 0.000000, 270.000000);  // 51 Gate // POLICE
	CreateObject(985, 636.133239, -586.272521, 16.935939, 0.000000, 0.000000, 90.000000); // 52
	CreateObject(985, 636.095825, -578.388305, 16.935939, 0.000000, 0.000000, 270.000000); // 53
	CreateObject(967, 635.399414, -573.743408, 15.387496, 0.000000, 0.000000, 0.000000); // 54
	CreateObject(967, 635.414672, -570.528320, 15.386939, 0.000000, 0.000000, 180.000000); // 55
	CreateObject(985, 605.876281, -581.572509, 16.687500, 0.000000, 0.000000, 0.000000); // 56
	
	// School
	CreateObject(983, 273.825592, 122.677375, 1008.820312, 90.000000, 0.000000, 0.000000); // 57
	CreateObject(983, 273.866729, 121.472114, 1008.820312, 90.000000, 0.000000, 180.000000); // 58
	CreateObject(983, 220.777770, 117.419204, 1010.218750, -90.000000, 0.000000, 0.000000); // 59
	CreateObject(983, 220.759201, 118.591430, 1010.218750, -270.000000, 0.000000, 0.000000); // 60
	
	// Demedici House
	CreateObject(987, 1268.836303, -783.792602, 1090.806274, 0.000000, 0.000000, 180.000000); // 61
	CreateObject(987, 1304.288452, -795.028259, 1083.007812, 0.000000, 0.000000, 180.000000); // 62
	
	// Club - Dillimore
 	CreateObject(994, 824.142639, -567.109741, 15.435937, 0.000000, 0.000000, 90.000000); // 63
	CreateObject(997, 820.904479, -567.066772, 15.435937, 0.000000, 0.000000, 0.000000); // 64
	CreateObject(994, 824.142639, -560.811706, 15.435937, 0.000000, 0.000000, 90.000000); // 65
	CreateObject(2412, 821.596618, -562.582763, 15.335937, 0.000000, 0.000000, 90.000000); // 66
	CreateObject(2412, 821.516662, -562.582763, 15.335937, 0.000000, 0.000000, 90.000000); // 67
	CreateObject(2412, 821.465637, -565.769409, 15.335937, 0.000000, 0.000000, 90.000000); // 68
	CreateObject(2412, 821.525329, -564.157348, 15.335937, 0.000000, 0.000000, 90.000000); // 69
	
	// Police Doors
	CreateObject(1501, 246.380111, 72.445343, 1002.560546, 0.000000, 0.000000, 0.000000); // 70
	CreateObject(1501, 244.894638, 72.445343, 1002.560546, 0.000000, 0.000000, 0.000000); // 71
    CreateObject(985, 636.089538, -572.138916, 15.987503, 0.000000, 0.000000, 90.000000);
	CreateObject(985, 636.233276, -565.887451, 16.687500, 0.000000, 0.000000, 90.000000); // 73
	CreateObject(985, 636.216186, -558.053894, 16.687500, 0.000000, 0.000000, -90.000000); // 74
	CreateObject(985, 636.155700, -550.274658, 16.687500, 0.000000, 0.000000, 90.000000); // 75
	CreateObject(985, 632.682922, -544.364318, 16.687500, 0.000000, 0.000000, 150.000000); // 76
	CreateObject(985, 625.346618, -542.420349, 16.687500, 0.000000, 0.000000, 0.000000); // 77
	CreateObject(985, 617.522705, -542.467346, 16.687500, 0.000000, 0.000000, 180.000000); // 78
	CreateObject(985, 609.648620, -542.465881, 16.687500, 0.000000, 0.000000, 0.000000); // 79
	CreateObject(985, 605.720031, -542.488708, 16.687500, 0.000000, 0.000000, 180.000000); // 80
	CreateObject(985, 601.876586, -554.196228, 16.687500, 0.000000, 0.000000, 270.000000); // 81
	CreateObject(985, 601.876586, -546.416931, 16.687500, 0.000000, 0.000000, 90.000000); // 82
	CreateObject(985, 601.876586, -561.991699, 16.687500, 0.000000, 0.000000, 90.000000); // 83
	CreateObject(985, 601.876586, -569.821838, 16.687500, 0.000000, 0.000000, 270.000000); // 84
	CreateObject(985, 601.876586, -577.648315, 16.687500, 0.000000, 0.000000, 90.000000); // 85
	
	// PlayerClasses
	for(new i = 0; i <= sizeof(PlayerPeds)-1;  i++)
	{
	AddPlayerClass(PlayerPeds[i][0],56.6043,788.5916,32.6429,174.7197,0,0,0,0,0,0);
   	}

    // Car Spawn's
    new Rbikes[3] = {510,509,481};

    // Racing , Sprint+Drag
    AddStaticVehicle(502,219.2276,-232.2660,0.8416,0.8363,0,0); // HOTRING [SPRINT]  -- > 1 [BLUEBERRY]
    AddStaticVehicle(502,215.2276,-232.2660,0.8416,0.8363,0,0); // HOTRING RACING [DRAG]  -- > 2 [BLUEBERRY]
    
    // JOBS

    // BURGERKING - PIZZABOY
    AddStaticVehicleEx(448,219.9333,-170.6708,1.1777,89.4635,3,6, 60000); // PIZZABOY #1  -- > 3
    AddStaticVehicleEx(448,219.9081,-173.3554,1.1777,89.4635,3,6, 60000); // PIZZABOY #2  -- > 4
    AddStaticVehicleEx(448,219.8860,-175.7229,1.1777,89.4635,3,6, 60000); // PIZZABOY #3  -- > 5
    AddStaticVehicleEx(448,219.8622,-178.2608,1.1777,89.4635,3,6, 60000); // PIZZABOY #4  -- > 6

	// TRUCK JOB
	AddStaticVehicleEx(514,-29.8929,-276.7250,5.9965,269.8306,28,1, 60000); // TRUCK  -- > 7
	AddStaticVehicleEx(514,-29.8763,-283.4386,5.9965,269.8306,28,1, 60000); // TRUCK  -- > 8
	AddStaticVehicleEx(514,-29.8610,-290.1743,5.9965,269.8306,28,1, 60000); // TRUCK  -- > 9
	AddStaticVehicleEx(514,-29.8454,-296.9826,5.9965,269.8306,28,1, 60000); // TRUCK  -- > 10

	AddStaticVehicleEx(584,-6.5995,-377.6123,6.0161,0.3359,113,1, 60000); // Trailer  -- > 11
	AddStaticVehicleEx(584,-13.5995,-377.6123,6.0108,0.3279,113,1, 60000); // Trailer  -- > 12
	AddStaticVehicleEx(584,-20.5995,-377.6123,6.0108,0.3279,113,1, 60000); // Trailer  -- > 13
	AddStaticVehicleEx(584,-27.5995,-377.6123,6.0108,0.3279,113,1, 60000); // Trailer  -- > 14


	// AMBULANCE JOB - PARAMEDIC
    AddStaticVehicleEx(416,-304.2182,1036.1582,19.7430,270.1956,1,3, 60000);  // Ambulance #1  -- > 15
    AddStaticVehicleEx(416,-335.2090,1057.2465,19.8884,89.2038,1,3, 60000); // Ambulance #2  -- > 16

    // FARMER JOB
    AddStaticVehicleEx(532,-103.9654,82.7412,4.0850,73.0485,117,117, 60000); // COMBINE #1  -- > 17
    AddStaticVehicleEx(532,-100.9654,92.7412,4.0850,73.0485,117,117, 60000); // COMBINE #2  -- > 18
    AddStaticVehicleEx(532,-97.9654,102.7412,4.0850,73.0485,117,117, 60000); // COMBINE #3  -- > 19
    AddStaticVehicleEx(532,-94.9654,112.7412,4.0850,73.0485,117,117, 60000); // COMBINE #4  -- > 20
    AddStaticVehicleEx(532,-91.9654,122.7412,4.0850,73.0485,117,117, 60000); // COMBINE #5  -- > 21
    AddStaticVehicleEx(532,-88.9654,132.7412,4.0850,73.0485,117,117, 60000); // COMBINE #6  -- > 22

    // POLICE CARS
    AddStaticVehicleEx(598,613.1332,-596.8855,16.9382,271.0833,0,1, 60000); // POLICE [CAR]  -- > 23
    AddStaticVehicleEx(598,613.2219,-601.5959,16.9380,271.0833,0,1, 60000); // POLICE [CAR]  -- > 24
    AddStaticVehicleEx(598,610.8422,-591.7052,16.9779,269.5298,0,1, 60000); // POLICE [CAR]  -- > 25
    AddStaticVehicleEx(598,252.0560,-191.7453,1.3124,89.0783,0,1, 60000); // POLICE [CAR] BLUEBERRY  -- > 26
    AddStaticVehicleEx(599,615.0855,-608.7578,16.1380,359.7760,89,1, 60000); // POLICE [JEEP]  -- > 27
	AddStaticVehicleEx(599,610.3406,-609.0231,16.1380,359.7760,89,1, 60000); // POLICE [JEPP]  -- > 28
	AddStaticVehicleEx(598,610.8422,-587.5540,16.9734,269.7169,0,1, 60000); // POLICE [CAR]  -- > 29
    AddStaticVehicleEx(523,617.5594,-583.9802,16.7949,89.9977,0,1, 60000); // HPV-1000  -- > 30
    AddStaticVehicleEx(523,614.5598,-583.9802,16.7959,89.9977,0,1, 60000); // HPV-1000  -- > 31


   	// DILLIMORE !!! ^^

    // REGULAS CARS & BIKES
    AddStaticVehicleEx(468,798.0284,-508.9097,16.9869,166.3648,-1,-1, 60000); // SANCHEZ[RED]  -- > 32
    AddStaticVehicleEx(468,743.4217,-498.9984,17.6765,354.3201,-1,-1, 60000); // SANCHEZ[BLUE]  -- > 33
    AddStaticVehicleEx(468,823.2192,-488.4018,17.0014,176.6811,-1,-1, 60000); // SANCHEZ[SILVER]  -- > 34
    AddStaticVehicleEx(468,667.4679,-551.5391,15.5007,263.0882,-1,-1, 60000); // SANCHEZ[1]  -- > 35

    AddStaticVehicleEx(471,737.9785,-548.7218,16.4278,38.3375,-1,-1, 60000); // QUAD[YELLOW]  -- > 36
    AddStaticVehicleEx(471,761.1303,-555.5772,16.5926,173.8339,-1,-1, 60000); // QUAD[2]  -- > 37
    AddStaticVehicleEx(471,747.3938,-489.2551,16.7506,178.6337,-1,-1, 60000); // QUAD[BLACK]  -- > 38
    AddStaticVehicleEx(471,776.1520,-509.7993,16.5608,223.2699,-1,-1, 60000); // QUAD[RED]  -- > 39

    AddStaticVehicleEx(603,750.6721,-553.2628,17.1292,358.4594,-1,-1, 60000); // PHONIXE[64]  -- > 40
    AddStaticVehicleEx(603,785.8579,-503.0369,16.4614,179.7216,-1,-1, 60000); // PHONIXE[8]  -- > 41
    AddStaticVehicleEx(491,754.6221,-582.1505,16.3716,91.5853,-1,-1, 60000); // PHONIXE[64]  -- > 42
    AddStaticVehicleEx(603,708.2644,-454.8615,16.1740,271.0544,-1,-1, 60000); // PHONIXE[silver,white]  -- > 43

    AddStaticVehicleEx(562,827.2783,-494.6040,16.9522,180.7263,-1,-1, 60000); // FLASH[GREEN]  -- > 44
    AddStaticVehicleEx(565,771.9456,-554.6822,16.9647,180.5980,-1,-1, 60000); // FLASH[91]  -- > 45
    AddStaticVehicleEx(516,694.7797,-470.0750,15.9592,88.5079,-1,-1, 60000); // FLASH[84]  -- > 46

    AddStaticVehicleEx(565,744.3539,-517.1607,16.3901,178.8856,-1,-1, 60000); // CLUB[WHITE]  -- > 47
    AddStaticVehicleEx(565,694.9404,-463.9019,15.9592,88.5079,-1,-1, 60000); // CLUB[WHITE]  -- > 48

    AddStaticVehicleEx(560,747.6559,-582.1606,16.8667,91.4391,-1,-1, 60000); // SULTAN[64]  -- > 49
    AddStaticVehicleEx(518,752.3599,-496.9864,17.0333,0.1633,-1,-1, 60000); // SULTAN[8]  -- > 50
    AddStaticVehicleEx(560,761.6732,-507.4194,16.9956,179.4575,-1,-1, 60000); // SULTAN[64]  -- > 51
    AddStaticVehicleEx(554,764.5190,-513.4780,16.5658,146.1835,-1,-1, 60000); // SULTAN[63]  -- > 52
    AddStaticVehicleEx(518,667.8045,-546.1655,16.0406,269.7870,-1,-1, 60000); // SULTAN[WHITE]  -- > 53
    AddStaticVehicleEx(560,708.1895,-458.1726,16.0414,269.4008,-1,-1, 60000); // SULTAN[63]  -- > 54

    AddStaticVehicleEx(491,668.4893,-458.3390,16.1908,90.7321,-1,-1, 60000); // MAJESTIC[91]  -- > 55
    AddStaticVehicleEx(517,654.9238,-500.1308,16.1908,358.9699,-1,-1, 60000); // MAJESTIC  -- > 56
    AddStaticVehicleEx(419,668.0464,-579.2645,16.1908,90.1012,-1,-1, 60000); // MAJESTIC[WHITE]  -- > 57
    AddStaticVehicleEx(517,687.3232,-618.3115,16.0116,0.2824,-1,-1, 60000); // WILLARD[WHITE]  -- > 58
    AddStaticVehicleEx(529,668.2206,-467.7368,15.9689,90.6749,-1,-1, 60000);// WILLARD[WHITE]  -- > 59
    AddStaticVehicleEx(529,827.3081,-506.1238,16.7337,180.1471,-1,-1, 60000); // WILLARD[84]  -- > 60
    AddStaticVehicleEx(475,633.7111,-508.1588,15.9683,181.3205,-1,-1, 60000); // WILLARD[WHITE]  -- > 61


    // BLUEBERRY !!! ^^

    // REGULAS CARS & BIKES
    AddStaticVehicleEx(471,210.4130,26.0672,1.9872,92.9275,-1,-1, 60000); // QUAD[WHITE]  -- > 62
    AddStaticVehicleEx(471,210.4130,23.0672,1.9872,92.9275,-1,-1, 60000); // QUAD[SILVER]  -- > 63
    AddStaticVehicleEx(471,247.5653,-92.1070,1.8403,235.0825,-1,-1, 60000); // QUAD[BLACK]  -- > 64
    AddStaticVehicleEx(471,244.9737,-129.5090,1.3378,210.2476,-1,-1, 60000); // QUAD[WHITE]  -- > 65
    AddStaticVehicleEx(471,196.2933,-93.9014,0.4657,359.9513,-1,-1, 60000); // QUAD[WHITE]  -- > 66
    AddStaticVehicleEx(471,194.2923,-93.8998,0.4665,359.9512,-1,-1, 60000); // QUAD[BLACK]  -- > 67
    AddStaticVehicleEx(471,171.6107,-94.9406,0.9663,270.8693,-1,-1, 60000); // QUAD[YELLOW]  -- > 68

    AddStaticVehicleEx(468,313.5551,-46.1091,1.2434,357.7476,-1,-1, 60000); // SANCHEZ[WHITE]  -- > 69
    AddStaticVehicleEx(468,329.1190,-47.9917,1.1729,288.1923,-1,-1, 60000); // SANCHEZ[BLUE,WHITE]  -- > 70
    AddStaticVehicleEx(468,173.4827,-120.6861,0.7154,1.0675,-1,-1, 60000); // SANCHEZ[RED]  -- > 71
    AddStaticVehicleEx(468,171.8965,-120.7156,0.7162,1.0676,-1,-1, 60000); // SANCHEZ[BLUE]  -- > 72

    AddStaticVehicleEx(560,199.5528,-155.1828,1.2835,179.1644,-1,-1, 60000); // SULTAN[SILVER]  -- > 73
    AddStaticVehicleEx(560,159.8485,-162.7159,1.2834,89.3214,-1,-1, 60000); // SULTAN[SILVER]  -- > 74
    AddStaticVehicleEx(560,246.1438,-125.8214,1.7376,269.7807,-1,-1, 60000); // SULTAN[RED]  -- > 75

    AddStaticVehicleEx(603,93.0495,-186.0436,1.1897,180.3555,-1,-1, 60000); // PHONIXE[SILVER]  -- > 76
    AddStaticVehicleEx(419,93.0910,-192.7185,1.1897,180.3555,-1,-1, 60000); // PHONIXE[SILVER]  -- > 77

    AddStaticVehicleEx(565,287.3848,-51.8744,1.2029,179.2484,-1,-1, 60000); // FLASH[WHITE]  -- > 78
    AddStaticVehicleEx(565,211.9829,-139.5139,1.2050,180.1298,-1,-1, 60000); // FLASH[RED]  -- > 79

    AddStaticVehicleEx(562,247.3622,-84.4360,1.4000,90.7243,-1,-1, 60000); // MAJESTIC[64]  -- > 80
    AddStaticVehicleEx(517,278.1038,-54.1375,1.2026,181.5749,-1,-1, 60000); // MAJESTIC[SILVER]  -- > 81
    AddStaticVehicleEx(491,216.3500,-161.3646,1.4326,0.6962,-1,-1, 60000); // MAJESTIC[WHITE]  -- > 82
    AddStaticVehicleEx(517,334.1183,-60.9991,1.3872,278.2181,-1,-1, 60000); // MAJESTIC[91]  -- > 83
    AddStaticVehicleEx(562,318.0110,-84.2670,2.2085,270.2336,-1,-1, 60000); // MAJESTIC[64]  -- > 84

    AddStaticVehicleEx(560,219.3302,18.9454,2.4330,269.7608,64,8, 60000); // SULTAN[SILVER]  -- > 85
    AddStaticVehicleEx(560,219.3302,10.7395,2.4266,269.7608,64,8, 60000); // SULTAN[SILVER]  -- > 86
	AddStaticVehicleEx(560,219.3302,5.7395,2.4266,269.7608,64,8, 60000); // SULTAN[SILVER]  -- > 87
	AddStaticVehicleEx(560,219.3302,0.7395,2.4266,269.7608,64,8, 60000); // SULTAN[SILVER]  -- > 88


    AddStaticVehicleEx(516,166.1440,-7.5384,1.4135,180.7514,-1,-1, 60000); // CLUB[GREEN]  -- > 89
    AddStaticVehicleEx(589,169.4642,-7.5384,1.4135,180.7514,-1,-1, 60000); // CLUB[WHITE]  -- > 90
    AddStaticVehicleEx(554,173.0265,-7.5384,1.4135,180.7514,-1,-1, 60000); // CLUB[RED]  -- > 91
    AddStaticVehicleEx(589,176.3087,-7.5384,1.4135,180.7514,-1,-1, 60000); // CLUB[YELLOW]  -- > 92
    
    AddStaticVehicleEx(518,317.6366,-129.1591,2.0713,271.5835,-1,-1, 60000); // CLUB[WHITE]  -- > 93


    // PALOMINO CREEK !!! ^^^
    AddStaticVehicleEx(471,2545.1877,-16.1242,25.9214,44.7603,-1,-1, 60000); // QUAD[RED]  -- > 94
    AddStaticVehicleEx(471,2553.2808,27.4185,26.3597,43.0986,-1,-1, 60000); // QUAD[WHITE]  -- > 95
    AddStaticVehicleEx(471,2447.4285,84.4202,26.9472,271.2303,-1,-1, 60000); // QUAD[BLACK]  -- > 96
    AddStaticVehicleEx(471,2270.0366,-129.0211,26.8897,359.2944,-1,-1, 60000); // QUAD[YELLOW]  -- > 97
    AddStaticVehicleEx(471,2256.7522,-14.1590,26.1861,135.9028,-1,-1, 60000); // QUAD[RED]  -- > 98
    AddStaticVehicleEx(471,2439.9419,-8.7313,26.2184,157.1636,-1,-1, 60000); // QUAD[GREEN]  -- > 99
    AddStaticVehicleEx(471,2245.2117,110.1415,27.2707,234.2651,-1,-1, 60000); // QUAD[SILVER]  -- > 100
    AddStaticVehicleEx(471,2381.5110,41.3606,26.3046,216.9552,-1,-1, 60000); // QUAD[RED]  -- > 101
	AddStaticVehicleEx(471,2373.0110,-16.8074,27.3554,269.0405,-1,-1, 60000); // QUAD[86]  -- > 102
	AddStaticVehicleEx(471,2419.8276,-2.8809,26.1042,276.3619,-1,-1, 60000); // QUAD[BLUE]  -- > 103
	AddStaticVehicleEx(471,2387.5432,-50.5797,26.8533,336.6169,-1,-1, 60000); // QUAD[BLACK]  -- > 104
	AddStaticVehicleEx(471,2273.7817,11.0957,26.8865,207.2166,-1,-1, 60000); // QUAD[52]  -- > 105
	AddStaticVehicleEx(471,2251.6448,-133.2813,26.8897,303.8002,-1,-1, 60000); // QUAD[2]  -- > 106

    AddStaticVehicleEx(468,2488.6855,68.5325,26.1529,93.0036,-1,-1, 60000); // SANCHEZ[RED]  -- > 107
    AddStaticVehicleEx(468,2420.5334,60.7791,27.4146,298.5609,-1,-1, 60000); // SANCHEZ[BLUE]  -- > 108

    AddStaticVehicleEx(565,2554.3079,14.1472,26.6731,88.8281,-1,-1, 60000); // FLASH[WHITE]  -- > 109
    AddStaticVehicleEx(565,2528.5837,132.7453,26.1112,179.4817,-1,-1, 60000); // FLASH[91]  -- > 110
    AddStaticVehicleEx(554,2494.2192,87.5237,25.0077,0.3432,-1,-1, 60000); // FLASH[GREEN]  -- > 111
    AddStaticVehicleEx(565,2517.5408,-24.0250,27.0301,359.9891,-1,-1, 60000); // FLASH[114]  -- > 112
	AddStaticVehicleEx(565,2414.0798,2.1415,26.1117,89.2919,-1,-1, 60000); // FLASH[38]  -- > 113

	AddStaticVehicleEx(517,2372.6924,-12.8914,26.5987,271.7405,-1,-1, 60000); // MAJESTIC[SILVER]  -- > 114
	AddStaticVehicleEx(542,2443.9331,-51.4077,27.2865,179.9312,-1,-1, 60000); // MAJESTIC[8]  -- > 115
	AddStaticVehicleEx(517,2240.3750,-5.6821,27.2691,181.1285,-1,-1, 60000); // MAJESTIC[38]  -- > 116

    AddStaticVehicleEx(560,2554.8333,1.9829,26.1020,90.3653,-1,-1, 60000); // SULTAN[SILVER]  -- > 117
    AddStaticVehicleEx(560,2496.2124,132.6363,26.6790,179.6546,-1,-1, 60000); // SULTAN[64]  -- > 118
    AddStaticVehicleEx(560,2279.4231,6.6369,27.1611,359.9874,-1,-1, 60000); // SULTAN[SILVER]  -- > 119
	AddStaticVehicleEx(419,2195.3838,-46.5448,26.3218,267.4024,-1,-1, 60000); // SULTAN[SILVER] low  -- > 120
	AddStaticVehicleEx(560,2188.8647,-80.3270,27.1741,268.1569,-1,-1, 60000); // SULTAN[63]  -- > 121

    AddStaticVehicleEx(400,2558.1685,72.0056,25.1093,89.7336,-1,84, 60000); // JEEP[BROWN]  -- > 122
    AddStaticVehicleEx(400,2503.6426,137.2142,25.0995,0.2965,-1,-1, 60000); // JEEP[BLACK]  -- > 123
    AddStaticVehicleEx(400,2484.3782,71.9858,26.3594,269.9340,-1,2, 60000); // JEEP[BLUE]  -- > 124
    AddStaticVehicleEx(400,2409.1411,63.4022,25.9361,1.0785,-1,-1, 60000); // JEEP[BLACK]  -- > 125
    AddStaticVehicleEx(445,2433.5964,-4.1271,25.2594,359.1395,-1,-1, 60000); // JEEP[WHITE]  -- > 126

    AddStaticVehicleEx(405,2551.9268,81.3463,26.1031,269.9751,0,0, 60000); // Sentinel[38]  -- > 127
    AddStaticVehicleEx(445,2515.9961,117.3095,26.2814,89.4764,-1,-1, 60000); // BLADE[91]  -- > 128
    AddStaticVehicleEx(536,2469.4277,128.7400,26.3523,180.7895,-1,-1, 60000); // BLADE[91]  -- > 129
    AddStaticVehicleEx(536,2399.1416,59.4056,26.1453,0.5930,-1,-1, 60000); // BLADE[91,11]  -- > 130
    AddStaticVehicleEx(565,2469.4417,92.2466,26.0308,179.9728,-1,-1, 60000); // FLASH[114,1]  -- > 131
    AddStaticVehicleEx(562,2366.5964,146.3083,26.3813,270.5085,-1,-1, 60000); // BLADE[117,1]  -- > 132
    AddStaticVehicleEx(536,2338.8726,29.7130,26.1443,179.4775,-1,-1, 60000); // BLADE[117,1]  -- > 133
    AddStaticVehicleEx(554,2325.8188,86.7524,26.1514,269.1462,-1,-1, 60000); // BLADE[WHITE,0]  -- > 134
    AddStaticVehicleEx(562,2514.2629,74.0634,26.7861,270.2344,-1,-1, 60000); // BLADE[38]  -- > 135
	AddStaticVehicleEx(518,2480.0222,-22.5042,26.8962,359.9973,-1,-1, 60000); // BLADE[84]  -- > 136


    AddStaticVehicleEx(445,2503.4629,93.6835,26.1102,179.9182,-1,-1, 60000); // ADMIRAL[2]  -- > 137
    AddStaticVehicleEx(562,2449.0278,87.8014,27.1548,269.2981,-1,-1, 60000); // ADMIRAL[WHITE]  -- > 138
    AddStaticVehicleEx(445,2412.1521,11.3981,26.5781,268.5799,-1,-1, 60000); // ADMIRAL[117]  -- > 139
    AddStaticVehicleEx(554,2327.6575,-121.2946,27.5323,157.5844,-1,-1, 60000); // ADMIRAL[2]  -- > 140
    AddStaticVehicleEx(445,2397.4944,-50.8603,27.2783,359.1564,-1,-1, 60000); // ADMIRAL[2]  -- > 141
    AddStaticVehicleEx(516,2255.5505,-81.9183,26.4107,179.8635,-1,-1, 60000); // ADMIRAL[SILVER]  -- > 142

    AddStaticVehicleEx(529,2321.7185,132.1414,26.6256,90.5068,-1,-1, 60000); // WILLARD[RED]  -- > 143
    AddStaticVehicleEx(529,2200.5220,-65.9410,27.2196,90.5996,-1,-1, 60000); // WILLARD[WHITE]  -- > 144
    AddStaticVehicleEx(529,2252.5317,164.6479,27.2015,0.9257,-1,-1, 60000); // WILLARD[SILVER]  -- > 145
    AddStaticVehicleEx(554,2265.3369,106.8340,26.9485,359.8301,-1,-1, 60000); // WILLARD[SILVER]  -- > 146
    AddStaticVehicleEx(529,2255.9204,71.0458,26.1172,179.2914,-1,-1, 60000);// WILLARD[84]  -- > 147

    AddStaticVehicleEx(445,2424.8394,-56.6406,26.1863,178.1414,-1,-1, 60000); // PHONIXE[64,1]  -- > 148
    AddStaticVehicleEx(603,2443.8384,11.3968,26.3230,89.7632,-1,-1, 60000); // PHONIXE[SILVER,WHITE]  -- > 149
    AddStaticVehicleEx(419,2263.2285,-132.9069,27.3072,359.1680,-1,-1, 60000); // PHONIXE[SILVER]  -- > 150
	AddStaticVehicleEx(603,2254.5664,-125.0127,26.0782,180.5846,-1,-1, 60000); // PHONIXE[2,1] low  -- > 151
	AddStaticVehicleEx(516,2358.3164,-63.1664,27.3057,359.8222,-1,-1, 60000); // PHONIXE[91]  -- > 152
	AddStaticVehicleEx(603,2496.4795,6.7168,27.1371,359.5791,-1,-1, 60000); // PHONIXE[SILVER]  -- > 153

    AddStaticVehicleEx(517,2293.8918,155.7957,26.8517,179.9059,-1,-1, 60000); // -- > 154

    AddStaticVehicleEx(491,2206.9866,-93.8033,27.4424,270.6408,1,1, 60000); // RANCHER[BLACK]  -- > 155
	AddStaticVehicleEx(489,2210.1753,-39.5583,26.9934,303.7431,1,1, 60000); // RANCHER[BLACK]  -- > 156
	AddStaticVehicleEx(489,2209.3384,54.2736,27.3777,269.8499,1,1, 60000); // RANCHER[WHITE]  -- > 157



    // MONTOGOMERY !!! ^^^
    AddStaticVehicleEx(423,1331.7472,286.2587,19.6841,246.2726,1,126, 60000); // ICE CREAM  -- > 158
    AddStaticVehicleEx(423,1333.3293,289.8581,19.6841,246.2726,1,126, 60000); // ICE CREAM   -- > 159
    AddStaticVehicleEx(428,1254.8721,243.8135,19.6785,334.4745,4,75, 60000); // SECURECAR  -- > 160

    AddStaticVehicleEx(471,1393.1307,388.9980,19.1695,245.9526,-1,-1, 60000); // QUAD[SILVER]  -- > 161

    AddStaticVehicleEx(529,1291.2603,343.7771,19.1826,64.5855,-1,-1, 60000); // WILLARD[BROWN]  -- > 162
    AddStaticVehicleEx(529,1324.2484,393.5873,19.1870,335.8653,-1,-1, 60000); // WILLARD[SILVER]  -- > 163
    AddStaticVehicleEx(529,1378.9403,458.7747,19.5861,245.9201,-1,-1, 60000); // WILLARD[BLUE]  -- > 164
    AddStaticVehicleEx(516,1364.0701,367.6690,20.4096,65.7657,-1,-1, 60000); // WILLARD[SILVER]  -- > 165
    AddStaticVehicleEx(542,1410.7701,461.4728,20.0907,150.3534,-1,-1, 60000); // MAJESTIC[SILVER]  -- > 166
    AddStaticVehicleEx(517,1366.1412,408.7461,19.3611,155.7435,-1,-1, 60000); // MAJESTIC[SILVER]  -- > 167

    AddStaticVehicleEx(542,1388.0784,375.5145,19.4631,247.2701,-1,-1, 60000); // SULTAN[RED]  -- > 168
    AddStaticVehicleEx(560,1392.2379,385.4435,19.4631,247.2701,-1,-1, 60000); // SULTAN[SILVER]  -- > 169

    // CARS ADDING AFTER COUNTING
    
    AddStaticVehicleEx(560,2262.2214,64.8828,26.1895,269.7458,1,1, 60000); // SULTAN[WHITE]  -- > 170      PALOMINO - SCHOOL
    AddStaticVehicleEx(560,2262.2214,60.8828,26.1895,269.7458,1,1, 60000); // SULTAN[WHITE]  -- > 171      PALOMINO - SCHOOL
    AddStaticVehicleEx(560,2275.7488,65.1875,26.1594,269.7458,1,1, 60000); // SULTAN[WHITE]  -- > 172      PALOMINO - SCHOOL
    AddStaticVehicleEx(560,1355.0565,242.4410,19.7570,336.5529,-1,-1, 60000); // SULTAN[64]  -- > 173
	AddStaticVehicleEx(560,1298.1816,219.8534,19.3923,67.4378,-1,-1, 60000); // SULTAN[117]  -- > 174
	
	AddStaticVehicleEx(445,1374.0382,273.3632,19.7563,67.0667,-1,-1, 60000); // ADMIRAL[SILVER]  -- > 175
	
	AddStaticVehicleEx(603,1346.0597,204.5921,19.3920,335.7999,-1,-1, 60000); // PHONIXE[SILVER]  -- > 176
	
	AddStaticVehicleEx(468,1295.2220,176.2550,20.1305,63.1080,-1,-1, 60000); // SANCHEZ[RED]  -- > 177
	AddStaticVehicleEx(468,1283.1357,163.0101,20.1230,284.8133,-1,-1, 60000); // SANCHEZ[BLUE,WHITE]  -- > 178
	AddStaticVehicleEx(468,1311.9554,171.5047,20.1245,337.8454,-1,-1, 60000); // SNACHEZ[GREEN,WHITE]  -- > 179
	
	AddStaticVehicleEx(560,667.8168,-543.1638,16.0560,269.7870,-1,-1, 60000); // SULTAN[SAME]  -- > 180
	AddStaticVehicleEx(589,694.7028,-460.8246,15.9940,88.8758,-1,-1, 60000); // CLUB[114]  -- > 181
	AddStaticVehicleEx(416,-304.2182,1028.0195,18.8431,270.2643,1,3, 60000); // AMBULANCE  -- > 182

	AddStaticVehicleEx(603,797.7313,-617.4393,16.1737,0.6991,-1,-1, 60000); // PHONIXE  -- > 183
	AddStaticVehicleEx(603,826.2181,-570.0415,16.0966,179.5979,-1,-1, 60000); // PHONIXE  -- > 184
	
	AddStaticVehicleEx(529,1352.2483,236.1362,19.1999,336.0484,-1,-1, 60000); // WILLARD[57]  -- > 185
	AddStaticVehicleEx(529,1368.1385,196.0831,19.1875,156.2618,-1,-1, 60000); // WILLARD[117]  -- > 186
	AddStaticVehicleEx(529,1395.1870,392.1028,19.3911,246.6289,-1,-1, 60000); // WILLARD[64]  -- > 187
	AddStaticVehicleEx(542,1289.3450,339.9308,19.1869,65.8625,-1,-1, 60000); // WILLARD[58]  -- > 188
	AddStaticVehicleEx(529,1253.1042,271.4337,19.1111,245.2280,-1,-1,60000); // WILLARD[21] lower  -- > 189
	
	AddStaticVehicleEx(400,1390.0928,266.6257,19.6593,66.4201,84,84, 60000); // LANDSTAL[SAME]  -- > 190
	AddStaticVehicleEx(400,1276.8444,161.0676,20.3312,12.8581,84,84, 60000); // LANDSTAL[SAME]  -- > 191
	AddStaticVehicleEx(489,1424.7130,271.5021,19.6985,65.7509,84,74, 60000); // RANCHER[84]  -- > 192
	AddStaticVehicleEx(529,196.5154,-155.4314,1.2111,179.3716,-1,-1, 60000); // WILLARD[57]  -- > 193
	AddStaticVehicleEx(471,210.5739,-158.1086,0.9890,268.5681,-1,-1, 60000); // QUAD[43]  -- > 194
	AddStaticVehicleEx(589,199.2989,-149.1489,1.2382,1.2878,-1,-1, 60000); // CLUB[35]  -- > 195
	AddStaticVehicleEx(471,92.8941,-159.5995,1.9978,270.3948,-1,-1, 60000); // QUAD[24]  -- > 196
	AddStaticVehicleEx(471,99.1452,-189.5799,0.9269,177.0217,-1,-1, 60000); // QUAD[19]  -- > 197
	AddStaticVehicleEx(471,99.0776,-192.3335,0.9197,177.4929,-1,-1, 60000); // QUAD[41]  -- > 198
	
	// COBBINES
	AddStaticVehicleEx(532,1905.0757,198.5237,35.0915,268.7111,0,0, 60000); // COMBINE #1 199
	AddStaticVehicleEx(532,1905.0757,208.8144,33.0950,269.9974,0,0, 60000); // COMBINE #2 200
	AddStaticVehicleEx(532,1905.0757,219.0475,31.1080,270.2854,0,0, 60000); // COMBINE #3 201
	
	// ICE CREAM JOB - PALOMINO
	AddStaticVehicleEx(423,2419.6987,93.6803,26.5002,89.8913,1,17, 60000); // IceCREAM Car #1  -- > 202
	AddStaticVehicleEx(423,2413.0432,93.6803,26.5002,89.8913,1,17, 60000); // IceCREAM Car #2  -- > 203
	
	AddStaticVehicleEx(423,2419.6987,87.5156,26.5002,89.8913,1,17, 60000); // IceCREAM Car #3  -- > 204
	AddStaticVehicleEx(423,2413.0432,87.5156,26.5002,89.8913,1,17, 60000); // IceCREAM Car #2  -- > 205
	
	// Police Chopper
	AddStaticVehicleEx(497,615.8230,-551.9901,23.2722,269.3976,0,1, 60000); // Police Chopper  -- > 206
	
	// Adding In Palomino Creek
	AddStaticVehicleEx(562,2309.6160,-23.1656,26.2791,269.1297,-1,-1, 60000); // Random vehicle -- > 207
	AddStaticVehicleEx(445,2349.5430,-70.9705,26.2814,181.2664,-1,-1, 60000); // Admiral -- > 208
	AddStaticVehicleEx(542,2349.0415,-52.6733,26.2817,179.7824,-1,-1, 60000); // Random vehicle -- > 209
	AddStaticVehicleEx(471,2330.2163,139.8867,26.4571,217.3397,-1,-1, 60000); // Quad -- > 210
	AddStaticVehicleEx(471,2357.9397,113.3509,26.4639,128.2576,-1,-1, 60000); // Quad -- > 211
	AddStaticVehicleEx(516,2298.9575,-121.1084,27.2864,180.9919,-1,-1, 60000); // Random vehicle -- > 212
	AddStaticVehicleEx(475,2230.7922,172.2511,26.2546,182.5426,-1,-1, 60000); // Random vehicle -Z  -- > 213
	
	// Adding In Dillimore
	AddStaticVehicleEx(491,800.1422,-524.5583,16.0141,270.7827,-1,-1, 60000); // Random vehicle -- > 214
	AddStaticVehicleEx(518,676.2191,-645.8588,15.9067,180.0506,-1,-1, 60000); // 518 -- > 215
	AddStaticVehicleEx(518,676.2669,-572.2508,15.9313,180.0000,-1,-1, 60000); // 517 -- > 216
	AddStaticVehicleEx(547,676.2972,-564.3682,15.9939,180.0000,-1,-1, 60000); // 547 -- > 217
	AddStaticVehicleEx(445,687.4785,-583.5985,15.9627,0.0000,-1,-1, 60000); // Admiral -- > 218
	AddStaticVehicleEx(468,668.5061,-450.9778,16.0033,122.9127,-1,-1, 60000); // Sanchez -- > 219
	
	// Adding In Palomino Creek
	AddStaticVehicleEx(518,2379.8196,26.1643,26.7723,90.1452,-1,-1, 60000); // Random vehicle -- > 220
	AddStaticVehicleEx(516,2328.9197,120.5713,26.9161,90.5023,-1,-1, 60000); // Random vehicle -- > 221
	AddStaticVehicleEx(475,2358.7146,124.0989,26.8837,89.9424,-1,-1, 60000); // Random vehicle -- > 222
	AddStaticVehicleEx(562,2357.5874,171.3403,25.4009,293.5832,-1,-1, 60000); // Random vehicle -- > 223
	AddStaticVehicleEx(516,2254.5291,47.1634,25.6309,270.1447,-1,-1, 60000); // Random vehicle -- > 224
	AddStaticVehicleEx(517,2209.6184,114.2915,26.8033,88.8783,-1,-1, 60000); // Random vehicle -- > 225
	AddStaticVehicleEx(516,2338.2407,174.2551,26.2409,179.3795,-1,-1, 60000); // Current -- > 226
	
	// ACI Vehciles
	AddStaticVehicleEx(419,1029.3699,-312.8240,73.7897,180.3418,0,0, 60000); //  -- > 227
	AddStaticVehicleEx(491,1033.8287,-312.8240,73.7484,180.3418,0,0, 60000); // -- > 228
	AddStaticVehicleEx(597,1057.2794,-311.3794,73.6975,180.3418,0,0, 60000); // -- > 229
	AddStaticVehicleEx(597,1061.3851,-311.3794,73.6975,180.3418,0,0, 60000); // -- > 230
	AddStaticVehicleEx(597,1064.6779,-311.3794,73.6974,180.3418,0,0, 60000); // -- > 231
	AddStaticVehicleEx(497,1083.2301,-329.4267,73.6980,359.1756,0,0, 60000); // -- > 232

	// Familey Houses
	AddStaticVehicleEx(484,2079.0000,-118.9707,0.2319,215.0805,0,0, 60000); // marquis Palomino -- > 233
	
	// Bus Station
	AddStaticVehicle(437,1230.0590,296.5871,19.6978,155.5648,126,7); // Bus -- > 234
	AddStaticVehicle(437,1225.0590,298.5871,19.6978,155.5648,126,7); // Bus -- > 235
	AddStaticVehicle(437,1220.0590,300.5871,19.6978,155.5648,126,7); // Bus -- > 236
	AddStaticVehicle(437,1215.0590,302.5871,19.6978,155.5648,126,7); // Bus -- > 237
	
	// adding + 1
	AddStaticVehicleEx(518,2447.6924,57.0412,26.9727,181.5358,-1,-1, 60000); // Flash // 238
	// Mechanics Vehicle
	AddStaticVehicle(525,200.2752,-251.8967,1.4684,179.1890,17,20); // Mechanic Car // 239
	AddStaticVehicle(525,204.2752,-251.8967,1.4659,179.1890,17,20); // Mechanic Car // 240
    AddStaticVehicle(525,208.2752,-251.8967,1.4659,179.1890,17,20); // Mechanic Car // 241
    
    // Demedici Vehicle
    AddStaticVehicleEx(490,2157.4697,-104.9237,2.7438,32.0761,0,0,60000); // Demedici FBI // 242
	AddStaticVehicleEx(490,2152.9465,-107.1828,2.5983,32.0761,0,0,60000); // Demedici FBI // 243
	AddStaticVehicleEx(487,2168.0559,-120.7115,2.1906,145.6082,0,0,60000); // Demedici Chopper // 244
	AddStaticVehicleEx(409,2149.2527,-84.4284,2.4454,117.2531,0,0,60000); // Demedici Limo // 245
	AddStaticVehicleEx(405,2151.2527,-88.4284,2.4977,117.2531,0,0,60000); // Demedici Sentinel // 246
	AddStaticVehicleEx(405,2147.2527,-80.4284,2.5995,117.2531,0,0,60000); // Demedici Sentinel // 247
	
	// FORT CARSON
	
	AddStaticVehicleEx(566,-177.2413,1222.6437,19.5227,271.4343,-1,-1,60000); // tahoma FC  -- > 249
	AddStaticVehicleEx(566,-194.5610,1223.3895,19.5218,179.9076,-1,-1,60000); // tahoma FC  -- > 250
	AddStaticVehicleEx(566,-253.7358,1183.5989,19.5265,268.2265,-1,-1,60000); // tahoma FC  -- > 251
	AddStaticVehicleEx(603,-257.0535,1158.9778,19.5317,88.8090,-1,-1,60000); // PHONIXE FC  -- > 252
	AddStaticVehicleEx(565,-247.6364,1133.8774,19.4862,269.3644,-1,-1,60000); // FLASH  -- > 253
	AddStaticVehicleEx(566,-301.8763,1162.9874,19.5146,269.6537,-1,-1,60000); // tahoma FC  -- > 254
	AddStaticVehicleEx(565,-339.6635,1167.4314,19.5222,359.1526,-1,-1,60000); // FLASH  -- > 255
	AddStaticVehicleEx(550,-373.7525,1128.0103,19.4821,88.2714,-1,-1,60000); // SUNRISE  -- > 256
	AddStaticVehicleEx(603,-362.7696,1127.6797,19.4946,88.2797,-1,-1,60000); // PHONIXE FC  -- > 257
	AddStaticVehicleEx(566,-327.3911,1133.4095,19.5269,66.6601,-1,-1,60000); // tahoma FC  -- > 258
	AddStaticVehicleEx(566,-365.7823,1103.0192,19.5275,89.5333,-1,-1,60000); // tahoma FC  -- > 259
	AddStaticVehicleEx(603,-305.8333,1118.0667,19.5289,180.2321,-1,-1,60000); // PHONIXE FC  -- > 260
	AddStaticVehicleEx(550,-245.2643,1073.9634,19.5353,179.1166,-1,-1,60000); // SUNRISE  -- > 261
	AddStaticVehicleEx(603,-256.4986,1058.9299,19.5232,73.3722,-1,-1,60000); // PHONIXE FC  -- > 262
	AddStaticVehicleEx(550,-240.1606,998.7745,19.5297,179.5347,-1,-1,60000); // SUNRISE  -- > 263
	
	// House Car - Brooks Bro's
	AddStaticVehicle(487,2578.9341,93.5294,26.7922,183.2399,0,0); // Brooks Heli  -- > 264
	
    // BIKES

    // DILLIMORE !!! ^^^

    AddStaticVehicleEx(Rbikes[random(3)],738.7676,-587.5225,16.5496,210.8211,-1,-1, 60000); // BMX[RED]  -- > 265
    AddStaticVehicleEx(Rbikes[random(3)],740.8337,-545.6674,16.3008,219.3038,-1,-1, 60000); // BMX[YELLOW]
    AddStaticVehicleEx(Rbikes[random(3)],777.0276,-546.7104,16.2799,356.5784,-1,-1, 60000); // BMX[WHITE]
    AddStaticVehicleEx(Rbikes[random(3)],748.2111,-505.7427,16.8478,330.9569,-1,-1, 60000); // BMX[BLUE]
    AddStaticVehicleEx(Rbikes[random(3)],769.9521,-507.1879,17.1520,272.7319,-1,-1, 60000); // BMX[GREEN]
    AddStaticVehicleEx(Rbikes[random(3)],790.0767,-513.1981,16.5338,178.9426,-1,-1, 60000); // BMX[SILVER]
    AddStaticVehicleEx(Rbikes[random(3)],813.2902,-511.7952,16.8042,214.6919,-1,-1, 60000); // BMX[BROWN]
    AddStaticVehicleEx(Rbikes[random(3)],669.5357,-541.2871,15.8507,267.2493,-1,-1, 60000); // BMX[RED]
    AddStaticVehicleEx(Rbikes[random(3)],666.4568,-541.1390,15.8775,267.2493,-1,-1, 60000); // BMX[WHITE]
    AddStaticVehicleEx(Rbikes[random(3)],672.5603,-460.0005,15.0052,103.4574,-1,-1, 60000); // BMX[RED]
    AddStaticVehicleEx(Rbikes[random(3)],672.5603,-461.0005,15.0052,103.4574,-1,-1, 60000); // BMX[YELLOW]
    AddStaticVehicleEx(Rbikes[random(3)],672.5603,-462.0005,15.0052,103.4574,-1,-1, 60000); // BMX[GREEN]

    // BLUEBERRY !!! ^^^
    AddStaticVehicleEx(Rbikes[random(3)],159.9302,-174.9624,1.0939,59.1209,-1,-1, 60000); // BMX [BROWN]
    AddStaticVehicleEx(Rbikes[random(3)],260.7788,-52.4112,1.5954,329.9203,-1,-1, 60000); // BMX[WHITE]
    AddStaticVehicleEx(Rbikes[random(3)],269.6820,-51.1933,1.5931,26.8655,-1,-1, 60000); // BMX[YELLOW]
    AddStaticVehicleEx(Rbikes[random(3)],210.3387,-154.4560,1.0928,112.6280,-1,-1, 60000); // BMX[WHITE]
    AddStaticVehicleEx(Rbikes[random(3)],210.5117,-156.0756,1.0828,112.6279,-1,-1, 60000); // BMX[YELLOW]
    AddStaticVehicleEx(Rbikes[random(3)],195.5658,-121.5611,0.7628,180.3011,-1,-1, 60000); // BMX[RED]
    AddStaticVehicleEx(Rbikes[random(3)],194.2472,-121.5680,0.7623,180.3007,-1,-1, 60000); // BMX[WHITE]

    AddStaticVehicleEx(Rbikes[random(3)],697.6695,-521.3978,14.7441,178.9940,-1,-1, 60000); // MTBIKE[WHITE]
    AddStaticVehicleEx(Rbikes[random(3)],696.6695,-521.3978,14.7441,178.9940,-1,-1, 60000); // MTBIKE[GREEN]
    AddStaticVehicleEx(Rbikes[random(3)],695.6695,-521.3978,14.7441,178.9940,-1,-1, 60000); // MTBIKE[BROWN]
    AddStaticVehicleEx(Rbikes[random(3)],694.6695,-521.3978,14.7441,178.9940,-1,-1, 60000); // MTBIKE[RED]
    AddStaticVehicleEx(Rbikes[random(3)],705.6695,-521.3978,14.7441,178.9940,-1,-1, 60000); // MTBIKE[YELLOW]
    AddStaticVehicleEx(Rbikes[random(3)],706.6695,-521.3978,14.7441,178.9940,-1,-1, 60000); // MTBIKE[8]
    AddStaticVehicleEx(Rbikes[random(3)],707.6695,-521.3978,14.7441,178.9940,-1,-1, 60000); // MTBIKE[126]
    AddStaticVehicleEx(Rbikes[random(3)],708.6695,-521.3978,14.7441,178.9940,-1,-1, 60000); // MTBIKE[125]
    AddStaticVehicleEx(Rbikes[random(3)],254.1233,-161.3863,1.1650,358.5847,-1,-1, 60000); // MTBIKE[RED]
    AddStaticVehicleEx(Rbikes[random(3)],253.1233,-161.3863,1.1650,358.5847,-1,-1, 60000); // MTBIKE[RED]
    AddStaticVehicleEx(Rbikes[random(3)],675.4565,-447.3028,15.9390,159.5731,-1,-1, 60000); // MTBIKE[GREEN]
    AddStaticVehicleEx(Rbikes[random(3)],673.7814,-447.2512,15.9338,159.5731,-1,-1, 60000); // MTBIKE[BLUE]
    AddStaticVehicleEx(Rbikes[random(3)],660.6567,-501.0618,15.9412,17.5304,-1,-1, 60000); // MTBIKE[126]

    // PALOMINO CREEK !!! ^^^
    AddStaticVehicleEx(Rbikes[random(3)],2554.8821,67.4916,26.2771,60.6485,-1,-1, 60000); // MTBIKE[WHITE]
    AddStaticVehicleEx(Rbikes[random(3)],2541.7593,127.2349,26.3776,134.3379,-1,-1, 60000); // MTBIKE[RED]
    AddStaticVehicleEx(Rbikes[random(3)],2490.0684,86.4605,26.2801,335.5609,-1,-1, 60000); // MTBIKE[WHITE]
    AddStaticVehicleEx(Rbikes[random(3)],2259.6475,-81.6980,26.1436,174.5939,-1,-1, 60000); // MTBIKE[WHITE]
    AddStaticVehicleEx(Rbikes[random(3)],2260.6475,-81.6980,26.1436,174.5939,-1,-1, 60000); // MTBIKE[2]
    AddStaticVehicleEx(Rbikes[random(3)],2261.6475,-81.6980,26.1436,174.5939,-1,-1, 60000); // MTBIKE[YELLOW]
    AddStaticVehicleEx(Rbikes[random(3)],2262.6475,-81.6980,26.1436,174.5939,-1,-1, 60000); // MTBIKE[RED]
    AddStaticVehicleEx(Rbikes[random(3)],2483.9307,123.2751,26.2433,58.2016,-1,-1, 60000); // BMX[YELLOW]
    AddStaticVehicleEx(Rbikes[random(3)],2306.0623,-113.5844,26.3524,223.6138,-1,-1, 60000); // BMX[BLACK]
    AddStaticVehicleEx(Rbikes[random(3)],2292.0015,-134.5908,26.9904,353.9868,-1,-1, 60000); // BMX[RED]
    AddStaticVehicleEx(Rbikes[random(3)],2554.2153,9.7777,26.6787,60.7086,-1,-1, 60000); // BMX[WHITE,RED]
    AddStaticVehicleEx(Rbikes[random(3)],2375.4807,-46.1159,26.8168,328.5731,-1,-1, 60000); // BMX[1,86]
    AddStaticVehicleEx(Rbikes[random(3)],2520.1453,-24.8122,27.1036,55.0287,-1,-1, 60000); // BMX[WHITE,BLUE]
    AddStaticVehicleEx(Rbikes[random(3)],2248.3784,80.6407,26.2186,27.8779,-1,-1, 60000); // BMX[RED]
    AddStaticVehicleEx(Rbikes[random(3)],2247.3784,80.6407,26.2186,27.8779,-1,-1, 60000); // BMX[WHITE]
    AddStaticVehicleEx(Rbikes[random(3)],2374.5925,-2.8988,27.3354,290.5265,-1,-1, 60000); // BMX[WHITE]
	AddStaticVehicleEx(Rbikes[random(3)],2374.7407,15.1962,27.2618,293.5332,-1,-1, 60000); // BMX[6]
	AddStaticVehicleEx(Rbikes[random(3)],2378.0989,71.4976,27.1882,346.2762,-1,-1, 60000); // MTBIKE[WHITE]
	AddStaticVehicleEx(Rbikes[random(3)],2398.9192,104.6976,26.6434,88.5790,-1,-1, 60000); // MTBIKE[86]
	AddStaticVehicleEx(Rbikes[random(3)],2398.9421,105.8248,26.8584,88.6562,-1,-1, 60000); // MTBIKE[91]
	AddStaticVehicleEx(Rbikes[random(3)],2323.9023,183.6583,27.3316,359.0478,-1,-1, 60000); // MTBIKE[38]
	AddStaticVehicleEx(Rbikes[random(3)],2324.9521,183.6409,27.3306,359.0480,-1,-1, 60000); // MTBIKE[114]
	AddStaticVehicleEx(Rbikes[random(3)],2262.3357,153.2828,26.2184,358.9432,-1,-1, 60000); // MTBIKE[RED]
	AddStaticVehicleEx(Rbikes[random(3)],2263.7263,153.2582,26.2126,358.9557,-1,-1, 60000); // MTBIKE[WHITE]
	AddStaticVehicleEx(Rbikes[random(3)],2272.8662,111.6811,28.0478,87.6178,-1,-1, 60000); // MTBIKE[84]
	AddStaticVehicleEx(Rbikes[random(3)],2268.1233,-8.8227,27.0773,177.3659,-1,-1, 60000); // MTBIKE[6]
	AddStaticVehicleEx(Rbikes[random(3)],2266.1729,-8.7330,27.0773,177.3660,-1,-1, 60000); // MTBIKE[9]
	AddStaticVehicleEx(Rbikes[random(3)],2508.6599,65.7181,26.6931,92.2499,-1,-1, 60000); // BIKE[63]
	AddStaticVehicleEx(Rbikes[random(3)],2554.7769,98.0377,26.5826,87.3574,-1,-1, 60000); // BIKE[86]
	AddStaticVehicleEx(Rbikes[random(3)],2553.6338,55.3477,26.5864,87.3575,-1,-1, 60000); // BIKE[WHITE]
	AddStaticVehicleEx(Rbikes[random(3)],2553.5850,54.2983,26.5864,87.3575,-1,-1, 60000); // BIKE[86]
	AddStaticVehicleEx(Rbikes[random(3)],2560.7004,-1.3536,26.0845,90.2836,-1,-1, 60000); // BIKE[8]
	AddStaticVehicleEx(Rbikes[random(3)],2479.3169,11.0014,27.2403,90.5926,-1,-1, 60000); // BIKE[7]
	AddStaticVehicleEx(Rbikes[random(3)],2206.7395,107.6952,27.3262,271.3089,-1,-1, 60000); // BIKE[WHITE]
	AddStaticVehicleEx(Rbikes[random(3)],2281.4983,160.8939,28.0487,264.9549,-1,-1, 60000); // BIKE[84]
	AddStaticVehicleEx(Rbikes[random(3)],2488.2063,128.5367,26.6075,1.6041,-1,-1, 60000); // MTBIKE[63]
	AddStaticVehicleEx(Rbikes[random(3)],2510.3347,136.0847,26.5425,179.7607,-1,-1, 60000); // BIKE[1]
	AddStaticVehicleEx(Rbikes[random(3)],2553.7471,89.3896,26.5734,59.9044,-1,-1, 60000); // MTBIKE[114]
	AddStaticVehicleEx(Rbikes[random(3)],2249.5251,-131.6457,26.9919,296.8699,-1,-1, 60000); // BMX[2]

    // MONTOGOMERY !!! ^^^
   	AddStaticVehicleEx(Rbikes[random(3)],1398.0804,406.7557,19.4111,243.0852,-1,-1, 60000); // MTBIKE[RE]
	AddStaticVehicleEx(Rbikes[random(3)],1398.0804,407.7557,19.4111,243.0852,-1,-1, 60000); // MTBIKE[YELLOW]
	AddStaticVehicleEx(Rbikes[random(3)],1398.0804,408.7557,19.4111,243.0852,-1,-1, 60000); // MTBIKE[GREEN]
 	AddStaticVehicleEx(Rbikes[random(3)],1242.3149,214.3822,19.1737,70.9662,-1,-1, 60000); // MTBIKE[BLUE]
    AddStaticVehicleEx(Rbikes[random(3)],1241.3149,213.3822,19.1737,70.9662,-1,-1, 60000); // MTBIKE[EHITE]
    AddStaticVehicleEx(Rbikes[random(3)],1240.3149,212.3822,19.1737,70.9662,-1,-1, 60000); // MTBIKE[BLUE]
    AddStaticVehicleEx(Rbikes[random(3)],1316.2722,208.4798,19.1635,158.7488,-1,-1, 60000); // MTBIKE[1]
	AddStaticVehicleEx(Rbikes[random(3)],1317.2722,208.4798,19.1635,158.7488,-1,-1, 60000); // MTBIKE[8]
	AddStaticVehicleEx(Rbikes[random(3)],1318.2722,208.4798,19.1635,158.7489,-1,-1, 60000); // MTBIKE[86]
	AddStaticVehicleEx(Rbikes[random(3)],1365.8944,263.8368,19.0790,64.2567,-1,-1, 60000); // BIKE[64]  -- > 345
	AddStaticVehicleEx(Rbikes[random(3)],1365.4385,262.8913,19.0791,64.2566,-1,-1, 60000); // BIKE[63]
	AddStaticVehicleEx(Rbikes[random(3)],1364.8663,261.7047,19.0790,64.2566,-1,-1, 60000); // BIKE[117]
	AddStaticVehicleEx(Rbikes[random(3)],1265.1633,322.9352,19.2704,321.8610,-1,-1, 60000); // BIKE[SILVER]

	AddStaticVehicleEx(Rbikes[random(3)],-302.1085,1125.3732,19.3509,179.0428,-1,-1,60000); // BIKE FORT CARSON
	AddStaticVehicleEx(Rbikes[random(3)],-286.9174,1124.8419,19.5486,176.7289,-1,-1,60000); // BIKE FORT CARSON  -- > 351
	AddStaticVehicleEx(Rbikes[random(3)],-297.6804,1170.5334,19.8821,296.6438,-1,-1,60000); // BIKE FORT CARSON
	AddStaticVehicleEx(Rbikes[random(3)],-332.1213,1168.5626,19.7214,353.5099,-1,-1,60000); // BIKE FORT CARSON
	AddStaticVehicleEx(Rbikes[random(3)],-364.3017,1143.9666,19.8282,78.0855,-1,-1,60000); // BIKE FORT CARSON
	AddStaticVehicleEx(Rbikes[random(3)],-370.7782,1099.4891,19.3493,258.2383,-1,-1,60000); // BIKE FORT CARSON
	AddStaticVehicleEx(Rbikes[random(3)],-258.3772,1118.6952,19.8331,298.3176,-1,-1,60000); // BIKE FORT CARSON
	AddStaticVehicleEx(Rbikes[random(3)],-263.1992,1082.0773,19.6559,209.5585,-1,-1,60000); // BIKE FORT CARSON
	AddStaticVehicleEx(Rbikes[random(3)],-263.3409,1045.6643,19.6411,203.8739,-1,-1,60000); // BIKE FORT CARSON
	AddStaticVehicleEx(Rbikes[random(3)],-271.2502,996.5948,19.9400,25.9447,-1,-1,60000); // BIKE FORT CARSON
	AddStaticVehicleEx(Rbikes[random(3)],-244.0041,997.1016,19.3829,214.2204,-1,-1,60000); // BIKE FORT CARSON
	AddStaticVehicleEx(Rbikes[random(3)],-255.0461,1144.8489,19.8284,296.2910,-1,-1,60000); // BIKE FORT CARSON  -- > 361
	AddStaticVehicleEx(Rbikes[random(3)],-245.0591,1175.6665,19.7318,255.6046,-1,-1,60000); // BIKE FORT CARSON
	AddStaticVehicleEx(Rbikes[random(3)],-162.9246,1009.6098,19.3484,286.8600,-1,-1,60000); // BIKE FORT CARSON
	AddStaticVehicleEx(Rbikes[random(3)],-162.1938,1012.7115,19.3492,276.7285,-1,-1,60000); // BIKE FORT CARSON
	AddStaticVehicleEx(Rbikes[random(3)],-169.8140,1024.9281,19.3428,6.5540,-1,-1,60000); // BIKE FORT CARSON
	AddStaticVehicleEx(Rbikes[random(3)],-145.5137,1080.2271,19.3583,279.8275,-1,-1,60000); // BIKE FORT CARSON
	AddStaticVehicleEx(Rbikes[random(3)],-176.9914,1044.0895,19.3248,77.5681,-1,-1,60000); // BIKE FORT CARSON
	AddStaticVehicleEx(Rbikes[random(3)],-221.3902,1147.7677,19.3467,78.9698,-1,-1,60000); // BIKE FORT CARSON
	AddStaticVehicleEx(Rbikes[random(3)],-221.8056,1150.1381,19.3380,100.3557,-1,-1,60000); // BIKE FORT CARSON
	AddStaticVehicleEx(Rbikes[random(3)],-221.3190,1151.9531,19.3509,81.7746,-1,-1,60000); // BIKE FORT CARSON
	AddStaticVehicleEx(Rbikes[random(3)],-207.3820,1176.4805,19.3325,259.7332,-1,-1,60000); // BIKE FORT CARSON  -- > 371
	AddStaticVehicleEx(Rbikes[random(3)],-213.8326,1216.3877,19.3607,158.7315,-1,-1,60000); // BIKE FORT CARSON
	AddStaticVehicleEx(Rbikes[random(3)],-183.5566,1227.6300,19.3492,97.2535,-1,-1,60000); // BIKE FORT CARSON
	AddStaticVehicleEx(Rbikes[random(3)],-132.0249,1181.5516,19.3500,183.1495,-1,-1,60000); // BIKE FORT CARSON
	AddStaticVehicleEx(Rbikes[random(3)],-102.0076,1190.7502,19.3506,242.8326,-1,-1,60000); // BIKE FORT CARSON
	AddStaticVehicleEx(Rbikes[random(3)],-70.0307,1208.6329,19.3473,90.0454,-1,-1,60000); // BIKE FORT CARSON  -- > 376


    // Pickup Spawn's

	// BANK
	AddStaticPickup(1239,1,-179.7120,1133.1661,19.7422); // FORT CARSON BANK

	// Info Icons
	AddStaticPickup(1239,1,209.7379,-226.5186,1.7786); // Racing Chacllenge [FINAL]
 	AddStaticPickup(1239,1,1373.3511,405.3483,19.9555); // MONTOGOMERY SCHOOL
	
	// ---- [Driving Schools] ----
	AddStaticPickup(1239,1,215.8799,14.4829,2.5708); // Driving School [FINAL] BLUEBERRY
	AddStaticPickup(1239,1,2273.8552,82.5335,26.4844); // Driving School [FINAL] PALOMINO CREEK

	// ---- [Drinking Bar] ----
	AddStaticPickup(1239,1,681.6143,-473.8615,16.5363); // Bar In Dillimore [FINAL]
	AddStaticPickup(1239,1,-219.5037,1403.8104,27.7734); // Barman Job
	
	// ---- [Ammonation Range] ----
	AddStaticPickup(1239,1,301.7877,-77.1030,1001.5156); // RANGE ENTER
	AddStaticPickup(1239,1,302.5721,-57.7382,1001.5156); // RANGE ENTER INS
	AddStaticPickup(1239,1,304.4310,-57.6886,1001.5156); // RANGE EXIT INS
	AddStaticPickup(1239,1,301.8627,-75.0630,1001.5156); // RANGE EXIT INS

	// ---- [General Stores] ----
	AddStaticPickup(1239,1,691.5836,-546.8424,16.3359); // General Store [FINAL] DILLIMORE
	AddStaticPickup(1239,1,1374.4208,300.2069,19.7392); // General Store [FINAL] MONTOGOMERY
	
	// ---- [Jobs] ----
	AddStaticPickup(1239,1,-79.0716,90.7620,3.1172); // FARMER JOB
	AddStaticPickup(1239,1,-49.8395,-269.7327,6.6332); // TRUCK JOB
	AddStaticPickup(1239,1,252.9260,-62.7560,1.5781); // ALCOHOL JOB
	AddStaticPickup(1239,1,213.2069,-182.8633,1.5781); // PIZZA JOB
	AddStaticPickup(1239,1,203.2578,-183.0827,1.5781); // PIZZA JOB - TAKE PIZZA
	AddStaticPickup(1239,1,206.3718,-225.6544,1.7786); // MECHANIC JOB
	AddStaticPickup(1239,1,-331.2393,1050.8628,19.7392); // MEDIC JOB
	AddStaticPickup(1239,1,1918.2163,172.8078,37.2595); // FARME JOB [PALOMINO]
	AddStaticPickup(1239,1,207.8452,-62.9924,1.5781); // BlueBerry Job Station Enter
	AddStaticPickup(1239,1,1227.0087,311.6913,19.7578); // BUS JOB
	AddStaticPickup(1239,1,2407.0066,84.0189,26.4735); // ICECREAM JOB
	AddStaticPickup(1239,1,1324.3359,286.5356,20.0452); // ICECREAM Take
	AddStaticPickup(1239,1,2313.9375,56.4570,26.4806); // Arms Dealer Job
	AddStaticPickup(1239,1,-168.2362,1032.0129,19.7344); // Arms Dealer Get
	AddStaticPickup(1239,1,2326.4529,63.1036,26.4922); // Arms Dealer Drop

	// ---- [Stores] ----
	AddStaticPickup(1273,1,197.0348,-232.5537,1.7786); // RACING GARAGE [BLUEBERRY]
	AddStaticPickup(1273,1,201.2415,-203.5590,1.5781); // PIZZA [FINAL] [BLUEBERRY]
    AddStaticPickup(1273,1,418.2950,-80.1018,1001.8047); // BARBER SHOP DILLIMORE
    AddStaticPickup(1273,1,701.8361,-519.7315,16.3340); // BIKES SHOP DILLIMORE
    
    // ---- [Club-dillimore] ----
    AddStaticPickup(1239,1,811.8522,-564.4258,16.3359); // Club Dillimore Enter
    AddStaticPickup(1239,1,503.3813,-11.5668,1000.6797); // Club Enter to VIP's!
    
    // ---- [Familey Houses] ----
    AddStaticPickup(1273,1,2106.3577,-101.7386,2.0264); // Demedici House
    AddStaticPickup(1239,1,2088.6072,-114.4732,1.8195); // Demedici House

	return 1;
}


public OnPlayerRequestClass(playerid, classid)
{
	SetPlayerPos(playerid, 713.6481,-1634.0034,2.7164);
    SetPlayerCameraPos(playerid, 716.2721,-1633.9612,2.4297);
	SetPlayerCameraLookAt(playerid, 713.6481,-1634.0034,2.7164);
	SetPlayerFacingAngle(playerid,-90.0);
	ApplyAnimation(playerid, "DANCING", "dnce_M_b", 4.299999, 1, 1, 1, 0, 10000);
	PlayerInfo[playerid][pModel] = PlayerPeds[classid][0];
	pClass[playerid] = classid;

    if(classid == 1)
    {
		GameTextForPlayer(playerid,"~y~> ~p~ACI Class ~y~<~n~first sergeant major only!",3250,6);
    }
    
    else if(classid == 2)
    {
    	GameTextForPlayer(playerid,"~y~> ~p~ACI Class ~y~<~n~ staff sergeant only!",3250,6);
    }

    else if(classid == 3)
    {
        GameTextForPlayer(playerid,"~y~> ~p~ACI Class ~y~<~n~ sergeant only!",3250,6);
    }

	else if(classid == 4)
	{
	    GameTextForPlayer(playerid,"~y~> ~p~Police Class ~y~<~n~police officer's Only",3250,6);
    }
    
	else if(classid == 5)
	{
        GameTextForPlayer(playerid,"~y~> ~p~Police Class ~y~<~n~police officer's Only",3250,6);
    }
    
	else if(classid == 6)
	{
	    GameTextForPlayer(playerid,"~y~> ~p~Mayor Class~y~<~n~Towns Mayor Only!",2250,6);
    }
    
   	else if(classid == 7)
	{
 	GameTextForPlayer(playerid,"~y~> ~p~School Manager ~y~< ~n~Leaders only!",3250,6);
    }
    
   	else if(classid == 8)
	{
 	GameTextForPlayer(playerid,"~y~> ~p~License Faction Leader~y~<~n~Leaders only!",3250,6);
    }
    
   	else if(classid == 9)
	{
	    GameTextForPlayer(playerid,"~y~> ~p~Demedici Leader ~y~< ~n~Leaders only!",3250,6);
    }
    
	else if(classid >= 10 && classid <= 12)
	{
		GameTextForPlayer(playerid,"~y~> ~p~Unknown familey ~y~< ~n~Leaders only!",3250,6);
    }
   	else
	{
    GameTextForPlayer(playerid,"~y~> ~r~Civilian Class ~y~<",3250,6);
    }

	return 1;
}

public OnPlayerRequestSpawn(playerid)
{
	if(pClass[playerid] == 1)
	{
	    if(PlayerInfo[playerid][pAci] != 2)
	    {
	        return 0;
	    }
	}
	
	else if(pClass[playerid] == 2)
	{
	    if(PlayerInfo[playerid][pAci] != 2)
	    {
	        return 0;
	    }
	}
	
	else if(pClass[playerid] == 3)
	{
	    if(PlayerInfo[playerid][pAci] != 1)
	    {
	        return 0;
	    }
	}
	
	else if(pClass[playerid] == 4)
	{
	    if(PlayerInfo[playerid][pPolice] != 3)
	    {
	        return 0;
	    }
	}
	
	else if(pClass[playerid] == 5)
	{
	    if(PlayerInfo[playerid][pPolice] != 1 || PlayerInfo[playerid][pPolice] != 2)
	    {
	        return 0;
	    }
	}
	
	else if(pClass[playerid] == 6)
	{
	    if(PlayerInfo[playerid][pInstructor] != 3)
	    {
	        return 0;
	    }
	}
	
	else if(pClass[playerid] == 7)
	{
	    if(PlayerInfo[playerid][pInstructor] != 3)
	    {
	        return 0;
	    }
	}

	else if(pClass[playerid] == 8)
	{
	    if(PlayerInfo[playerid][pInstructor] != 1)
	    {
	        return 0;
	    }
	}
	else if(pClass[playerid] == 9)
	{
	    if(PlayerInfo[playerid][pFMember] != 1 && PlayerInfo[playerid][pFLeader] != 1)
	    {
	        return 0;
	    }
	}
	return 1;
}

public OnGameModeExit()
{
    KillTimer(checkgastimer);
    KillTimer(sectimer);
    KillTimer(accountstimer);
    KillTimer(synctimer);
	GameModeExit();
	return 1;
}

public OnPlayerConnect(playerid)
{
    new string[256];
    new playername[MAX_PLAYER_NAME],f;
	GetPlayerName(playerid,playername,MAX_PLAYER_NAME);
	if(strfind(playername,"_",true,1)!=-1)
		f=1;
	if(playername[strlen(playername)-1]=='_')
	    f=0;
	for(new i=0;i<strlen(playername);i++)
		if((playername[i]<='9')&&(playername[i]>='0'))
 		f=0;
	if(!f)
	{
	    SendClientMessage(playerid,COLOR_RED,"Firstname_Lastname");
	    Kick(playerid);
	}

    SetPlayerColor(playerid,COLOR_WHITE);
    GetPlayerName(playerid,playername,sizeof(playername));
    format(string,sizeof(playername),"Wellcome %s, Enjoy Playing Here.",playername);
    
    SetPlayerMapIcon(playerid, 1, 210.0508,-251.9361,15.5781, 53, COLOR_WHITE); // Racing Garage In BlueBerry
    SetPlayerMapIcon(playerid, 2, 215.8799,14.4829,15.5708, 36, COLOR_WHITE); // Driving School In BlueBerry
    SetPlayerMapIcon(playerid, 3, 2275.7332,74.7121,34.9834, 36, COLOR_WHITE); // Driving School In Palomino Creek
    SetPlayerMapIcon(playerid, 4, -319.9034,1048.2380,20.3403, 22, COLOR_WHITE); // Hospital Dillimore
    SetPlayerMapIcon(playerid, 5, 684.0247,-465.7077,49.1333, 49, COLOR_WHITE); // Bar In Dillimore
    SetPlayerMapIcon(playerid, 6, -18.1501,-338.0089,5.4297, 51, COLOR_WHITE); // Truck Job BlueBerry
    SetPlayerMapIcon(playerid, 7, 691.4351,-546.9944,16.3359, 52, COLOR_WHITE); // General Store Dillimore
    SetPlayerMapIcon(playerid, 8, 1377.8925,306.7280,25.5555, 52, COLOR_WHITE); // General Store Dillimore
    SetPlayerMapIcon(playerid, 9, 1234.9001,306.6151,19.7578, 55, COLOR_WHITE); // Bus station montogomery
    SetPlayerMapIcon(playerid, 10, 1319.6569,270.4856,25.9488, 17, COLOR_WHITE); // IceCREAM Take Dilliomore
    SetPlayerMapIcon(playerid, 11, -168.9630,1127.7048,19.7500, 52, COLOR_WHITE); // General Store Dillimore

    
	if(PlayerInfo[playerid][pLevel] == -999) //autoban
	{
		Ban(playerid);
	}
    
    playersonline = playersonline + 1;
    PlayerAccount[playerid] = 0;
    PLAYERLIST_authed[playerid]=false;
    TogglePlayerClock(playerid,1);
    int_b[playerid] = INTB_NONE;
    accept_b[playerid] = ACCEPT_NONE;
	spawntext[playerid]=0;
	PlayerCuffedTime[playerid] = 0; PlayerTied[playerid] = false; PlayerChained[playerid] = false;
	pizzatext[playerid]=0;
	PlayerInfo[playerid][pJailTime] = 0;
	DrinksBought[playerid] = 0;
	trailergas[playerid]=0;
	PrisonCamera[playerid]=0;
	PlayerInfo[playerid][pLivingArea]=0;
	RegistrationStep[playerid] = 0; RegQuestionWas[playerid] = 0;
	PlayerInfo[playerid][pDeaths] = 0;
	PlayerInfo[playerid][pAccount] = 0;
	gOoc[playerid] = 0;
	OnDuty[playerid] = 0;
	PlayerInfo[playerid][pCarLic]=0;
	PlayerInfo[playerid][pGunLic]=0;
	PlayerInfo[playerid][pSailLic]=0;
	PlayerInfo[playerid][pAdmin] = 0;
	PlayerInfo[playerid][pPolice] = 0;
	PlayerInfo[playerid][pInstructor] = 0;
	PlayerInfo[playerid][pAci] = 0;
	PlayerInfo[playerid][pJob] = 0;
	PlayerInfo[playerid][pDelivery] = 0;
	PlayerInfo[playerid][pContractTime] = 0;
    PlayerInfo[playerid][pModel] = 264;
    PlayerInfo[playerid][pChar] = 0;
    PlayerInfo[playerid][pPayCheck] = 0;
    PlayerInfo[playerid][pLevel] = 1;
    PlayerInfo[playerid][pPhoneBook] = 0;
    PlayerInfo[playerid][pCockie] = 0;
    PlayerInfo[playerid][pCutter] = 0;
    PlayerInfo[playerid][pFLeader] = 0;
    PlayerInfo[playerid][pFMember] = 0;
    PlayerInfo[playerid][pConnectTime] = 0;
    PlayerInfo[playerid][pExp] = 0;
    PlayerInfo[playerid][pRank] = 0;
    PlayerHouse[playerid][pInfoHouse] = 0;
    PlayerInfo[playerid][pWarns] = 0;
    
    if(PlayerInfo[playerid][pJob] == 1) { barmans = barmans + 1; }
    if(PlayerInfo[playerid][pJob] == 2) { medics = medics + 1; }
    if(PlayerInfo[playerid][pJob] == 3) { truck = truck + 1; }
    if(PlayerInfo[playerid][pJob] == 4) { pizza = pizza + 1; }
    if(PlayerInfo[playerid][pJob] == 5) { farmer = farmer + 1; }
    if(PlayerInfo[playerid][pJob] == 6) { farmer1 = farmer1 + 1; }
    if(PlayerInfo[playerid][pJob] == 7) { icecreamsellers = icecreamsellers + 1; }
    if(PlayerInfo[playerid][pJob] == 8) { armsdealers = armsdealers + 1; }
    if(PlayerInfo[playerid][pJob] == 10) { bus = bus + 1; }
    
	DrinkOffer[playerid] = 999; DrinkPrice[playerid] = 0; DrinkSold[playerid] = 0;
	PizzaOffer[playerid] = 999; PizzaPrice[playerid] = 0; PizzasBought[playerid] = 0; pizzas[playerid] = 0;
	IcecreamOffer[playerid] = 999; icecreamunit[playerid]=0; IcecreamPrice[playerid] = 0;
	MatsHolding[playerid] = 0; PlayerInfo[playerid][pMaterials] = 0; PlayerInfo[playerid][pArmsDealerSkill] = 0;
	RepairOffer[playerid] = 999; RepairPrice[playerid] = 0; RepairCar[playerid] = 0; PlayerInfo[playerid][pMechanicSkill] = 0;
	PainKillerOffer[playerid] = 999; PainKillerPrice[playerid] = 0; PlayerInfo[playerid][pPainKillers] = 0;
	HealOffer[playerid] = 999; HealPrice[playerid] = 0; JailPrice[playerid] = 0;
	MetalsHolding[playerid] = 0; gDice[playerid] = false;
	TicketOffer[playerid] = 999; TicketOffer[playerid] = 0;
	Mobile[playerid] = 255;   MedicCallTime[playerid] = 0;
	TransportTime[playerid] = 0; TransportCost[playerid] = 0; TransportDuty[playerid] = 0; TransportDriver[playerid] = 999;
	gGas[playerid] = 0; NoFuel[playerid] = false;
	RefillOffer[playerid] = 999; RefillPrice[playerid] = 0;
	engine[playerid] = false;
	DMVdoor[playerid] = false;

	// Store Owners
	owner[playerid] = OWNER_PIZZA_NONPURCHASED; owner[playerid] = OWNER_BARBER_NONPURCHASED; owner[playerid] = OWNER_Garage_NONPURCHASED; owner[playerid] = OWNER_BIKES_NONPURCHASED;

	Rope[playerid]=false; Clock[playerid]=false; Chain[playerid]=false;
	
	new randphone = 1000 + random(98999);
	PlayerInfo[playerid][pPhonenumber] = randphone;
	
    raceblock[playerid]=0;
    dragblock[playerid]=0;
    countblock[playerid] = 1;
	SendClientMessage(playerid, COLOR_WHITE,string);
	GetPlayerName(playerid, playername, sizeof(playername));
	format(string, sizeof(string), "%s.user", playername);
	if(fexist(string))
	{
		PlayerAccount[playerid] = 1;
		SendClientMessage(playerid, COLOR_YELLOW, "SERVER: That name is registered, please login by typing /login [password]");
		return 1;
	}
	else
	{
		PlayerAccount[playerid] = 0;
  		SendClientMessage(playerid,COLOR_YELLOW,"You are not registered. Please register by using /register [password]");
		return 1;
	}
}

public OnPlayerDisconnect(playerid)
{
    if(TransportDuty[playerid] == 2)
	{
		BusDrivers -= 1;
	}
	
    if(PlayerInfo[playerid][pJob] == 1) { barmans = barmans - 1; }
    if(PlayerInfo[playerid][pJob] == 2) { medics = medics - 1; }
    if(PlayerInfo[playerid][pJob] == 3) { truck = truck -1 ; }
    if(PlayerInfo[playerid][pJob] == 4) { pizza = pizza - 1; }
    if(PlayerInfo[playerid][pJob] == 5) { farmer = farmer - 1; }
    if(PlayerInfo[playerid][pJob] == 6) { farmer1 = farmer1 - 1; }
    if(PlayerInfo[playerid][pJob] == 7) { icecreamsellers = icecreamsellers - 1; }
    if(PlayerInfo[playerid][pJob] == 8) { armsdealers = armsdealers - 1; }
    if(PlayerInfo[playerid][pJob] == 10) { bus = bus - 1; }
    
   	new caller = Mobile[playerid];
	if(caller != 255)
	{
		if(caller < 255)
		{
		SendClientMessage(caller,  COLOR_GREY, "* The phone call disconnected....");
		CellTime[caller] = 0;
		CellTime[playerid] = 0;
		Mobile[caller] = 255;
		}
		Mobile[playerid] = 255;
		CellTime[playerid] = 0;
	}
	
    playersonline = playersonline - 1;
	OnPlayerUpdate(playerid);
  	PLAYERLIST_authed[playerid]=false;
	return false;
}

public OnPlayerSpawn(playerid)
{

	new h,m;
    CalculateVirtualTime(h,m);
    SetPlayerTime(playerid, h, m);
    GameTextForPlayer(playerid," ",100,2);
	SetPlayerHealth(playerid,70);
	f_health[playerid]=1;
    SetPlayerWantedLevel(playerid,0);
	SetPlayerInterior(playerid,0);
    SetPlayerWeather(playerid,18);
    SetPlayerWantedLevel(playerid,0);
    SetPlayerColor(playerid,COLOR_WHITE);

    if(!PLAYERLIST_authed[playerid])
    {
    SendClientMessage(playerid,COLOR_GREY,"SERVER: You have been kicked. (Reason: forgot to login before spawn)");
    Kick(playerid);
    }
    
	if(RegQuestionWas[playerid] == 0)
	{
    TogglePlayerControllable(playerid, false);
	}

	if(PlayerInfo[playerid][pLivingArea] == 1) // North Israel
	{
    SetPlayerPos(playerid,307.6528,-149.5060,1.5781);
	SetPlayerFacingAngle(playerid, 46.8583);
	SetPlayerInterior(playerid,0);
	}
	else if(PlayerInfo[playerid][pLivingArea] == 2) // East Israel
	{
 	SetPlayerPos(playerid,687.9004,-557.4381,16.3359);
	SetPlayerFacingAngle(playerid, 91.0399);
	SetPlayerInterior(playerid,0);
	}
	else if(PlayerInfo[playerid][pLivingArea] == 3) // West Israel
	{
 	SetPlayerPos(playerid,-292.8344,1072.2037,19.7422);
	SetPlayerFacingAngle(playerid, 174.9577);
	SetPlayerInterior(playerid,0);
	}
	else if(PlayerInfo[playerid][pLivingArea] == 4) // South Israel
	{
 	SetPlayerPos(playerid,1243.3041,328.5569,19.7578);
	SetPlayerFacingAngle(playerid, 335.9849);
	SetPlayerInterior(playerid,0);
	}
	
    if(PlayerInfo[playerid][pJailed] == 1)
    {
	SetPlayerInterior(playerid, 6);
	SetPlayerPos(playerid,264.6288,77.5742,1001.0391);
  	}

	if(PlayerInfo[playerid][pPolice] >= 1)
	{
	SetPlayerPos(playerid,233.9415,72.8646,1005.0391);
	SetPlayerInterior(playerid,6);
	SetPlayerFacingAngle(playerid, 90.0);
	PlayerInfo[playerid][pCarLic]=1;
	PlayerInfo[playerid][pGunLic]=1;
	SetPlayerSkin(playerid,282);
	}
	
	if(PlayerInfo[playerid][pInstructor] == 1)
	{
	PlayerInfo[playerid][pCarLic]=1;
	PlayerInfo[playerid][pGunLic]=1;
	PlayerInfo[playerid][pSailLic]=1;
	}

	if(PlayerInfo[playerid][pAci] == 1)
	{
	SetPlayerPos(playerid,1073.1187,-345.0134,73.9922);
	SetPlayerInterior(playerid,0);
	SetPlayerFacingAngle(playerid, 356.1556);
	GivePlayerWeapon(playerid,23,100);
	GivePlayerWeapon(playerid,31,300);
	GivePlayerWeapon(playerid,41,10000);
	PlayerInfo[playerid][pCarLic]=1;
	PlayerInfo[playerid][pGunLic]=1;
	}

	if(PlayerInfo[playerid][pFMember] >= 1)
	{
	SetPlayerPos(playerid,2109.7483,-99.6748,1.9424);
	SetPlayerInterior(playerid,0);
	SetPlayerFacingAngle(playerid, 299.0277);
	}
	
	if(PlayerInfo[playerid][pChar] > 0) { SetPlayerSkin(playerid, PlayerInfo[playerid][pChar]); }
	else { SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]); }
	
	if(PlayerHouse[playerid][pInfoHouse] == 1)
	{
	SetPlayerPos(playerid,2550.0579,92.6622,27.6756);
	SetPlayerInterior(playerid,0);
	SetPlayerFacingAngle(playerid,65.9893);
	}
	
	if(PlayerHouse[playerid][pInfoHouse] == 2)
	{
	SetPlayerPos(playerid,2519.1328,60.4939,27.6835);
	SetPlayerInterior(playerid,0);
	SetPlayerFacingAngle(playerid,354.7486);
	}
	
	return 1;
}


public OnPlayerDeath(playerid, killerid, reason)
{
    	new string[256];
		SetPlayerWantedLevel(playerid,0);
		f_health[playerid]=0;
		ResetPlayerWeapons(playerid);
		GameTextForPlayer(playerid,"~w~wasted",3500,2);
		GivePlayerMoney(playerid,-250);
		
		if(reason == 38)
		{
			new kstring[128];
			new kickname[256];
			if(IsPlayerConnected(killerid))
			{
				GetPlayerName(killerid, kickname, sizeof(kickname));
				format(string, 256, "AdmWarning: (ID:%d)%s just killed a player with minigun, he was auto banned!",killerid,kickname);
				ABroadCast(COLOR_RED,string,1);
				SendClientMessage(killerid,COLOR_MEDRED,"* LOL, noob you have been fucking pwned, dont use minigun next time");
				printf("%s", kstring);
				PlayerInfo[killerid][pLevel] = -999;
				Ban(killerid);
			}
		}
		if(reason == 35 || reason == 36)
		{
			new kstring[128];
			new kickname[256];
			if(IsPlayerConnected(killerid))
			{
				GetPlayerName(killerid, kickname, sizeof(kickname));
				format(string, 256, "AdmWarning: (ID:%d)%s just killed a player with RPG, he was auto banned!",killerid,kickname);
				ABroadCast(COLOR_RED,string,1);
				SendClientMessage(killerid,COLOR_MEDRED,"* LOL, noob you have been fucking pwned, dont use RPG next time");
				printf("%s", kstring);
				PlayerInfo[killerid][pLevel] = -999;
				Ban(killerid);
			}
		}
		
		if(reason == 39)
		{
			new kstring[128];
			new kickname[256];
			if(IsPlayerConnected(killerid))
			{
				GetPlayerName(killerid, kickname, sizeof(kickname));
				format(string, 256, "AdmWarning: (ID:%d)%s just killed a player with Satchel Charge, he was auto banned!",killerid,kickname);
				ABroadCast(COLOR_RED,string,1);
				SendClientMessage(killerid,COLOR_MEDRED,"* LOL, noob you have been fucking pwned, dont use Satchel Charge next time");
				printf("%s", kstring);
				Kick(killerid);
			}
		}
		
		if(reason == 28 || reason == 32 || reason == 42 || reason == 22)
		{
			new kstring[128];
			new kickname[256];
			if(IsPlayerConnected(killerid))
			{
				GetPlayerName(killerid, kickname, sizeof(kickname));
				format(string, 256, "AdmWarning: (ID:%d)%s just killed a player with Dual Weapon, he was kicked!",killerid,kickname);
				ABroadCast(COLOR_RED,string,1);
				if(reason == 42)
				{
				SendClientMessage(killerid,COLOR_MEDRED,"* LOL, noob you have been fucking pwned, dont use Fire Extinguisher next time");
				}
				else if(reason == 28 || reason == 32 || reason == 22)
				{
				SendClientMessage(killerid,COLOR_MEDRED,"* LOL, noob you have been fucking pwned, dont use DUAL next time");
				}
				printf("%s", kstring);
				Kick(killerid);
			}
		}
		
		PlayerInfo[killerid][pKills] = PlayerInfo[killerid][pKills] + 1;
		PlayerInfo[playerid][pDeaths] += 1;
		
		if(OnDuty[playerid] == 1)
		{
        OnDuty[playerid]=0;
		}
		
		new caller = Mobile[playerid];
		if(caller != 255)
		{
			if(caller < 255)
			{
			SendClientMessage(caller,  COLOR_GREY, "* The phone call disconnected....");
			CellTime[caller] = 0;
			CellTime[playerid] = 0;
			Mobile[caller] = 255;
			}
			Mobile[playerid] = 255;
			CellTime[playerid] = 0;
		}

		if (raceblock[playerid] > 0){
	    GameTextForPlayer(playerid,"You Lose The Race.",4000,5);
	    SetVehicleParamsForPlayer(1,playerid,0,1);
   		DisablePlayerCheckpoint(playerid);
	    SetVehicleToRespawn(1);
	    raceblock[playerid]=0;
	    countdown[playerid]=0;
	    }

		if (dragblock[playerid] > 0){
	    GameTextForPlayer(playerid,"You Lose The Race.",4000,5);
   		DisablePlayerCheckpoint(playerid);
	    SetVehicleParamsForPlayer(2,playerid,0,1);
	    SetVehicleToRespawn(2);
	    countdown[playerid]=0;
	    dragblock[playerid]=0;
	    }

		return 1;
}

public OnVehicleSpawn(vehicleid)
{

	new p_vehicle = GetPlayerVehicleID(vehicleid);

	if(p_vehicle == 1)
	{
	SetVehicleParamsForPlayer(1,vehicleid,0,0);
	}

	if(p_vehicle == 2)
	{
	SetVehicleParamsForPlayer(2,vehicleid,0,0);
	}

	AddVehicleComponent(242,1087);
	AddVehicleComponent(242,1074);
	AddVehicleComponent(243,1087);
	AddVehicleComponent(243,1097);
	AddVehicleComponent(245,1087);
	AddVehicleComponent(245,1074);
	AddVehicleComponent(246,1087);
	AddVehicleComponent(246,1074);
	AddVehicleComponent(247,1087);
	AddVehicleComponent(247,1097);

	return 1;
}

public OnVehicleDeath(vehicleid, killerid)
{

	AddVehicleComponent(242,1087);
	AddVehicleComponent(242,1074);
	AddVehicleComponent(243,1087);
	AddVehicleComponent(243,1097);
	AddVehicleComponent(245,1087);
	AddVehicleComponent(245,1074);
	AddVehicleComponent(246,1087);
	AddVehicleComponent(246,1074);
	AddVehicleComponent(247,1087);
	AddVehicleComponent(247,1097);

	return 1;
}


public OnPlayerText(playerid,text[])
{
	new tmp[256];
	new sendername[256];
	new string[256];

	if(RegistrationStep[playerid] == 1)
 	{
  		new idx;
 		tmp = strtok(text, idx);
  		if((strcmp("North", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("North")))
			{
		    PlayerInfo[playerid][pLivingArea] = 1;
		    SpawnPlayer(playerid);
		    SendClientMessage(playerid, COLOR_YELLOW,"Information received, you are living in North side of country.");
		    SendClientMessage(playerid, COLOR_WHITE, "Thank you for filling in the requested information.");
		    TogglePlayerControllable(playerid, true);
			RegistrationStep[playerid] = 0;
			RegQuestionWas[playerid]=1;
		    return 0;
		}
		else if((strcmp("East", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("East")))
		{
		    PlayerInfo[playerid][pLivingArea] = 2;
		    SpawnPlayer(playerid);
		    SendClientMessage(playerid, COLOR_YELLOW,"Information received, you are living in the East of country.");
		    SendClientMessage(playerid, COLOR_WHITE, "Thank you for filling in the requested information.");
		    TogglePlayerControllable(playerid, true);
			RegistrationStep[playerid] = 0;
			RegQuestionWas[playerid]=1;
		    return 0;
		}
		else if((strcmp("West", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("West")))
		{
		    PlayerInfo[playerid][pLivingArea] = 3;
		    SpawnPlayer(playerid);
		    SendClientMessage(playerid, COLOR_YELLOW,"Information received, you are living in the West of country.");
		    SendClientMessage(playerid, COLOR_WHITE, "Thank you for filling in the requested information.");
		    TogglePlayerControllable(playerid, true);
			RegistrationStep[playerid] = 0;
			RegQuestionWas[playerid]=1;
		    return 0;
		}
		else if((strcmp("South", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("South")))
		{
		    PlayerInfo[playerid][pLivingArea] = 4;
		    SpawnPlayer(playerid);
		    SendClientMessage(playerid, COLOR_YELLOW, "Information received, you are living in South side of country.");
		    SendClientMessage(playerid, COLOR_WHITE, "Thank you for filling in the requested information.");
		    TogglePlayerControllable(playerid, true);
			RegistrationStep[playerid] = 0;
			RegQuestionWas[playerid]=1;
		    return 0;
		}
		else
		{
		    SendClientMessage(playerid, COLOR_YELLOW, "Where do you live in you country area ? (Type: North,East,West,South)");
		}
		return 0;
	}
	
	if(Mobile[playerid] != 255)
	{
		new idx;
		tmp = strtok(text, idx);
		GetPlayerName(playerid, sendername, sizeof(sendername));
		format(string, sizeof(string), "%s Says (cellphone): %s", sendername, text);
		ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
		if(IsPlayerConnected(Mobile[playerid]))
		{
		    if(Mobile[Mobile[playerid]] == playerid)
		    {
				SendClientMessage(Mobile[playerid], COLOR_YELLOW,string);
			}
		}
		else
		{
			SendClientMessage(playerid, COLOR_YELLOW,"Theres nobody there");
		}
		return 0;
	}
	if (realchat)
	{
	    if(!PLAYERLIST_authed[playerid])
	    {
	        return 0;
      	}
		GetPlayerName(playerid, sendername, sizeof(sendername));
		format(string, sizeof(string), "%s Says: %s", sendername, text);
		ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
		return 0;
	}
	return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{

    new string[256];
    new vid;
    new sendername[MAX_PLAYER_NAME];
	new giveplayer[MAX_PLAYER_NAME];
	new cmd[256],idx,f,id,playername[MAX_PLAYER_NAME];
	new tmp[256];
	new moneys;
	new giveplayerid = strval(tmp);
	cmd = strtok(cmdtext, idx);
	vid = GetPlayerVehicleID(playerid);

	dcmd(deny,4,cmdtext);
 	dcmd(farmer,6,cmdtext);


  	
//-------------------------------[School Commands]--------------------------------------------------------------------------

	if(strcmp(cmd, "/enter", true) == 0)
	{
	    if(spot[playerid] == SPOT_SCHOOLSTUDY)
	    {
	    SetPlayerPos(playerid,223.9464,118.2008,1010.2188);
	    SetPlayerInterior(playerid,10);
	    SetPlayerFacingAngle(playerid,275.3671);
		}
		
	    if(spot[playerid] == SPOT_DEMEDICIMAINENTER) // main enter front!!
	    {
	    SetPlayerPos(playerid,1264.7218,-781.9965,1091.9063);
	    SetPlayerInterior(playerid,5);
	    SetPlayerFacingAngle(playerid,300.2990);
		}
		
  		if(spot[playerid] == SPOT_CLUB) // club enter !!
	    {
	    	if(playerinclub <= 40)
	    	{
		    SetPlayerPos(playerid,493.2806,-21.1408,1000.6797);
		    SetPlayerInterior(playerid,17);
		    SetPlayerFacingAngle(playerid,1.9034);
			playerinclub = playerinclub + 1;
			}
			else { SendClientMessage(playerid,COLOR_WHITE,"* The club is full right now, try again later"); }
		}
		
  		if(spot[playerid] == SPOT_DEMEDICIBACKENTER) // back enter , back!!
	    {
	    SetPlayerPos(playerid,1298.8462,-793.2491,1084.0078);
	    SetPlayerInterior(playerid,5);
	    SetPlayerFacingAngle(playerid,-160.8644);
		}

        if(IsPlayerInSphere(playerid,503.3813,-11.5668,1000.6797,2))
        {
   	    SetPlayerPos(playerid,1204.9340,6.9377,1000.9219);
	    SetPlayerInterior(playerid,2);
	    SetPlayerFacingAngle(playerid,7.5202);
	    }

		if(spot[playerid] == SPOT_GS_DILLIMORE) // General Store Dillimore Enter
		{
 		SetPlayerPos(playerid,-25.1320,-139.0662,1003.5469);
		SetPlayerInterior(playerid,16);
       	SetPlayerFacingAngle(playerid,0.0000);
       	int_b[playerid] = INTB_DILLIMORE;
		}

		if(spot[playerid] == SPOT_GS_MONTOGOMERY) // General Store Montogomery Enter
		{
	   	SetPlayerPos(playerid,-25.1320,-139.0662,1003.5469);
		SetPlayerInterior(playerid,16);
       	SetPlayerFacingAngle(playerid,0.0000);
       	int_b[playerid] = INTB_MONTOGOMERY;
		}

		if(spot[playerid] == SPOT_SCHOOL_CREEK) // Driving School Palomino Creek Enter
		{
			if(DMVdoor[playerid])
			{
	 		SetPlayerPos(playerid,1494.4301,1305.6300,1093.2891);
		   	SetPlayerInterior(playerid,3);
		   	SetPlayerFacingAngle(playerid,0.0000);
	       	int_b[playerid] = INTB_PALOMINO_DS;
	       	}
			else
			{
			GameTextForPlayer(playerid,"~r~DMV~w~ is close now",2000,3);
			}
		}
		
		if(spot[playerid] == SPOT_BAR) // Bar In Dillimore Enter
		{
		SetPlayerPos(playerid,-227.1428,1401.7853,27.7656);
		SetPlayerInterior(playerid,18);
	   	SetPlayerFacingAngle(playerid,320.8741);
	   	int_b[playerid] = INTB_DRINKBAR;
		}
		
		if(spot[playerid] == SPOT_RANGE_INS && PlayerInfo[playerid][pInstructor] == 1) // Range Enter #2 Enter
		{
		SetPlayerPos(playerid,307.1095,-57.4451,1001.5156);
		SetPlayerInterior(playerid,4);
		SetPlayerFacingAngle(playerid,270.3387);
		}

		if(spot[playerid] == SPOT_RANGE) // Range Enter #1 Enter
		{
		SetPlayerPos(playerid,301.7110,-72.6321,1001.5156);
	   	SetPlayerInterior(playerid,4);
	   	SetPlayerFacingAngle(playerid,0.2367);
		}
		
		if(IsPlayerInSphere(playerid,-179.7120,1133.1661,19.7422,2)) // Bank
		{
		SetPlayerPos(playerid,2306.1550,-16.1128,26.7496);
	   	SetPlayerInterior(playerid,0);
	   	SetPlayerFacingAngle(playerid,270.5058);
		}
		
		if(spot[playerid] == SPOT_JOB_BLUEBERRY) // Job Station Blue Berry Enter
		{
		SetPlayerPos(playerid,384.9390,173.9473,1008.3828);
		SetPlayerInterior(playerid,3);
		SetPlayerFacingAngle(playerid,88.7467);
		}
		
		if(spot[playerid] == SPOT_SCHOOL) // Driving School Blueberry Enter
		{
			if(DMVdoor[playerid])
			{
	       	SetPlayerPos(playerid,1494.4301,1305.6300,1093.2891);
	       	SetPlayerInterior(playerid,3);
	       	SetPlayerFacingAngle(playerid,0.0000);
	       	int_b[playerid] = INTB_BLUEBERRY_DS;
	       	}
			else
			{
			GameTextForPlayer(playerid,"~r~DMV~w~ is close now",2000,3);
			}
		}
		
		return 1;
	}
  	
	if(strcmp(cmd, "/exit", true) == 0)
	{
	    if(GetPlayerInterior(playerid) == 10 && IsPlayerInSphere(playerid,221.7648,118.1154,1010.2188,2))
	    {
	    SetPlayerPos(playerid,1373.3511,405.3483,19.9555);
	    SetPlayerInterior(playerid,0);
	    SetPlayerFacingAngle(playerid,245.4217);
		}
		
		if(IsPlayerInSphere(playerid,1204.7139,6.2501,1000.9219,2))
		{
  		SetPlayerPos(playerid,501.8602,-11.6700,1000.6797);
	    SetPlayerInterior(playerid,17);
	    SetPlayerFacingAngle(playerid,88.8193);
		}
		
  		if(GetPlayerInterior(playerid) == 5 && IsPlayerInSphere(playerid,1264.7218,-781.9965,1091.9063,4)) // inside front
	    {
	    SetPlayerPos(playerid,2106.3577,-101.7386,2.0264);
	    SetPlayerInterior(playerid,0);
	    SetPlayerFacingAngle(playerid,-112.7461);
		}

  		if(GetPlayerInterior(playerid) == 5 && IsPlayerInSphere(playerid,1298.8462,-793.2491,1084.0078,4)) // inside back
	    {
	    SetPlayerPos(playerid,2087.6042,-115.4289,1.8195);
	    SetPlayerInterior(playerid,0);
	    SetPlayerFacingAngle(playerid,127.4963);
		}
		
		if(GetPlayerInterior(playerid) == 17 && IsPlayerInSphere(playerid,493.2806,-21.1408,1000.6797,4)) // club exit
	    {
	    SetPlayerPos(playerid,814.4175,-563.9013,16.3359);
	    SetPlayerInterior(playerid,0);
	    SetPlayerFacingAngle(playerid,270.7226);
	    playerinclub = playerinclub - 1;
		}
		
		if(int_b[playerid] == INTB_DILLIMORE && GetPlayerInterior(playerid) == 16) // General Store Dillimore Exit
		{
       	SetPlayerPos(playerid,690.0602,-546.5984,16.3359);
		SetPlayerInterior(playerid,0);
	   	SetPlayerFacingAngle(playerid,91.9041);
  		int_b[playerid] = INTB_NONE;
		}
		
		if(int_b[playerid] == INTB_MONTOGOMERY && GetPlayerInterior(playerid) == 16) // General Store Montogomery Exit
		{
 		SetPlayerPos(playerid,1373.3932,298.4515,19.5547);
		SetPlayerInterior(playerid,0);
       	SetPlayerFacingAngle(playerid,158.2943);
      	int_b[playerid] = INTB_NONE;
		}
		
		if(GetPlayerInterior(playerid) == 3 && int_b[playerid] == INTB_PALOMINO_DS) // Palomino School Exit
		{
  		SetPlayerPos(playerid,2271.9976,84.0562,26.4844);
  		SetPlayerInterior(playerid,0);
  		SetPlayerFacingAngle(playerid,5.0401);
  		int_b[playerid] = INTB_NONE;
		}
		
	 	if(int_b[playerid] == INTB_DRINKBAR && GetPlayerInterior(playerid) == 18) // Bar In Dillimore Exit
		{
		SetPlayerPos(playerid,681.2631,-476.2038,16.3359);
		SetPlayerInterior(playerid,0);
		SetPlayerFacingAngle(playerid,172.4943);
	 	int_b[playerid] = INTB_NONE;
		}
		
		if(spot[playerid] == SPOT_RANGE_EXIT) // Range Exit #1
		{
		SetPlayerPos(playerid,299.8651,-78.4099,1001.5156);
		SetPlayerInterior(playerid,4);
		SetPlayerFacingAngle(playerid,103.0111);
		}
		
		if(spot[playerid] == SPOT_RANGE_EINS && PlayerInfo[playerid][pInstructor] == 1) // Range Exit #2
		{
		SetPlayerPos(playerid,300.3107,-57.4790,1001.5156);
		SetPlayerInterior(playerid,4);
		SetPlayerFacingAngle(playerid,90.7675);
		}
		
		if(IsPlayerInSphere(playerid,2305.4153,-16.1192,26.7496,3)) // Range Exit #2
		{
		SetPlayerPos(playerid,-181.2621,1133.3417,19.7422);
		SetPlayerInterior(playerid,0);
		SetPlayerFacingAngle(playerid,91.4458);
		}
		
		if(IsPlayerInSphere(playerid,390.2871,172.3881,1008.3828,5)) // Job Station
		{
		SetPlayerPos(playerid,207.7392,-64.7814,1.5781);
		SetPlayerInterior(playerid,0);
		SetPlayerFacingAngle(playerid,182.4343);
		}

		if(GetPlayerInterior(playerid) == 3 && int_b[playerid] == INTB_BLUEBERRY_DS) // BlueBerry School Exit
		{
		SetPlayerPos(playerid,218.2562,14.0812,2.5781);
		SetPlayerInterior(playerid,0);
		SetPlayerFacingAngle(playerid,270.9083);
        int_b[playerid] = INTB_NONE;
		}
		
		if(IsPlayerInAnyVehicle(playerid) && !engine[playerid])
		{
		TogglePlayerControllable(playerid,1);
		RemovePlayerFromVehicle(playerid);
		}
		
		return 1;
	}
	
	if(strcmp(cmd, "/engine", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
	     	if(!IsPlayerInAnyVehicle(playerid))
	      	{
	      	SendClientMessage(playerid,COLOR_GREY,"* Your not in vehicle");
	      	return 1;
	      	}
			new x_nr[256];
			x_nr = strtok(cmdtext, idx);
			GetPlayerName(playerid, sendername, sizeof(sendername));
			if(!strlen(x_nr))
			{
				SendClientMessage(playerid, COLOR_WHITE, "USAGE: /engine [name]");
		  		SendClientMessage(playerid, COLOR_GREY, "Available names: on, off");
				return 1;
			}
			if(strcmp(x_nr,"on",true) == 0)
			{
			    if(!IsABikeCar(vid))
			    {
			        if(!engine[playerid])
			        {
					TogglePlayerControllable(playerid,1);
					SendClientMessage(playerid,COLOR_ENGINE,"* In order to turn engine on type /engine off");
					format(string, sizeof(string), "* %s enter the key and turns on the engine", sendername);
					ProxDetector(15.0, playerid, string, COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM);
					engine[playerid]=true;
					}
					else { SendClientMessage(playerid,COLOR_GREY,"* Engine already on!"); }
				}
				else { SendClientMessage(playerid,COLOR_GREY,"* This vehilce dont have engine!"); }
			}
			if(strcmp(x_nr,"off",true) == 0)
			{
			    if(engine[playerid])
			    {
				TogglePlayerControllable(playerid,0);
				format(string, sizeof(string), "* %s enter the key and turns off the engine", sendername);
				ProxDetector(15.0, playerid, string, COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM);
				engine[playerid]=false;
				}
			}
		}
		return 1;
	}
  	
//-------------------------------[Server Help]--------------------------------------------------------------------------


	if(strcmp(cmd, "/ServerInfo", true) == 0)
	{
 	SendClientMessage(playerid,COLOR_WHITE,"-");
  	SendClientMessage(playerid,COLOR_WHITE,"the mode called RP Countryside and it's attaching between small towns.");
   	SendClientMessage(playerid,COLOR_WHITE,"this mode played in the next towns: Blueberry, Dillimore, Montogomery, Palomino Creek.");
   	SendClientMessage(playerid,COLOR_WHITE,"in this mode you'll manage a real person life and will do the same thing as life today.");
    SendClientMessage(playerid,COLOR_WHITE,"this mode include things from the real life themself , example:");
    SendClientMessage(playerid,COLOR_WHITE,"illegal street racing, variety jobs and activities, police ,vehicle license ,ect.");
    SendClientMessage(playerid,COLOR_WHITE,"so we hope you'll enjoy while your playing in here!! www.Gta.vGames.co.il");
    SendClientMessage(playerid,COLOR_WHITE,"-");
    return 1;
    }

	if(strcmp(cmd, "/Rules", true) == 0)
	{
	SendClientMessage(playerid, COLOR_GREY,"_____ vGames Countryside RP Rules _____");
 	SendClientMessage(playerid, COLOR_WHITE,"kickable offences: spamming chat, spawn killing, constant flaming, bug abuse & db abuse");
	SendClientMessage(playerid, COLOR_WHITE,"bannable offences: cheating, constant spamming, impostering admins/cops & ignoring rules,name");
	SendClientMessage(playerid, COLOR_WHITE,"jailable offences: ignoring server police, police caught you after crime/murder/killing ect");
	SendClientMessage(playerid, COLOR_WHITE,"wanted level rise: doing crims +1, killing someone after couple times, enter private cars +2");
	SendClientMessage(playerid, COLOR_WHITE,"other Things: There are other things admins may do to you, jail, freeze, slap etc.");
	return 1;
	}

 	if(strcmp(cmd, "/Jobhelp", true) == 0)
	{
		if(PlayerInfo[playerid][pJob] == 10)
    	{
	    	SendClientMessage(playerid,COLOR_GREY,"** ------ Commands/Job Instruction ------");
    		SendClientMessage(playerid,COLOR_GREY,"** You are working as a bus driver you can use the next commands");
    		SendClientMessage(playerid,COLOR_GREY,"** /fare /duty /buspick");
    	}
		else if(PlayerInfo[playerid][pJob] == 9)
    	{
	    	SendClientMessage(playerid,COLOR_GREY,"** ------ Commands/Job Instruction ------");
    		SendClientMessage(playerid,COLOR_GREY,"** You are working as a car mechanic you can use the next commands");
    		SendClientMessage(playerid,COLOR_GREY,"** /repair /refill /modcar");
    	}
		else if(PlayerInfo[playerid][pJob] == 8)
    	{
	    	SendClientMessage(playerid,COLOR_GREY,"** ------ Commands/Job Instruction ------");
    		SendClientMessage(playerid,COLOR_GREY,"** go to Fort Carson Warehouse and buy materials, then go to");
    		SendClientMessage(playerid,COLOR_GREY,"** the warehouse in Palomino Creek and drop it(behind ammunation store)");
 			format(string, sizeof(string), "** You got [%d] materials",PlayerInfo[playerid][pMaterials]);
			SendClientMessage(playerid,COLOR_GREY,string);
 			format(string, sizeof(string), "** You are arms dealer level [%d]",PlayerInfo[playerid][pArmsDealerSkill]);
			SendClientMessage(playerid,COLOR_GREY,string);
    	}
		else if(PlayerInfo[playerid][pJob] == 7)
    	{
	    	SendClientMessage(playerid,COLOR_GREY,"** ------ Commands/Job Instruction ------");
    		SendClientMessage(playerid,COLOR_GREY,"** when your in the icecream vehicle use the selling command (/help)");
    		SendClientMessage(playerid,COLOR_GREY,"** 1. /sell icecream [playerid] [price]");
		 	format(string, sizeof(string), "** You got [%d] icecreams in your vehicle freezer",icecreamunit[playerid]);
			SendClientMessage(playerid,COLOR_GREY,string);

    	}
		else if(PlayerInfo[playerid][pJob] == 4)
    	{
	    	SendClientMessage(playerid,COLOR_GREY,"** ------ Commands/Job Instruction ------");
    		SendClientMessage(playerid,COLOR_GREY,"** fist of all get into the pizza bike, then you can choose between two missions");
    		SendClientMessage(playerid,COLOR_GREY,"** 1. deliver pizza by a track and deliver pizza to an empty houses /deliverp");
    		SendClientMessage(playerid,COLOR_GREY,"** 2. selling pizza to a real people in the game by typing - /sell pizza");

    	}
		else if(PlayerInfo[playerid][pJob] == 5 || PlayerInfo[playerid][pJob] == 6)
		{
			SendClientMessage(playerid,COLOR_GREY,"** ------ Commands/Job Instruction ------");
 			SendClientMessage(playerid,COLOR_GREY,"** your working as a farmer, after you have been entered to the combine");
   			SendClientMessage(playerid,COLOR_GREY,"** enter with the combine to the first checkpoint you'll see, in this job you'll");
     		SendClientMessage(playerid,COLOR_GREY,"** have chechkpoints that you'll have to pass, finish the half hour contract,");
      		SendClientMessage(playerid,COLOR_GREY,"** get above 500 checkpoints plow under 5 hour, and you'll get a bonus.");
      		if(PlayerInfo[playerid][pJob] == 5)
      		{
		 	format(string, sizeof(string), "** You have plowed [%d] field points",vf_check[playerid]);
			SendClientMessage(playerid,COLOR_GREY,string);
			}
			else if(PlayerInfo[playerid][pJob] == 6)
			{
		 	format(string, sizeof(string), "** You have plowed [%d] field points",vf1_check[playerid]);
			SendClientMessage(playerid,COLOR_GREY,string);
			}
      		
    	}
		else if(PlayerInfo[playerid][pJob] == 3)
		{
   			SendClientMessage(playerid,COLOR_GREY,"** ------ Commands/Job Instruction ------");
    		SendClientMessage(playerid,COLOR_GREY,"** your working as a trucker, after you have been entered to the truck");
     		SendClientMessage(playerid,COLOR_GREY,"** the first checkpoint will be shows, you'll have to keep the trailer attached");
      		SendClientMessage(playerid,COLOR_GREY,"** without letting it to deattach, case the trailer will be deattached you'll lose.");
       		SendClientMessage(playerid,COLOR_GREY,"** this mission, and you'll have to go back to the start and start the deliver again");
        	SendClientMessage(playerid,COLOR_GREY,"** case you done the mission and got to the dropoff area use this command:");
        	SendClientMessage(playerid,COLOR_GREY,"** /drop trailer, this command will drop the trailer capacity, then start the mission");
        	SendClientMessage(playerid,COLOR_GREY,"** again, you'll get more money in the paycheck for each trailer you deliver.");
   		}
		else if(PlayerInfo[playerid][pJob] == 2)
		{
   			SendClientMessage(playerid,COLOR_GREY,"** ------ Commands/Job Instruction ------");
    		SendClientMessage(playerid,COLOR_GREY,"** your working as a paramedic, after you have find an ambulance and entered it");
     		SendClientMessage(playerid,COLOR_GREY,"** you'll just have to wait for people that request a medic attention,");
      		SendClientMessage(playerid,COLOR_GREY,"** case someone request your help, get out from the ambulance, stand near to him");
       		SendClientMessage(playerid,COLOR_GREY,"** and use the next command: /heal [playerid] [price]");
   		}
		else if(PlayerInfo[playerid][pJob] == 1)
		{
   			SendClientMessage(playerid,COLOR_GREY,"** ------ Commands/Job Instruction ------");
    		SendClientMessage(playerid,COLOR_GREY,"** your working as a barman, this is a very simple job; all you'll have to do");
     		SendClientMessage(playerid,COLOR_GREY,"** is just standing in the bar area and wait for client's to buy from you.");
         	SendClientMessage(playerid,COLOR_GREY,"** for every 10 drinks you'll sell you'll get 40$");
         	SendClientMessage(playerid,COLOR_GREY,"** in order to sell drink type /sell drink [playerid] [price].");
		 	format(string, sizeof(string), "** You sold [%d] drinks until now",DrinkSold[playerid]);
			SendClientMessage(playerid,COLOR_GREY,string);
         	
   		}
	 	else
		{
		SendClientMessage(playerid,COLOR_WHITE,"this command uses for working players only.");
		}
		return 1;
	}

	if(strcmp(cmd, "/help", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
		    SendClientMessage(playerid, COLOR_GREY,"Account: /login /rules /help /serverhelp /buylevel /p-online");
			SendClientMessage(playerid, COLOR_GREY,"General: /pay /accpet /deny /use /skill /admins /time /lay /sit /stopanim /report /buy");
			SendClientMessage(playerid, COLOR_GREY,"General: /call (/p)ickup (/h)angup /number /service /eject /licenses /showlicenses /garage /tie");
			SendClientMessage(playerid, COLOR_GREY,"General: /chain /fuel /fill /stats /id");
			SendClientMessage(playerid, COLOR_GREY,"BankStt: /bank /withdraw /balance");
	  		SendClientMessage(playerid, COLOR_GREY,"ChatCmd: (/w)hisper (/s)hout (/b) /me (/ad)vertise (/o)oc /togooc");
	  		if(PlayerInfo[playerid][pFMember] >= 1) { SendClientMessage(playerid,COLOR_GREY,"Familey Member: (/f)chat /tie /chain"); }
	  		if(PlayerInfo[playerid][pFLeader] >= 1) { SendClientMessage(playerid,COLOR_GREY,"Familey Leader: /invite /uninvite /rank"); }
     		if(PlayerInfo[playerid][pJob] == 1) {SendClientMessage(playerid,COLOR_GREY,"Job: /sell drink /Jobhelp"); }
		    else if(PlayerInfo[playerid][pJob] == 2) {SendClientMessage(playerid,COLOR_GREY,"Job: /heal /sell painkiller /take painkiller /Jobhelp"); }
		    else if(PlayerInfo[playerid][pJob] == 3) {SendClientMessage(playerid,COLOR_GREY,"Job: /gas /Jobhelp"); }
		    else if(PlayerInfo[playerid][pJob] == 4) {SendClientMessage(playerid,COLOR_GREY,"Job: /sell pizza /deliverp /Jobhelp /take pizza"); }
		    else if(PlayerInfo[playerid][pJob] == 5) {SendClientMessage(playerid,COLOR_GREY,"Job: /Jobhelp"); }
		    else if(PlayerInfo[playerid][pJob] == 6) {SendClientMessage(playerid,COLOR_GREY,"Job: /Jobhelp"); }
		    else if(PlayerInfo[playerid][pJob] == 7) {SendClientMessage(playerid,COLOR_GREY,"Job: /sell icecream /take icecream"); }
		    else if(PlayerInfo[playerid][pJob] == 8) {SendClientMessage(playerid,COLOR_GREY,"Job: /sell gun /materials"); }
		    else if(PlayerInfo[playerid][pJob] == 9) {SendClientMessage(playerid,COLOR_GREY,"Job: /repair /refill /modcar /take"); }
		    else if(PlayerInfo[playerid][pJob] == 10) {SendClientMessage(playerid,COLOR_GREY,"Job: /duty /fare /buspick"); }
    		if(PlayerInfo[playerid][pPolice] >= 1) { SendClientMessage(playerid,COLOR_GREY,"Police: /Cuff /Shock (/m)egaphone /setwanted (/r)adio (/cr) /frisk /ticket /take /drag"); }
			if(PlayerInfo[playerid][pPolice] >= 3) { SendClientMessage(playerid,COLOR_GREY,"Chief: /recruit /fire (/gov)ernment"); }
			if (PlayerInfo[playerid][pAci] >= 1)
			{
				SendClientMessage(playerid, COLOR_GREY, "ACI: (/ep)hone) /Cuff /Shock");
			}
			if (PlayerInfo[playerid][pInstructor] >= 1)
			{
				SendClientMessage(playerid, COLOR_GREY, "Instructor: (/gl)/givelicense (/lq)uestion /lqanswers /take /dmv");
			}
			if (PlayerInfo[playerid][pAdmin] >= 1) { SendClientMessage(playerid, COLOR_GREY, "Admin: /ac(adminc) (/ah)elp"); }
		}
		return 1;
	}
	
	if(strcmp(cmd, "/mycar", true) == 0)
	{
	   	new x_job[256];
		x_job = strtok(cmdtext, idx);
	    if(IsPlayerConnected(playerid))
	    {
			if(PlayerInfo[playerid][pAdmin] >= 100)
			{
			SendClientMessage(playerid,COLOR_WHITE,"|____ My Car Commands ____|");
			SendClientMessage(playerid,COLOR_WHITE,"/findcar /cmp");
      		if(strcmp(x_job,"cmp",true) == 0)
      		{
				if(GetVehicleModel(vid) == 562)
				{
					AddVehicleComponent(vid,1171);
					AddVehicleComponent(vid,1034);
					AddVehicleComponent(vid,1035);
					AddVehicleComponent(vid,1040);
					AddVehicleComponent(vid,1041);
					AddVehicleComponent(vid,1147);
					AddVehicleComponent(vid,1148);
					AddVehicleComponent(vid,1087);
					AddVehicleComponent(vid,1073);
				}
				else if(GetVehicleModel(vid) == 560)
				{
					AddVehicleComponent(vid,1028);
					AddVehicleComponent(vid,1030);
					AddVehicleComponent(vid,1031);
					AddVehicleComponent(vid,1032);
					AddVehicleComponent(vid,1140);
					AddVehicleComponent(vid,1139);
					AddVehicleComponent(vid,1085);
				}
			}
   			}
		}
		return 1;
	}


	if(strcmp(cmd, "/ahelp", true) == 0 || strcmp(cmd, "/ah", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			if (PlayerInfo[playerid][pAdmin] >= 1) { SendClientMessage(playerid, COLOR_GREY, "Admin(1): /ac(adminc) /freeze /unfreeze /kick /slap /logoutp /setooc /viewstats /warn"); }
		 	if (PlayerInfo[playerid][pAdmin] >= 2) { SendClientMessage(playerid, COLOR_GREY, "Admin(2): /goto /get /sethp /setarmor /pkill /logoutall /pkill"); }
		 	if (PlayerInfo[playerid][pAdmin] >= 3) { SendClientMessage(playerid, COLOR_GREY, "Admin(3): /ban /gototown /setmoney (/afr)eeze /unafreeze"); }
		 	if (PlayerInfo[playerid][pAdmin] >= 100) { SendClientMessage(playerid, COLOR_GREY, "Admin(100): /setadmin /respawncars /setpm"); }
		}
		return 1;
	}

	if(strcmp(cmd, "/Gate", true) == 0)
	{
		new x_job[256];
		x_job = strtok(cmdtext, idx);
  		if(strcmp(x_job,"open",true) == 0)
		{
			if(IsPlayerInSphere(playerid,2174.195068, -5.889108, 16.803985,8))
			{
			    if(PlayerInfo[playerid][pFMember] >= 1)
			    {
				MoveObject(24, 2175.021972, -3.451509, 17.212814,5);
				}
			}

			else if(IsPlayerInSphere(playerid,-73.0664,-517.8399,5.1259,8))
			{
				MoveObject(35, -80.168464, -518.341857, 3.196054,5);
			}
			
			else if(IsPlayerInSphere(playerid,636.135864, -594.139709, 16.935939,8))
			{
			    if(PlayerInfo[playerid][pPolice] >= 1 || PlayerInfo[playerid][pAdmin] >= 100)
			    {
				MoveObject(51, 636.135864, -600.539709, 16.935939,2);
				}
			}

			else if(IsPlayerInSphere(playerid,635.3444,-572.9947,16.3359,3))
			{
			    if(PlayerInfo[playerid][pPolice] >= 1 || PlayerInfo[playerid][pAdmin] >= 100)
			    {
			    MoveObject(72, 636.089538, -572.138916, 10.187503,2);
				}
			}
			
			else if(IsPlayerInCircle(playerid,241.4648,75.7753,3))
			{
			MoveObject(playerid, 241.467864, 75.945625, 1006.929077,2);
			}
		}
  		else if(strcmp(x_job,"close",true) == 0)
		{
			if(IsPlayerInSphere(playerid,2174.195068, -5.889108, 16.803985,8))
			{
				if(PlayerInfo[playerid][pFMember] >= 1)
				{
					MoveObject(24,2175.021972, -3.451509, 18.212814,5);
				}
			}

			else if(IsPlayerInSphere(playerid,-73.0664,-517.8399,5.1259,8))
			{
   			MoveObject(35,-80.168464, -518.341857, 4.196054,5);
			}

			else if(IsPlayerInSphere(playerid,636.135864, -594.139709, 16.935939,8))
			{
			    if(PlayerInfo[playerid][pPolice] >= 1 || PlayerInfo[playerid][pAdmin] >= 100)
			    {
				MoveObject(51, 636.135864, -594.139709, 16.935939,2);
				}
			}
			
			else if(IsPlayerInSphere(playerid,635.3444,-572.9947,16.3359,3))
			{
			    if(PlayerInfo[playerid][pPolice] >= 1 || PlayerInfo[playerid][pAdmin] >= 100)
			    {
				MoveObject(72, 636.089538, -572.138916, 15.987503,2);
				}
			}

			else if(IsPlayerInCircle(playerid,241.4648,75.7753,3))
			{
			MoveObject(1,241.467864, 75.945625, 1004.929077,2);
			}
		}
		return 1;
	}
	
	if(strcmp(cmd,"/licenses",true)==0)
    {
        if(IsPlayerConnected(playerid))
	    {
	        new text1[20];
	        new text2[20];
	        new text3[20];
	        if(PlayerInfo[playerid][pCarLic]) { text1 = "Passed"; } else { text1 = "Not Passed"; }
	        if(PlayerInfo[playerid][pGunLic]) { text2 = "Passed"; } else { text2 = "Not Passed"; }
	        if(PlayerInfo[playerid][pSailLic]) { text3 = "Passed"; } else { text3 = "Not Passed"; }
	        SendClientMessage(playerid, COLOR_WHITE, "License Registeration");
	        format(string, sizeof(string), "* Drivers License: %s.", text1);
			SendClientMessage(playerid, COLOR_GREY, string);
			format(string, sizeof(string), "* Weapon License: %s.", text2);
			SendClientMessage(playerid, COLOR_GREY, string);
			format(string, sizeof(string), "* Sailing License: %s.", text3);
			SendClientMessage(playerid, COLOR_GREY, string);
		}
	    return 1;
 	}

 	if(strcmp(cmd,"/showlicenses",true)==0 || strcmp(cmd,"/sl",true)==0)
    {
        if(IsPlayerConnected(playerid))
	    {
	        tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_WHITE, "USAGE: /showlicenses [playerid]");
				return 1;
			}
			giveplayerid = strval(tmp);
			if(IsPlayerConnected(giveplayerid))
			{
				if(giveplayerid != INVALID_PLAYER_ID)
				{
				    if (ProxDetectorS(6.0, playerid, giveplayerid))
					{
					    if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "You cannot show you licensees to Yourself!!"); return 1; }
					    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
						GetPlayerName(playerid, sendername, sizeof(sendername));
					    new text1[20];
				        new text2[20];
				        new text3[20];
						if(PlayerInfo[playerid][pCarLic]) { text1 = "Passed"; } else { text1 = "Not Passed"; }
				        if(PlayerInfo[playerid][pGunLic]) { text2 = "Passed"; } else { text2 = "Not Passed"; }
						if(PlayerInfo[playerid][pSailLic]) { text3 = "Passed"; } else { text3 = "Not Passed"; }
				        format(string, sizeof(string), "* Driving License: %s.", text1);
						SendClientMessage(giveplayerid, COLOR_GREY, string);
						format(string, sizeof(string), "* Weapon License: %s.", text2);
						SendClientMessage(giveplayerid, COLOR_GREY, string);
						format(string, sizeof(string), "* Sailing License: %s.", text3);
						SendClientMessage(giveplayerid, COLOR_GREY, string);
						format(string, sizeof(string), "* %s has shown his Licenses to you.", sendername);
						SendClientMessage(giveplayerid, COLOR_SYSTEM, string);
						format(string, sizeof(string), "* You have shown your Licenses to %s.", giveplayer);
						SendClientMessage(playerid, COLOR_SYSTEM, string);
						if(IsPlayerInAnyVehicle(playerid)) { ApplyAnimation(playerid,"PED","Driveby_L",4.0,0,1,1,0,0); }
					}
					else
					{
					    SendClientMessage(playerid, COLOR_GREY, "* That player is not near You!!");
					    return 1;
					}
				}
			}
	        else
	        {
	            SendClientMessage(playerid, COLOR_GREY, "* That player is offline this Time!!");
	            return 1;
	        }
		}
	    return 1;
 	}

// -------------------------------------[ Crime Familey ] -------------------------------------------------------------------------------

	if(strcmp(cmd, "/Fchat", true) == 0 || strcmp(cmd, "/f", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
  			if(PlayerInfo[playerid][pFMember] >= 1)
			{
				new ranktext[256];
    			if(PlayerInfo[playerid][pFMember] >= 1)
				{
 					if(PlayerInfo[playerid][pFMember] == 1) { ranktext = "Boss"; }
				    else if(PlayerInfo[playerid][pFMember] == 2) { ranktext = "Under Boss"; }
			        else if(PlayerInfo[playerid][pFMember] == 3) { ranktext = "Capo"; }
			        else if(PlayerInfo[playerid][pFMember] == 4) { ranktext = "Soldier"; }
			        else if(PlayerInfo[playerid][pFMember] == 5) { ranktext = "Associate"; }
			        else if(PlayerInfo[playerid][pFMember] == 6) { ranktext = "Outsider"; }
				}
				GetPlayerName(playerid, sendername, sizeof(sendername));
				new length = strlen(cmdtext);
				while ((idx < length) && (cmdtext[idx] <= ' '))
				{
					idx++;
				}
				new offset = idx;
				new result[64];
				while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
				{
					result[idx - offset] = cmdtext[idx];
					idx++;
				}
				result[idx - offset] = EOS;
				if(!strlen(result))
				{
					SendClientMessage(playerid, COLOR_WHITE, "USAGE: (/f)hat [familey chat]");
					return 1;
				}
				format(string, sizeof(string), "%s %s: %s", ranktext, sendername, result);
				if (PlayerInfo[playerid][pFMember] >= 1)
				{
					SendFMemberMessage(COLOR_LIGHTBLUE, string);
				}
				printf("Fam Chat %s[%s]: %s", sendername, ranktext, result);
			}
		}
		return 1;
	}

	if(strcmp(cmd, "/invite", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
  			if(PlayerInfo[playerid][pFLeader] >= 1 || PlayerInfo[playerid][pFMember] == 2)
			{
				tmp = strtok(cmdtext, idx);
				if(!strlen(tmp))
				{
					SendClientMessage(playerid, COLOR_WHITE, "USAGE: /invite [playerid] [rank]");
					return 1;
				}
				new invited1;
				new ftext[20];
				invited1 = strval(tmp);
	   			if(IsPlayerConnected(invited1))
			    {
			        if(invited1 != INVALID_PLAYER_ID)
			        {
	      				if(PlayerInfo[playerid][pFLeader] == 1 || PlayerInfo[playerid][pFMember] == 2)
		  				{
					  	PlayerInfo[invited1][pFMember]=6;
					  	ftext = "De'Medici Familey";
					  	}
				       	else { return 1; }
						GetPlayerName(invited1, giveplayer, sizeof(giveplayer));
						GetPlayerName(playerid, sendername, sizeof(sendername));
						format(string, sizeof(string), "* You are now in %s, you were invited by Leader %s", ftext, sendername);
						SendClientMessage(invited1, COLOR_YELLOW, string);
						format(string, sizeof(string), "* You have Invited %s to join the %s.", giveplayer,ftext);
						SendClientMessage(playerid, COLOR_YELLOW, string);
						OnPlayerUpdate(invited1);
				    }
				}
				else { SendClientMessage(playerid, COLOR_GREY, "* you are not allowed to use that command!"); }
			}
			return 1;
		}
		return 1;
	}
	
	if(strcmp(cmd, "/rank", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_WHITE, "USAGE: /rank [playerid] [rank]");
				SendClientMessage(playerid, COLOR_GREY, "RANKS: (1)Boss, (2)UnderBoss, (3)Capo, (4)Solider, (5)Associate (6)Outsider");
				return 1;
			}
	        giveplayerid = strval(tmp);
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_WHITE, "USAGE: /rank [playerid] [rank]");
				SendClientMessage(playerid, COLOR_GREY, "RANKS: (1)Boss, (2)UnderBoss, (3)Capo, (4)Solider, (5)Associate (6)Outsider");
				return 1;
			}
			if(giveplayerid == playerid)
			{
				SendClientMessage(playerid, COLOR_WHITE, "* You cannot give rank to Yourself.");
				return 1;
			}
			moneys = strval(tmp);
			if(moneys < 1 || moneys > 6)
			{
			    SendClientMessage(playerid, COLOR_WHITE, "* Rank must be between 1 to 6.");
			    return 1;
			}
			if (IsPlayerConnected(giveplayerid))
			{
			    if(giveplayerid != INVALID_PLAYER_ID)
			    {
					if (PlayerInfo[playerid][pFLeader] == 1)
					{
	    			PlayerInfo[giveplayerid][pFMember] = moneys;
    				if(PlayerInfo[giveplayerid][pFMember] == 1) { SetPlayerSkin(giveplayerid,120); }
	  	    		else if(PlayerInfo[giveplayerid][pFMember] == 2) { SetPlayerSkin(giveplayerid,186); }
				  	else if(PlayerInfo[giveplayerid][pFMember] == 3) { SetPlayerSkin(giveplayerid,126); }
				  	else if(PlayerInfo[giveplayerid][pFMember] == 4) { SetPlayerSkin(giveplayerid,59); }
				  	else if(PlayerInfo[giveplayerid][pFMember] == 5) { SetPlayerSkin(giveplayerid,98); }
				  	OnPlayerUpdate(giveplayerid);
					}
				}//invalid id
			}
			else
			{
				format(string, sizeof(string), "* %d is not an active player.", giveplayerid);
				SendClientMessage(playerid, COLOR_GREY, string);
			}
		}
		return 1;
	}



	if(strcmp(cmd, "/uninvite", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_WHITE, "USAGE: /uninvite [playerid]");
				return 1;
			}
			new invited1;
			new ftext[20];
			invited1 = strval(tmp);
			if(PlayerInfo[playerid][pFLeader] >= 1)
			{
			    if(IsPlayerConnected(invited1))
			    {
			        if(invited1 != INVALID_PLAYER_ID)
			        {
						if(PlayerInfo[invited1][pFMember] >= 1)
						{
			            	if(PlayerInfo[playerid][pFLeader] == 1) { PlayerInfo[invited1][pFMember] = 0; ftext = "De'Medici Familey"; }
					        else { return 1; }
							GetPlayerName(invited1, giveplayer, sizeof(giveplayer));
							GetPlayerName(playerid, sendername, sizeof(sendername));
							format(string, sizeof(string), "* You have been kicked from %s, by Leader %s", ftext, sendername);
							SendClientMessage(invited1, COLOR_YELLOW, string);
							format(string, sizeof(string), "* You have kicked %s from the %s.", giveplayer,ftext);
							SendClientMessage(playerid, COLOR_YELLOW, string);
							OnPlayerUpdate(invited1);
			            }
			            else { SendClientMessage(playerid, COLOR_GREY, "* Player is isn't in any organization!"); }
			        }
			    }
			}
			else { SendClientMessage(playerid, COLOR_GREY, "* you are not allowed to use that command!"); }
		}
		return 1;
	}



//-------------------------------[Law Commands / Police / ACI]--------------------------------------------------------------------------


	if(strcmp(cmd, "/drag", true) == 0)
 	{
	    if(IsPlayerConnected(playerid))
	    {
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_WHITE, "USAGE: /drag [playerid]");
				return 1;
			}
			new playa = strval(tmp);
			if(playa == playerid)
			{
				SendClientMessage(playerid, COLOR_GREY, "* You cant drag yourself into a vehicle");
				return 1;
			}
			if(IsPlayerConnected(playa))
			{
				if (PlayerInfo[playerid][pPolice] >= 1)
				{
				    if(giveplayerid != INVALID_PLAYER_ID)
				    {
				    	if(PlayerCuffed[playa])
					    {
							PutPlayerInVehicle(playa, vid, 1);
						}
						else { SendClientMessage(playerid, COLOR_GREY, "* Player must be cuffed befor you can drag him"); return 1; }
					}
					else
					{
					format(string, sizeof(string), "* %d is not an active player.", giveplayerid);
					SendClientMessage(playerid, COLOR_GREY, string);
					}
				}
				else { SendClientMessage(playerid, COLOR_GREY, "* you are not allowed to use that command!"); }
			}
			else
			{
			SendClientMessage(playerid,COLOR_GREY,"* That player is offline!!");
			}
		}
		return 1;
	}

	if(strcmp(cmd, "/government", true) == 0 || strcmp(cmd, "/gov", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			if(PlayerInfo[playerid][pPolice] == 0)
			{
			    SendClientMessage(playerid, COLOR_GREY, "* You are not a Cop !");
			    return 1;
			}
			if(PlayerInfo[playerid][pPolice] <= 2)
			{
			    SendClientMessage(playerid, COLOR_GREY, "* You need to be Chief in order to use this command.6");
			    return 1;
			}
			GetPlayerName(playerid, sendername, sizeof(sendername));
			new length = strlen(cmdtext);
			while ((idx < length) && (cmdtext[idx] <= ' '))
			{
				idx++;
			}
			new offset = idx;
			new result[64];
			while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
			{
				result[idx - offset] = cmdtext[idx];
				idx++;
			}
			result[idx - offset] = EOS;
			if(!strlen(result))
			{
				SendClientMessage(playerid, COLOR_WHITE, "USAGE: (/gov)ernment [text]");
				return 1;
			}
			SendClientMessageToAll(COLOR_MEDBLUE, "Government Announcement:");
			format(string, sizeof(string), "- %s", result);
			SendClientMessageToAll(COLOR_WHITE, string);

		}
		return 1;
	}

	if(strcmp(cmd, "/ticket", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
	        if(PlayerInfo[playerid][pPolice] == 0)
			{
			    SendClientMessage(playerid, COLOR_GREY, "* You are not a Cop!");
			    return 1;
			}
	        if(OnDuty[playerid] != 1)
			{
			    SendClientMessage(playerid, COLOR_GREY, "* You are not on Duty!");
			    return 1;
			}
	    	tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_WHITE, "USAGE: /ticket [playerid] [price] [reason]");
				return 1;
			}
			giveplayerid = strval(tmp);
            tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_WHITE, "USAGE: /ticket [playerid] [price] [reason]");
				return 1;
			}
	        if(playerid == giveplayerid)
			{
			    SendClientMessage(playerid, COLOR_GREY, "* You can't give a ticket to yourself!");
			    return 1;
			}
			moneys = strval(tmp);
			if(moneys < 1 || moneys > 10000) { SendClientMessage(playerid, COLOR_GREY, "* Ticket Money can't be below 1 or higher then 10000!"); return 1; }
			if(IsPlayerConnected(giveplayerid))
			{
			    if(giveplayerid != INVALID_PLAYER_ID)
			    {
			        if (ProxDetectorS(6.0, playerid, giveplayerid))
					{
					    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
						GetPlayerName(playerid, sendername, sizeof(sendername));
						new length = strlen(cmdtext);
						while ((idx < length) && (cmdtext[idx] <= ' '))
						{
							idx++;
						}
						new offset = idx;
						new result[64];
						while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
						{
							result[idx - offset] = cmdtext[idx];
							idx++;
						}
						result[idx - offset] = EOS;
						if(!strlen(result))
						{
							SendClientMessage(playerid, COLOR_WHITE, "USAGE: /ticket [playerid] [price] [reason]");
							return 1;
						}
						format(string, sizeof(string), "* You gave %s a Ticket (price:$%d) reason: %s", giveplayer, moneys, (result));
						SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
						format(string, sizeof(string), "* %s has given you a ticket. (price:$%d) reason: %s", sendername, moneys, (result));
						SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
						SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, "* Type /accept ticket, to accept the ticket.");
						TicketOffer[giveplayerid] = playerid;
						TicketMoney[giveplayerid] = moneys;
						return 1;
					}
					else
					{
						SendClientMessage(playerid, COLOR_GREY, "   That player is not near you !");
						return 1;
					}
				}
			}
			else
			{
			    SendClientMessage(playerid, COLOR_GREY, "   That player is Offline !");
			    return 1;
			}
		}
		return 1;
	}

 	if(strcmp(cmd,"/frisk",true)==0)
    {
        if(IsPlayerConnected(playerid))
	    {
	        tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_WHITE, "USAGE: /frisk [playerid]");
				return 1;
			}
			if(PlayerInfo[playerid][pPolice] >= 1)
			{
				giveplayerid = strval(tmp);
				if(IsPlayerConnected(giveplayerid))
				{
					if(giveplayerid != INVALID_PLAYER_ID)
					{
					    if (ProxDetectorS(3.0, playerid, giveplayerid))
						{
						    if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "You cannot Frisk yourself!"); return 1; }
						    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
							GetPlayerName(playerid, sendername, sizeof(sendername));
						    new text1[20], text2[20];
						    if(PlayerInfo[giveplayerid][pPainKillers] > 0) { text1 = "(*) Painkillers:"; } else { text1 = "(*) Empty Pocket."; }
						    if(PlayerInfo[giveplayerid][pMaterials] > 0) { text2 = "(*) Materials:"; } else { text2 = "(*) Empty Pocket."; }
						    format(string, sizeof(string), "%s body search result:", giveplayer);
					        SendClientMessage(playerid, COLOR_WHITE, string);
					        format(string, sizeof(string),"%s %d.", text1,PlayerInfo[giveplayerid][pPainKillers]);
							SendClientMessage(playerid, COLOR_GREY, string);
							format(string, sizeof(string), "%s %d", text2,PlayerInfo[giveplayerid][pMaterials]);
							SendClientMessage(playerid, COLOR_GREY, string);
							format(string, sizeof(string), "* Officer %s frisks %s for any illegal items.", sendername ,giveplayer);
							ProxDetector(30.0, playerid, string, COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM);
						}
						else
						{
						    SendClientMessage(playerid, COLOR_GREY, "* That player is not near you !");
						    return 1;
						}
					}
				}
		        else
		        {
		            SendClientMessage(playerid, COLOR_GREY, "* That player is Offline !");
		            return 1;
		        }
			}
		}
	    return 1;
 	}


	if(strcmp(cmd, "/fire", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_WHITE, "USAGE: /fire [playerid]");
				return 1;
			}
			new invited1;
			new ftext[20];
			invited1 = strval(tmp);
			if(PlayerInfo[playerid][pPolice] >= 3 || PlayerInfo[playerid][pAci] >= 2)
			{
			    if(IsPlayerConnected(invited1))
			    {
			        if(invited1 != INVALID_PLAYER_ID)
			        {
						if(PlayerInfo[invited1][pPolice] >= 1 || PlayerInfo[invited1][pAci] >= 1)
						{
			            	if(PlayerInfo[playerid][pPolice] >= 2) { PlayerInfo[invited1][pPolice] = 0; ftext = "Police Force"; }
					        else if(PlayerInfo[playerid][pAci] >= 2) { PlayerInfo[invited1][pAci] = 0; ftext = "Aci Organization"; }
					        else { return 1; }
							GetPlayerName(invited1, giveplayer, sizeof(giveplayer));
							GetPlayerName(playerid, sendername, sizeof(sendername));
							format(string, sizeof(string), "* You have been fired from %s, by Leader %s", ftext, sendername);
							SendClientMessage(invited1, COLOR_YELLOW, string);
							format(string, sizeof(string), "* You have fired %s from the %s.", giveplayer,ftext);
							SendClientMessage(playerid, COLOR_YELLOW, string);
							OnPlayerUpdate(invited1);
			            }
			            else { SendClientMessage(playerid, COLOR_GREY, "* Player is already in some organization!"); }
			        }
			    }
			}
			else { SendClientMessage(playerid, COLOR_GREY, "* you are not allowed to use that command!"); }
		}
		return 1;
	}

	if(strcmp(cmd, "/recruit", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_WHITE, "USAGE: /recruit [playerid]");
				return 1;
			}
			new invited1;
			new ftext[20];
			invited1 = strval(tmp);
			if(PlayerInfo[playerid][pPolice] >= 3 || PlayerInfo[playerid][pAci] >= 2)
			{
			    if(IsPlayerConnected(invited1))
			    {
			        if(invited1 != INVALID_PLAYER_ID)
			        {
						if(PlayerInfo[invited1][pPolice] != 1 || PlayerInfo[invited1][pAci] != 1)
						{
			            	if(PlayerInfo[playerid][pPolice] >= 2) { PlayerInfo[invited1][pPolice] = 1; PlayerInfo[playerid][pCarLic] = 1; PlayerInfo[playerid][pGunLic] = 1; ftext = "Police Force"; }
					        else if(PlayerInfo[playerid][pAci] >= 2) { PlayerInfo[invited1][pAci] = 1; PlayerInfo[playerid][pCarLic] = 1; PlayerInfo[playerid][pGunLic] = 1; ftext = "Aci Organization"; }
					        else { return 1; }
							GetPlayerName(invited1, giveplayer, sizeof(giveplayer));
							GetPlayerName(playerid, sendername, sizeof(sendername));
							format(string, sizeof(string), "* You are now in %s, you were invited by Leader %s", ftext, sendername);
							SendClientMessage(invited1, COLOR_YELLOW, string);
							format(string, sizeof(string), "* You have Invited %s to join the %s.", giveplayer,ftext);
							SendClientMessage(playerid, COLOR_YELLOW, string);
							OnPlayerUpdate(invited1);
			            }
			            else { SendClientMessage(playerid, COLOR_GREY, "* Player is already in some organization!"); }
			        }
			    }
			}
			else { SendClientMessage(playerid, COLOR_GREY, "* you are not allowed to use that command!"); }
		}
		return 1;
	}

	if(strcmp(cmd, "/bail", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	   	{
			if(PlayerInfo[playerid][pJailed]==1)
			{
			    if(JailPrice[playerid] > 0)
			    {
			        if(GetPlayerMoney(playerid) > JailPrice[playerid])
			        {
			            format(string, sizeof(string), "You bailed yourself out for: $%d", JailPrice[playerid]);
						SendClientMessage(playerid, COLOR_MEDBLUE, string);
						GivePlayerMoney(playerid, -JailPrice[playerid]);
						JailPrice[playerid] = 0;
						PlayerInfo[playerid][pJailTime] = 1;
			        }
			        else
			        {
			            SendClientMessage(playerid, COLOR_WHITE, "* You can't afford the Bail Price !");
			        }
			    }
			    else
			    {
			        SendClientMessage(playerid, COLOR_WHITE, "* You don't have a Bail Price !");
			    }
			}
			else
			{
			    SendClientMessage(playerid, COLOR_WHITE, "* You are not in Jail !");
			}
		}
		return 1;
	}
	
	if(strcmp(cmd, "/setwanted", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			if(PlayerInfo[playerid][pPolice] >= 1)
			{
				tmp = strtok(cmdtext, idx);
				if(!strlen(tmp))
				{
					SendClientMessage(playerid, COLOR_WHITE, "USAGE: /setwanted [playerid] [level]");
					return 1;
				}
		        giveplayerid = strval(tmp);
				tmp = strtok(cmdtext, idx);
				if(!strlen(tmp))
				{
					SendClientMessage(playerid, COLOR_WHITE, "USAGE: /setwanted [playerid] [level]");
					return 1;
				}
				moneys = strval(tmp);
				if(moneys < 0 || moneys > 6)
				{
				    SendClientMessage(playerid, COLOR_WHITE, "Wanted level must be between 0 to 6");
				    return 1;
				}
				if (IsPlayerConnected(giveplayerid))
				{
	   				if(giveplayerid != INVALID_PLAYER_ID)
				    {
				        if(OnDuty[playerid]==1)
                  		{
						GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
						format(string, sizeof(string), "* You have set %s wanted level(%d).", giveplayer, moneys);
						GetPlayerWantedLevel(giveplayerid);
						SetPlayerWantedLevel(giveplayerid,moneys);
						SendClientMessage(playerid, COLOR_WHITE, string);
						}
	     				else { SendClientMessage(playerid, COLOR_WHITE, "You must be on duty!"); }
					}//invalid id
				}
				else
				{
					format(string, sizeof(string), "   %d is not an active player.", giveplayerid);
					SendClientMessage(playerid, COLOR_WHITE, string);
				}
			}
		}
		return 1;
	}
	
 	if(strcmp(cmd,"/criminalrec",true)==0 || strcmp(cmd,"/CR",true)==0)
    {
        if(IsPlayerConnected(playerid))
	    {
	        tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_WHITE, "USAGE: /Criminalrec [playerid]");
				return 1;
			}
			giveplayerid = strval(tmp);
			if(IsPlayerConnected(giveplayerid))
			{
				if(giveplayerid != INVALID_PLAYER_ID)
				{
				    if (IsACopCar(vid) || IsAtPoliceComp(playerid))
					{
					    if(OnDuty[playerid] == 1)
					    {
					    if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "You cannot check your own wanted!"); return 1; }
					    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
						GetPlayerName(playerid, sendername, sizeof(sendername));
						
						SendClientMessage(playerid, COLOR_WHITE, "Search Result Fount:");
						
					    format(string, sizeof(string), "%s Criminal Record", giveplayer);
				        SendClientMessage(playerid, COLOR_GREY, string);
   					    format(string, sizeof(string), "murders: %d, times injurie injury: %d ", PlayerInfo[giveplayerid][pKills],PlayerInfo[giveplayerid][pDeaths]);
				        SendClientMessage(playerid, COLOR_GREY, string);
   					    format(string, sizeof(string), "wanted: %d times arrested: %d",GetPlayerWantedLevel(giveplayerid),PlayerInfo[giveplayerid][pArrested]);
				        SendClientMessage(playerid, COLOR_GREY, string);
						format(string, sizeof(string), "* %s turns on the computer and check %s criminal records.", sendername ,giveplayer);
						ProxDetector(12.0, playerid, string, COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM);
						}
						else { SendClientMessage(playerid, COLOR_GREY, "* You must be on duty!"); return 1; }
					}
					else { SendClientMessage(playerid, COLOR_GREY, "* You should be in police vehicle / police station computer!"); return 1; }
				}
			}
	        else { SendClientMessage(playerid, COLOR_GREY, "* That player is Offline !"); return 1; }
		}
	    return 1;
 	}
	
	if(strcmp(cmd, "/jail", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	   	{
			if(PlayerInfo[playerid][pPolice] >= 1)
			{
		        if(!IsPlayerInSphere(playerid, 267.2047,77.6788,1001.0391,5))
				{// Jail spot
				    SendClientMessage(playerid, COLOR_GREY, "You cannot arrest anybody if your not near the Jail!");
				    return 1;
				}
				tmp = strtok(cmdtext, idx);
				if(!strlen(tmp))
				{
					SendClientMessage(playerid, COLOR_WHITE, "USAGE:/jail [price] [time] [bail (0=no/1=yes)] [bailprice]");
					return 1;
				}
				moneys = strval(tmp);
				if(moneys < 1 || moneys > 5000) { SendClientMessage(playerid, COLOR_GREY, "* Jail price cannot be above 1$ and below 5000$!"); return 1; }
				tmp = strtok(cmdtext, idx);
				if(!strlen(tmp))
				{
					SendClientMessage(playerid, COLOR_WHITE, "USAGE: /jail [price] [time] [bail (0=no/1=yes)] [bailprice]");
					return 1;
				}
				new time = strval(tmp);
				if(time < 1 || time > 20) { SendClientMessage(playerid, COLOR_GREY, "* Jail time cannot be above then 1 minute or below 30 Minutes!"); return 1; }
				tmp = strtok(cmdtext, idx);
				if(!strlen(tmp))
				{
					SendClientMessage(playerid, COLOR_WHITE, "USAGE: /jail [price] [time] [bail (0=no/1=yes)] [bailprice]");
					return 1;
				}
				new bail = strval(tmp);
				if(bail < 0 || bail > 1)
				{
	 			SendClientMessage(playerid, COLOR_GREY, "* Jail Bailing cant be below 0 or above 1 !");
			  	return 1;
			  	}
				tmp = strtok(cmdtext, idx);
				if(!strlen(tmp))
				{
					SendClientMessage(playerid, COLOR_WHITE, "USAGE: /jail [price] [time] [bail (0=no/1=yes)] [bailprice]");
					return 1;
				}
				new bailprice = strval(tmp);
				if(bailprice < 5000 || bailprice > 300000) { SendClientMessage(playerid, COLOR_GREY, "* Jail Bailing can't be below $5000 or above $300000 !"); return 1; }
				new suspect = GetClosestPlayer(playerid);
				if(PlayerInfo[suspect][pJailed] == 1) { SendClientMessage(playerid,COLOR_GREY,"* Player already in jail!!"); return 1; }
				if(IsPlayerConnected(suspect))
				{
					if(GetDistanceBetweenPlayers(playerid,suspect) < 2)
					{
					    if(OnDuty[playerid]==1)
					    {
						GetPlayerName(suspect, giveplayer, sizeof(giveplayer));
						GetPlayerName(playerid, sendername, sizeof(sendername));
						format(string, sizeof(string), "* You were arrested %s!!", giveplayer);
						SendClientMessage(playerid, COLOR_GREY, string);
						GivePlayerMoney(suspect, -moneys);
						format(string, sizeof(string),"arrested by %s ~n~    for $%d", sendername, moneys);
						GameTextForPlayer(suspect, string, 5000, 5);
						ResetPlayerWeapons(suspect);
						SetPlayerInterior(suspect, 6);
						SetPlayerPos(suspect,264.6288,77.5742,1001.0391);
						PlayerInfo[suspect][pJailTime] = time * 60;
						SendClientMessage(suspect,COLOR_MEDBLUE,"You type /bail to pay for the damage you done!");
						if(bail == 1)
						{
							JailPrice[suspect] = bailprice;
							format(string, sizeof(string), "You are jailed for %d seconds.   Bail: $%d", PlayerInfo[suspect][pJailTime], JailPrice[suspect]);
							SendClientMessage(suspect, COLOR_LIGHTBLUE, string);
						}
						else
						{
						    JailPrice[suspect] = 0;
							format(string, sizeof(string), "You are jailed for %d seconds.   Bail: Unable", PlayerInfo[suspect][pJailTime]);
							SendClientMessage(suspect, COLOR_LIGHTBLUE, string);
						}
						PlayerInfo[suspect][pJailed] = 1;
				        PlayerInfo[suspect][pArrested] += 1;
						SetPlayerFree(suspect,playerid, "Got Arrested");
						SetPlayerWantedLevel(suspect,0);
						}
						else { SendClientMessage(playerid, COLOR_WHITE, "You must be on duty!"); }
					}
				}
				else
				{
				    SendClientMessage(playerid, COLOR_GREY,"* There is no one near to you");
				    return 1;
				}
			}
			else
			{
			    SendClientMessage(playerid, COLOR_GREY, "* You are not a Cop / ACI !");
			    return 1;
			}
		}
		return 1;
	}


	if(strcmp(cmd, "/Radio", true) == 0 || strcmp(cmd, "/r", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
  			if(PlayerInfo[playerid][pPolice] >= 1)
			{
   				if(OnDuty[playerid]==1)
   				{
					GetPlayerName(playerid, sendername, sizeof(sendername));
					new length = strlen(cmdtext);
					while ((idx < length) && (cmdtext[idx] <= ' '))
					{
						idx++;
					}
					new offset = idx;
					new result[64];
					while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
					{
						result[idx - offset] = cmdtext[idx];
						idx++;
					}
					result[idx - offset] = EOS;
					if(!strlen(result))
					{
						SendClientMessage(playerid, COLOR_WHITE, "USAGE: (/r)adio [police chat]");
						return 1;
					}
					format(string, sizeof(string), "(ID: %d)Police Radio,%s: %s", playerid, sendername, result);
					if (PlayerInfo[playerid][pPolice] >= 1)
					{
						SendPoliceMessage(COLOR_POLICER, string);
					}
					printf("Police Radio %s: %s", sendername, result);
				}
				else { SendClientMessage(playerid, COLOR_WHITE, "You must be on duty!"); }
			}
		}
		return 1;
	}
	
	
	if(strcmp(cmd, "/EPhone", true) == 0 || strcmp(cmd, "/ep", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
  			if(PlayerInfo[playerid][pAci] >= 1)
			{
				GetPlayerName(playerid, sendername, sizeof(sendername));
				new length = strlen(cmdtext);
				while ((idx < length) && (cmdtext[idx] <= ' '))
				{
					idx++;
				}
				new offset = idx;
				new result[64];
				while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
				{
					result[idx - offset] = cmdtext[idx];
					idx++;
				}
				result[idx - offset] = EOS;
				if(!strlen(result))
				{
					SendClientMessage(playerid, COLOR_WHITE, "USAGE: (/ep)hone [aci chat]");
					return 1;
				}
				format(string, sizeof(string), "*%d Aci Radio: %s say %s", playerid, sendername, result);
				if (PlayerInfo[playerid][pAci] == 1)
				{
					SendAciMessage(COLOR_ACIR, string);
				}
				printf("Aci Radio %s: %s", sendername, result);
			}
		}
		return 1;
	}


	if(strcmp(cmd, "/megaphone", true) == 0 || strcmp(cmd, "/m", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
  			if(PlayerInfo[playerid][pPolice] >= 1)
			{
				new tmpcar = GetPlayerVehicleID(playerid);
				GetPlayerName(playerid, sendername, sizeof(sendername));
				new length = strlen(cmdtext);
				while ((idx < length) && (cmdtext[idx] <= ' '))
				{
					idx++;
				}
				new offset = idx;
				new result[256];
				while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
				{
					result[idx - offset] = cmdtext[idx];
					idx++;
				}
				result[idx - offset] = EOS;
				if(!strlen(result))
				{
					SendClientMessage(playerid, COLOR_WHITE, "USAGE: (/m)egaphone [megaphone text]");
					return 1;
				}
				if(PlayerInfo[playerid][pPolice] >= 1)
				{
					if(!IsACopCar(tmpcar))
					{
						SendClientMessage(playerid, COLOR_GREY, "* You must be in a police Vehicle!!");
						return 1;
					}
					if(PlayerInfo[playerid][pPolice] >= 1)
					{
					    if(OnDuty[playerid]==1)
					    {
						format(string, sizeof(string), "[Officer %s]: %s", sendername, result);
						ProxDetector(40.0, playerid, string,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
						}
						else { SendClientMessage(playerid, COLOR_WHITE, "You must be on duty!"); }
					}
				}
				else
				{
				    SendClientMessage(playerid, COLOR_GREY, "* You are not a police Officer!!");
					return 1;
				}
			}
		}
		return 1;
	}


	if(strcmp(cmd, "/Shock", true) ==0)
	{
        new Float:health;
        
	    if(IsPlayerConnected(playerid))
	    {
			if(PlayerInfo[playerid][pPolice] >= 1 || PlayerInfo[playerid][pAci] == 1)
			{
			    if(IsPlayerInAnyVehicle(playerid))
			    {
			        SendClientMessage(playerid, COLOR_GREY, "* You cannot use this while being in the Car !");
			        return 1;
			    }
       			new suspect = GetClosestPlayer(playerid);
			    if(IsPlayerConnected(suspect))
				{
				    if(GetDistanceBetweenPlayers(playerid,suspect) < 5)
					{
					    if(IsPlayerInAnyVehicle(suspect))
					    {
					        SendClientMessage(playerid, COLOR_GREY, "* Suspect is in a vehicle, get him out before you can shock Him!");
					        return 1;
					    }
					    if(OnDuty[playerid]==1)
					    {
					    GetPlayerName(suspect, giveplayer, sizeof(giveplayer));
						GetPlayerName(playerid, sendername, sizeof(sendername));
						format(string, sizeof(string), "* You were Shocked by %s, you are numb for now.", sendername);
						SendClientMessage(suspect, COLOR_WHITE, string);
						format(string, sizeof(string), "* You Shocked %s, he's numb now.", giveplayer);
						SendClientMessage(playerid, COLOR_WHITE, string);
						format(string, sizeof(string), "* %s shoots with his Shocker Gun at %s, and shock him.", sendername ,giveplayer);
						ProxDetector(30.0, playerid, string, COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM);
						GameTextForPlayer(suspect, "~r~Shoked", 2500, 3);
					 	GetPlayerHealth(suspect,health);
					 	SetPlayerHealth(suspect, health - 8);
					 	ApplyAnimation(suspect, "CRACK", "crckdeth2", 4.299999, 1, 1, 1, 0, 15000);
					 	PlayerCuffed[suspect]=true;
					 	}
					 	else { SendClientMessage(playerid, COLOR_WHITE, "You must be on duty!"); }
		            }
					else
					{
					    SendClientMessage(playerid, COLOR_GREY, "* No-one near you!");
					    return 1;
					}
				}
			}
			else
			{
				SendClientMessage(playerid, COLOR_GREY, "* You are not a Cop / ACI !");
			}
		}
	    return 1;
	}

	if(strcmp(cmd, "/cuff", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			if(PlayerInfo[playerid][pPolice] >= 1 || PlayerInfo[playerid][pAci] == 1)
			{
			    tmp = strtok(cmdtext, idx);
				if(!strlen(tmp)) {
					SendClientMessage(playerid, COLOR_WHITE, "USAGE: /cuff [Playerid]");
					return 1;
				}
				giveplayerid = strval(tmp);
			    if(IsPlayerConnected(giveplayerid))
				{
				    if(giveplayerid != INVALID_PLAYER_ID)
				    {
					    if(PlayerCuffed[giveplayerid])
					    {
					        SendClientMessage(playerid, COLOR_GREY, "* Player already Cuffed !");
					        return 1;
					    }
						if (ProxDetectorS(3.0, playerid, giveplayerid))
						{
						    if(giveplayerid == playerid)
							{
							SendClientMessage(playerid, COLOR_GREY, "You cannot Cuff yourself!");
							return 1;
							}
       						if(OnDuty[playerid]==1)
				        	{
								GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
								GetPlayerName(playerid, sendername, sizeof(sendername));
								format(string, sizeof(string), "* You were Cuffed by %s, till uncuff.", sendername);
								SendClientMessage(giveplayerid, COLOR_GREY, string);
								format(string, sizeof(string), "* You Cuffed %s, till uncuff.", giveplayer);
								SendClientMessage(playerid, COLOR_GREY, string);
								format(string, sizeof(string), "* %s Hand Cuffs %s, so he wont go anywhere.", sendername ,giveplayer);
								ProxDetector(30.0, playerid, string, COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM);
								GameTextForPlayer(giveplayerid, "~r~You Have Been Cuffed", 2750, 3);
								TogglePlayerControllable(giveplayerid, 0);
								PlayerCuffed[giveplayerid] = true;
								PlayerCuffedTime[giveplayerid] = 180;
						    }
						    else { SendClientMessage(playerid, COLOR_WHITE, "* You must be on duty!"); }
						}
						else
						{
						    SendClientMessage(playerid, COLOR_GREY, "* That player is not near you!!");
						    return 1;
						}
					}
				}
				else
				{
				    SendClientMessage(playerid, COLOR_GREY, "* That player is Offline !");
				    return 1;
				}
			}
			else
			{
				SendClientMessage(playerid, COLOR_GREY, "* You are not a Cop / ACI !");
			}
		}
		return 1;
	}
	if(strcmp(cmd, "/uncuff", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			if(PlayerInfo[playerid][pPolice] >= 1 || PlayerInfo[playerid][pAci] == 1)
			{
			    tmp = strtok(cmdtext, idx);
				if(!strlen(tmp)) {
					SendClientMessage(playerid, COLOR_WHITE, "USAGE: /uncuff [Playerid]");
					return 1;
				}
				giveplayerid = strval(tmp);
				if(IsPlayerConnected(giveplayerid))
				{
					if(giveplayerid != INVALID_PLAYER_ID)
					{
					    if (ProxDetectorS(8.0, playerid, giveplayerid))
						{
						    if(giveplayerid == playerid)
							{
							SendClientMessage(playerid, COLOR_GREY, "You cannot Uncuff yourself!");
							return 1;
							}
							if(PlayerCuffed[giveplayerid])
							{
							    if(OnDuty[playerid]==1)
							    {
							    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
								GetPlayerName(playerid, sendername, sizeof(sendername));
							    format(string, sizeof(string), "* You were Uncuffed by %s.", sendername);
								SendClientMessage(giveplayerid, COLOR_GREY, string);
								format(string, sizeof(string), "* You Uncuffed %s.", giveplayer);
								SendClientMessage(playerid, COLOR_GREY, string);
								GameTextForPlayer(giveplayerid, "~w~You Have Been Uncuffed", 2750, 3);
								TogglePlayerControllable(giveplayerid, 1);
								PlayerCuffed[giveplayerid] = false;
								format(string, sizeof(string), "* %s Removes %s Cuffs.", sendername ,giveplayer);
								ProxDetector(20.0, playerid, string, COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM);
								}
								else { SendClientMessage(playerid, COLOR_WHITE, "You must be on duty!"); }
							}
							else
							{
			    			SendClientMessage(playerid, COLOR_GREY, "* That player isn't Cuffed up !");
						    return 1;
							}
						}
						else
						{
					 	SendClientMessage(playerid, COLOR_GREY, "* That player is not near you!!");
				    	return 1;
						}
					}
				}
				else
				{
    			SendClientMessage(playerid, COLOR_GREY, "* That player is Offline !");
		    	return 1;
				}
			}
			else
			{
			SendClientMessage(playerid, COLOR_GREY, "* You are not a Cop / ACI !");
			}
		}
		return 1;
	}

//-------------------------------[Admin Commands]--------------------------------------------------------------------------

	if (strcmp(cmd, "/resetplayers", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			if(PLAYERLIST_authed[playerid])
			{
			    if(PlayerInfo[playerid][pAdmin] >= 100)
			    {
			        for(new i = 0; i < MAX_PLAYERS; i++)
			        {
			        PlayerInfo[i][pAccount] = 0;
			    	PlayerInfo[i][pAccount] = 2000;
			    	ResetPlayerMoney(i);
			    	GivePlayerMoney(i,350);
			    	OnPlayerUpdate(i);
			    	}
			    }
				else { SendClientMessage(playerid,COLOR_GREY,"* You are not allowed to use this command!"); return 1; }
			}
			return 1;
		}
		return 1;
	}

	if(strcmp(cmd, "/setmoney", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, "USAGE: /setmoney [playerid] [money]"); return 1; }
			new playerget;
			new money;
			playerget = strval(tmp);
			tmp = strtok(cmdtext, idx);
			money = strval(tmp);
			if (PlayerInfo[playerid][pAdmin] >= 3)
			{
			    if(IsPlayerConnected(playerget))
			    {
			        if(playerget != INVALID_PLAYER_ID)
			        {
						ResetPlayerMoney(playerget);
						ConsumingMoney[playerget] = 1;
						GivePlayerMoney(playerget, money);
					}
				}
			}
			else { SendClientMessage(playerid, COLOR_GREY, "* you are not allowed to use that command!"); }
		}
		return 1;
	}

	if(strcmp(cmd, "/sethp", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_WHITE, "USAGE: /sethp [playerid] [health]");
				return 1;
			}
			new playa;
			new health;
			playa = strval(tmp);
			tmp = strtok(cmdtext, idx);
			health = strval(tmp);
			if(health > 100)
			{
			SendClientMessage(playerid,COLOR_GREY,"* Hp not higher then 100!!");
			return 1;
			}
			if (PlayerInfo[playerid][pAdmin] >= 2)
			{
			    if(IsPlayerConnected(playa))
			    {
			        if(playa != INVALID_PLAYER_ID)
			        {
						SetPlayerHealth(playa, health);
					 	format(string, sizeof(string), "~r~%dhp",health);
						GameTextForPlayer(playa,string,3000,2);
					}
				}
			}
			else
			{
				SendClientMessage(playerid, COLOR_GREY, "* you are not allowed to use that command!");
			}
		}
		return 1;
	}
	if(strcmp(cmd, "/setarmor", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_WHITE, "USAGE: /setarmor [playerid] [armor]");
				return 1;
			}
			new playa;
			new health;
			playa = strval(tmp);
			tmp = strtok(cmdtext, idx);
			health = strval(tmp);
			if(health > 100)
			{
			SendClientMessage(playerid,COLOR_GREY,"* Armor not higher then 100!!");
			return 1;
			}
			if (PlayerInfo[playerid][pAdmin] >= 2)
			{
			    if(IsPlayerConnected(playa))
			    {
			        if(playa != INVALID_PLAYER_ID)
			        {
						SetPlayerArmour(playa, health);
					}
				}
			}
			else
			{
				SendClientMessage(playerid, COLOR_GREY, "* you are not allowed to use that command!");
			}
		}
		return 1;
	}
	
	if(strcmp(cmd, "/pkill", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_WHITE, "USAGE: /pkill [playerid]");
				return 1;
			}
			new playa;
			playa = strval(tmp);
			if (PlayerInfo[playerid][pAdmin] >= 2)
			{
			    if(IsPlayerConnected(playa))
			    {
			        if(playa != INVALID_PLAYER_ID)
			        {
						SetPlayerHealth(playa, 0);
					}
				}
			}
			else
			{
				SendClientMessage(playerid, COLOR_GREY, "* you are not allowed to use that command!");
			}
		}
		return 1;
	}

	if (strcmp(cmd, "/logoutall", true) ==0 )
	{
	    if(IsPlayerConnected(playerid))
	    {
			if (PlayerInfo[playerid][pAdmin] >= 2)
			{
				for(new i = 0; i < MAX_PLAYERS; i++)
				{
					if(IsPlayerConnected(i))
					{
						OnPlayerUpdate(i);
						PLAYERLIST_authed[playerid]=false;
						SendClientMessageToAll(COLOR_YELLOW,"You have been logged out, please login before spawn!");
					}
				}
				SendClientMessage(playerid, COLOR_GREY, "* All Players Logged out.");
			}
			else
			{
				SendClientMessage(playerid, COLOR_GREY, "* You are not allowed to use that command !");
			}
		}
		return 1;
	}

	if (strcmp(cmd, "/logoutp", true) ==0 )
	{
	    if(IsPlayerConnected(playerid))
	    {
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_WHITE, "USAGE: /logoutp [playerid]");
				return 1;
			}
			if (PlayerInfo[playerid][pAdmin] >= 2)
			{
			    if(IsPlayerConnected(giveplayerid)&&giveplayerid != INVALID_PLAYER_ID)
			    {
					PLAYERLIST_authed[giveplayerid]=false;
					format(string, sizeof(string), "* %s was logged out", giveplayerid);
			    	SendClientMessage(playerid, COLOR_WHITE, string);
					OnPlayerUpdate(giveplayerid);
				}
			}
			else
			{
				SendClientMessage(playerid, COLOR_GREY, "* You are not allowed to use that Command!!");
			}
		}
		return 1;
	}

	if(strcmp(cmd, "/gototown", true) == 0)
	{
	
		new x_job[256];
		new tmpcar = GetPlayerVehicleID(playerid);
		x_job = strtok(cmdtext, idx);
		
	    if(IsPlayerConnected(playerid))
	    {
			if(PlayerInfo[playerid][pAdmin] >= 3)
			{


				if(!strlen(x_job))
				{
					SendClientMessage(playerid, COLOR_WHITE,"Able Goto Town Commands");
					SendClientMessage(playerid, COLOR_GREY,"1=BlueBerry, 2=Dillimore, 3=Montogomey, 4=Palomino 5=FortCarson(FC)");
					return 1;
				}

				if(strcmp(x_job,"BlueBerry",true) == 0 || strcmp(x_job,"1",true) == 0)
	   			{
					if (GetPlayerState(playerid) == 2)
					{
					SetVehiclePos(tmpcar, 218.1173,-148.7223,1.5781);
					SetPlayerInterior(playerid,0);
					}
					else
					{
					SetPlayerPos(playerid, 218.1173,-148.7223,1.5781);
					SetPlayerInterior(playerid,0);
					}
				}
				if(strcmp(x_job,"Dillimore",true) == 0 || strcmp(x_job,"2",true) == 0)
	   			{
					if (GetPlayerState(playerid) == 2)
					{
						SetVehiclePos(tmpcar, 647.2769,-566.5552,16.2015);
						SetPlayerInterior(playerid,0);
					}
					else
					{
						SetPlayerPos(playerid, 647.2769,-566.5552,16.2015);
						SetPlayerInterior(playerid,0);
					}
				}
				if(strcmp(x_job,"Montogomery",true) == 0 || strcmp(x_job,"3",true) == 0)
	   			{
					if (GetPlayerState(playerid) == 2)
					{
						SetVehiclePos(tmpcar, 1313.9415,323.1887,19.5547);
						SetPlayerInterior(playerid,0);
					}
					else
					{
						SetPlayerPos(playerid, 1313.9415,323.1887,19.5547);
						SetPlayerInterior(playerid,0);
					}
				}
				
				if(strcmp(x_job,"Palomino",true) == 0 || strcmp(x_job,"4",true) == 0)
	   			{
					if (GetPlayerState(playerid) == 2)
					{
						SetVehiclePos(tmpcar, 2311.1794,86.1095,26.4804);
						SetPlayerInterior(playerid,0);
					}
					else
					{
						SetPlayerPos(playerid, 2311.1794,86.1095,26.4804);
						SetPlayerInterior(playerid,0);
					}
				}
				if(strcmp(x_job,"FC",true) == 0 || strcmp(x_job,"5",true) == 0)
	   			{
					if (GetPlayerState(playerid) == 2)
					{
						SetVehiclePos(tmpcar, -277.5220,1062.4706,19.5938);
						SetPlayerInterior(playerid,0);
					}
					else
					{
						SetPlayerPos(playerid, -277.5220,1062.4706,19.5938);
						SetPlayerInterior(playerid,0);
					}
				}
			}
			else
			{
			SendClientMessage(playerid, COLOR_GREY, "* You are not allowed to use that Command!!");
			}
		}


		return 1;
	}
	
	if(strcmp(cmd, "/get", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_WHITE, "USAGE: /get [playerid]");
				return 1;
			}
			new Float:plocx,Float:plocy,Float:plocz;
			new playeo;
			playeo = strval(tmp);
			if (IsPlayerConnected(playeo))
			{
			    if(playeo != INVALID_PLAYER_ID)
			    {
					if (PlayerInfo[playerid][pAdmin] >= 2)
					{
						GetPlayerPos(playerid, plocx, plocy, plocz);
						if(GetPlayerInterior(playerid) > 0)
						{
						SetPlayerInterior(playeo,GetPlayerInterior(playerid));
						}
						if(GetPlayerInterior(playerid) == 0)
						{
							SetPlayerInterior(playeo,0);
						}
						if(plocz > 930.0 && GetPlayerInterior(playerid) == 0)
						{
							SetPlayerInterior(playeo,1);
						}
						if (GetPlayerState(playeo) == 2)
						{
							new tmpcar = GetPlayerVehicleID(playeo);
							SetVehiclePos(tmpcar, plocx, plocy+4, plocz);
						}
						else
						{
							SetPlayerPos(playeo,plocx,plocy+1, plocz);
						}
					}
					else
					{
						SendClientMessage(playerid, COLOR_GREY, "* You are not allowed to use that Command!!");
					}
				}
			}
			else
			{
				format(string, sizeof(string), "* %d is not an active player.", playeo);
				SendClientMessage(playerid, COLOR_GREY, string);
			}
		}
		return 1;
	}
	
	if(strcmp(cmd, "/goto", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_WHITE, "USAGE: /goto [playerid]");
				return 1;
			}
			new Float:plocx,Float:plocy,Float:plocz;
			new plo;
			plo = strval(tmp);
			if (IsPlayerConnected(plo))
			{
			    if(plo != INVALID_PLAYER_ID)
			    {
					if (PlayerInfo[playerid][pAdmin] >= 2)
					{
						if(GetPlayerInterior(playerid) > 0)
						{
						SetPlayerInterior(playerid,GetPlayerInterior(plo));
						}
						GetPlayerPos(plo, plocx, plocy, plocz);
						if(GetPlayerInterior(playerid) == 0)
						{
							SetPlayerInterior(playerid,0);
						}
						if(plocz > 530.0 && GetPlayerInterior(playerid) == 0)
						{
							SetPlayerInterior(playerid,1);
						}
						if (GetPlayerState(playerid) == 2)
						{
							new tmpcar = GetPlayerVehicleID(playerid);
							SetVehiclePos(tmpcar, plocx, plocy+4, plocz);
							TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
						}
						else
						{
							SetPlayerPos(playerid,plocx,plocy+1, plocz);
						}
					}
					else
					{
						SendClientMessage(playerid, COLOR_GREY, "* You are not allowed to use that Command!!");
					}
				}
			}
			else
			{
				format(string, sizeof(string), "* %d is not an active player.", plo);
				SendClientMessage(playerid, COLOR_GREY, string);
			}
		}
		return 1;
	}
	
	if(strcmp(cmd, "/adminc", true) == 0 || strcmp(cmd, "/ac", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			GetPlayerName(playerid, sendername, sizeof(sendername));
			new length = strlen(cmdtext);
			while ((idx < length) && (cmdtext[idx] <= ' '))
			{
				idx++;
			}
			new offset = idx;
			new result[64];
			while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
			{
				result[idx - offset] = cmdtext[idx];
				idx++;
			}
			result[idx - offset] = EOS;
			if(!strlen(result))
			{
				SendClientMessage(playerid, COLOR_WHITE, "USAGE: (/a)dmin [admin chat]");
				return 1;
			}
			format(string, sizeof(string), "(ID: %d)Admin Chat %s: %s", playerid, sendername, result);
			if (PlayerInfo[playerid][pAdmin] >= 1)
			{
				SendAdminMessage(COLOR_ADMINC, string);
			}
			printf("Admin %s: %s", sendername, result);
		}
		return 1;
	}

	if(strcmp(cmd, "/slap", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_WHITE, "USAGE: /slap [playerid]");
				return 1;
			}
			new playa;
			new Float:shealth;
			new Float:slx, Float:sly, Float:slz;
			playa = strval(tmp);
			if (PlayerInfo[playerid][pAdmin] >=1)
			{
			    if(IsPlayerConnected(playa))
			    {
			        if(playa != INVALID_PLAYER_ID)
			        {
				        GetPlayerName(playa, giveplayer, sizeof(giveplayer));
						GetPlayerName(playerid, sendername, sizeof(sendername));
						GetPlayerHealth(playa, shealth);
						SetPlayerHealth(playa, shealth-10);
						GetPlayerPos(playa, slx, sly, slz);
						SetPlayerPos(playa, slx+2, sly, slz+2);
						GetPlayerPos(playa, slx, sly, slz);
						SetPlayerPos(playa, slx+4, sly, slz+4);
						PlayerPlaySound(playa, 1130, slx, sly, slz);
						printf("AdmCmd: %s slapped %s",sendername,  giveplayer);
						format(string, sizeof(string), "Admin: %s was slapped by %s",giveplayer ,sendername);
						ABroadCast(COLOR_MEDRED,string,1);
					}
				}
			}
			else
			{
				SendClientMessage(playerid, COLOR_GREY, "* You are not allowed to use that Command!!");
			}
		}
		return 1;
	}
	
	if(strcmp(cmd, "/afreeze", true) == 0 || strcmp(cmd, "/afr", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			if (PlayerInfo[playerid][pAdmin] >= 3)
			{
			    if(IsPlayerConnected(playerid))
			    {
       				GetPlayerName(playerid, giveplayer, sizeof(giveplayer));
					format(string, sizeof(string), "Admin: %s Freezes all players",sendername,  giveplayer);
					printf("%s",string);
			        for(new i=0; i<MAX_PLAYERS; i++)
			        {
						TogglePlayerControllable(i, 0);
						SendClientMessage(i,COLOR_MEDRED,string);
					}
				}
			}
			else { SendClientMessage(playerid, COLOR_GREY, "* You are not allowed to use that Command!!"); }
		}
		return 1;
	}
	
	if(strcmp(cmd, "/unafreeze", true) == 0 || strcmp(cmd, "/unaf", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			if (PlayerInfo[playerid][pAdmin] >= 3)
			{
			    if(IsPlayerConnected(playerid))
			    {
       				GetPlayerName(playerid, giveplayer, sizeof(giveplayer));
					format(string, sizeof(string), "Admin: %s UnFreezes all players",sendername,  giveplayer);
					printf("%s",string);
			        for(new i=0; i<MAX_PLAYERS; i++)
			        {
						TogglePlayerControllable(i, 1);
						SendClientMessage(i,COLOR_MEDRED,string);
					}
				}
			}
			else { SendClientMessage(playerid, COLOR_GREY, "* You are not allowed to use that Command!!"); }
		}
		return 1;
	}

	if(strcmp(cmd, "/freeze", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_WHITE, "USAGE: /freeze [playerid]");
				return 1;
			}
			new playa;
			playa = strval(tmp);
			if(playa == playerid)
			{
				SendClientMessage(playerid, COLOR_WHITE, "* You cannot freeze Yourself!");
				return 1;
			}
			if (PlayerInfo[playerid][pAdmin] >= 1)
			{
			    if(IsPlayerConnected(playa))
			    {
			        if(playa != INVALID_PLAYER_ID)
			        {
				        GetPlayerName(playa, giveplayer, sizeof(giveplayer));
						GetPlayerName(playerid, sendername, sizeof(sendername));
						TogglePlayerControllable(playa, 0);
						format(string, sizeof(string), "Admin: %s Freezes %s",sendername,  giveplayer);
						printf("%s",string);
						format(string, sizeof(string), "Admin: %s was Frozen by %s",giveplayer ,sendername);
						ABroadCast(COLOR_MEDRED,string,1);
						GameTextForPlayer(playa,"~r~Freeze",2570,4);
					}
				}
			}
			else
			{
				SendClientMessage(playerid, COLOR_GREY, "* You are not allowed to use that Command!!");
			}
		}
		return 1;
	}

	if(strcmp(cmd, "/unfreeze", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_WHITE, "USAGE: /unfreeze [playerid]");
				return 1;
			}
			new playa;
			playa = strval(tmp);
			if (PlayerInfo[playerid][pAdmin] >= 1)
			{
			    if(IsPlayerConnected(playa))
			    {
			        if(playa != INVALID_PLAYER_ID)
			        {
			    	    GetPlayerName(playa, giveplayer, sizeof(giveplayer));
						GetPlayerName(playerid, sendername, sizeof(sendername));
						TogglePlayerControllable(playa, 1);
						format(string, sizeof(string), "Admin: %s UnFroze %s",sendername,  giveplayer);
						printf("%s",string);
						format(string, sizeof(string), "Admin: %s was UnFrozen by %s",giveplayer ,sendername);
						ABroadCast(COLOR_MEDRED,string,1);
						GameTextForPlayer(playa,"~w~UnFrozen",2570,4);
					}
				}
			}
			else
			{
				SendClientMessage(playerid, COLOR_GREY, "* You are not allowed to use that Command!!");
			}
		}
		return 1;
	}

	if(strcmp(cmd, "/ban", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
	    	tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_WHITE, "USAGE: /ban [playerid] [reason]");
				return 1;
			}
			if(giveplayerid == playerid)
			{
				SendClientMessage(playerid, COLOR_WHITE, "* You cannot ban Yourself.");
				return 1;
			}
			giveplayerid = strval(tmp);
			if (PlayerInfo[playerid][pAdmin] >= 3)
			{
			    if(IsPlayerConnected(giveplayerid))
			    {
			        if(giveplayerid != INVALID_PLAYER_ID)
			        {
					    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
						GetPlayerName(playerid, sendername, sizeof(sendername));
						new length = strlen(cmdtext);
						while ((idx < length) && (cmdtext[idx] <= ' '))
						{
							idx++;
						}
						new offset = idx;
						new result[64];
						while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
						{
							result[idx - offset] = cmdtext[idx];
							idx++;
						}
						result[idx - offset] = EOS;
						if(!strlen(result))
						{
							SendClientMessage(playerid, COLOR_WHITE, "USAGE: /ban [playerid] [reason]");
							return 1;
						}
						new year, month,day;
						getdate(year, month, day);
						format(string, sizeof(string), "Admin: %s was banned by %s, reason: %s (%d-%d-%d)", giveplayer, sendername, (result),month,day,year);
						BanList(string);
						format(string, sizeof(string), "Admin: %s was banned by %s, reason: %s", giveplayer, sendername, (result));
						SendClientMessageToAll(COLOR_MEDRED, string);
						PlayerInfo[giveplayerid][pLevel] = -999;
						Ban(giveplayerid);
      					dUserSetINT(PlayerName(giveplayerid)).("Banned",1);
						return 1;
					}
				}
			}
			else
			{
				format(string, sizeof(string), "* %d is not an active player.", giveplayerid);
				SendClientMessage(playerid, COLOR_GREY, string);
			}
		}
		return 1;
	}



    if(strcmp(cmd, "/kick", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
	    	tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_WHITE, "USAGE: /kick [playerid] [reason]");
				return 1;
			}
			giveplayerid = strval(tmp);
			if (PlayerInfo[playerid][pAdmin] >= 1)
			{
				if(IsPlayerConnected(giveplayerid))
				{
				    if(giveplayerid != INVALID_PLAYER_ID)
				    {
					    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
						GetPlayerName(playerid, sendername, sizeof(sendername));
						new length = strlen(cmdtext);
						while ((idx < length) && (cmdtext[idx] <= ' '))
						{
							idx++;
						}
						new offset = idx;
						new result[64];
						while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
						{
							result[idx - offset] = cmdtext[idx];
							idx++;
						}
						result[idx - offset] = EOS;
						if(!strlen(result))
						{
							SendClientMessage(playerid, COLOR_WHITE, "USAGE: /kick [playerid] [reason]");
							return 1;
						}
						new year, month,day;
						getdate(year, month, day);
						format(string, sizeof(string), "Admin: %s was kicked by %s, reason: %s (%d-%d-%d)", giveplayer, sendername, (result),month,day,year);
						format(string, sizeof(string), "Admin: %s was kicked by %s, reason: %s", giveplayer, sendername, (result));
						SendClientMessageToAll(COLOR_MEDRED, string);
						KickLog(string);
						Kick(giveplayerid);
						return 1;
					}
				}
			}
			else
			{
				format(string, sizeof(string), "* %d is not an active player.", giveplayerid);
				SendClientMessage(playerid, COLOR_GREY, string);
			}
		}
		return 1;
	}

	if(strcmp(cmd, "/warn", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
	    	tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_WHITE, "USAGE: /warn [playerid] [reason]");
				return 1;
			}
			giveplayerid = strval(tmp);
			if (PlayerInfo[playerid][pAdmin] >= 1)
			{
			    if(IsPlayerConnected(giveplayerid))
			    {
			        if(giveplayerid != INVALID_PLAYER_ID)
			        {
					    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
						GetPlayerName(playerid, sendername, sizeof(sendername));
						new length = strlen(cmdtext);
						while ((idx < length) && (cmdtext[idx] <= ' '))
						{
							idx++;
						}
						new offset = idx;
						new result[64];
						while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
						{
							result[idx - offset] = cmdtext[idx];
							idx++;
						}
						result[idx - offset] = EOS;
						if(!strlen(result))
						{
							SendClientMessage(playerid, COLOR_WHITE, "USAGE: /warn [playerid] [reason]");
							return 1;
						}
						PlayerInfo[giveplayerid][pWarns] += 1;
						if(PlayerInfo[giveplayerid][pWarns] >= 3)
						{
						    new year, month,day;
							getdate(year, month, day);
							format(string, sizeof(string), "Admin: %s was banned by %s, reason: %s (%d-%d-%d)", giveplayer, sendername, (result),month,day,year);
							BanList(string);
							format(string, sizeof(string), "Admin: %s was banned by %s (had 3 Warnings), reason: %s", giveplayer, sendername, (result));
							SendClientMessageToAll(COLOR_RED, string);
							PlayerInfo[giveplayerid][pAdmin] = PlayerInfo[giveplayerid][pLevel];
							PlayerInfo[giveplayerid][pLevel] = -999;
							Ban(giveplayerid);
							return 1;
						}
						format(string, sizeof(string), "You warned %s, reason: %s", giveplayer, (result));
						SendClientMessage(playerid, COLOR_RED, string);
						format(string, sizeof(string), "You were warned by %s, reason: %s", sendername, (result));
						SendClientMessage(giveplayerid, COLOR_RED, string);
						return 1;
					}
				}//not connected
			}
			else
			{
				format(string, sizeof(string), "* %d is not an active player.", giveplayerid);
				SendClientMessage(playerid, COLOR_GREY, string);
			}
		}
		return 1;
	}

	
//-------------------------------[ Chat ]--------------------------------------------------------------------------

	if(strcmp(cmd, "/whisper", true) == 0 || strcmp(cmd, "/w", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
	        if(!PLAYERLIST_authed[playerid])
	        {
	            SendClientMessage(playerid, COLOR_GREY, "* You havent logged in yet !");
	            return 1;
	        }
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GREY, "USAGE: (/w)isper [playerid] [whisper text]");
				return 1;
			}
			giveplayerid = strval(tmp);
			if (IsPlayerConnected(giveplayerid))
			{
			    if(giveplayerid != INVALID_PLAYER_ID)
			    {
					GetPlayerName(playerid, sendername, sizeof(sendername));
					GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
					new length = strlen(cmdtext);
					while ((idx < length) && (cmdtext[idx] <= ' '))
					{
						idx++;
					}
					new offset = idx;
					new result[64];
					while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
					{
						result[idx - offset] = cmdtext[idx];
						idx++;
					}
					result[idx - offset] = EOS;
					if(!strlen(result))
					{
						SendClientMessage(playerid, COLOR_WHITE, "USAGE: /Whisper [playerid] [whisper chat]");
						return 1;
					}
					if (ProxDetectorS(1.0, playerid, giveplayerid))
					{
					format(string, sizeof(string), "%s(ID: %d) whispers: %s", sendername, playerid, (result));
					SendClientMessage(giveplayerid, COLOR_YELLOW, string);
					format(string, sizeof(string), "Wisper sent to %s(ID: %d): %s.", giveplayer, giveplayerid, (result));
					SendClientMessage(playerid,  COLOR_YELLOW, string);
					format(string, sizeof(string), "* %s whispers something to %s.", sendername ,giveplayer);
					ProxDetector(10.0, playerid, string, COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM);
					return 1;
					}
					else
					{
	    			SendClientMessage(playerid, COLOR_GREY, "* That player is not near you!!");
	    			return 1;
					}
				}
			}
			else
			{
					format(string, sizeof(string), "* %d is not an active player.", giveplayerid);
					SendClientMessage(playerid, COLOR_GREY, string);
			}
		}
		return 1;
	}

    if(strcmp(cmd, "/o", true) == 0 || strcmp(cmd, "/ooc", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
	        if(!PLAYERLIST_authed[playerid]) { SendClientMessage(playerid, COLOR_GREY, "* You havent logged in yet !"); return 1; }
			if ((noooc) && PlayerInfo[playerid][pAdmin] < 1) { SendClientMessage(playerid, COLOR_WHITE, "* The admin has disabled the OOC chat, try again later."); return 1; }
			GetPlayerName(playerid, sendername, sizeof(sendername));
			new length = strlen(cmdtext);
			while ((idx < length) && (cmdtext[idx] <= ' '))
			{
				idx++;
			}
			new offset = idx;
			new result[64];
			while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
			{
				result[idx - offset] = cmdtext[idx];
				idx++;
			}
			result[idx - offset] = EOS;
			if(!strlen(result))
			{
				SendClientMessage(playerid, COLOR_WHITE, "USAGE: (/o)oc [ooc chat]");
				return 1;
			}
			format(string, sizeof(string), "(( %s: %s ))", sendername, result);
			OOCOff(COLOR_GREYMED,string);
		}
		return 1;
	}
	
	if(strcmp(cmd, "/setooc", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
	       	new x_job[256];
			x_job = strtok(cmdtext, idx);
			if(!strlen(x_job)) 
			{
				SendClientMessage(playerid, COLOR_WHITE, "USAGE: /setooc [on/off])");
				return 1;
			}
			if(strcmp(x_job,"off",true) == 0)
			{
				if (PlayerInfo[playerid][pAdmin] >= 3 && (!noooc))
				{
				noooc = 1;
				BroadCast(COLOR_GREY, "* OOC chat channel disabled by an Admin !");
				}
			}
			
			if(strcmp(x_job,"on",true) == 0)
			{
   				if (PlayerInfo[playerid][pAdmin] >= 3 && (noooc))
				{
				noooc = 0;
				BroadCast(COLOR_WHITE, "* OOC chat channel enabled by an Admin !");
				}
			}
		}
		return 1;
	}
	
	if(strcmp(cmd, "/togooc", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
	       	new x_job[256];
			x_job = strtok(cmdtext, idx);
			if(!strlen(x_job)) {
				SendClientMessage(playerid, COLOR_WHITE, "USAGE: /setooc [on/off])");
				return 1;
			}
			
			if(strcmp(x_job,"off",true) == 0)
			{
				gOoc[playerid] = 1;
				SendClientMessage(playerid, COLOR_WHITE, "* OOC chat channel is now Disabled !");
			}
			if(strcmp(x_job,"on",true) == 0)
			{
				gOoc[playerid] = 0;
				SendClientMessage(playerid, COLOR_WHITE, "* OOC chat channel is now Enabled !");
			}
		}
		return 1;
	}

	if(strcmp(cmd, "/shout", true) == 0 || strcmp(cmd, "/s", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
	        if(!PLAYERLIST_authed[playerid])
	        {
	            SendClientMessage(playerid, COLOR_GREY, "* You havent logged in yet!");
	            return 1;
	        }
			GetPlayerName(playerid, sendername, sizeof(sendername));
			new length = strlen(cmdtext);
			while ((idx < length) && (cmdtext[idx] <= ' '))
			{
				idx++;
			}
			new offset = idx;
			new result[64];
			while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
			{
				result[idx - offset] = cmdtext[idx];
				idx++;
			}
			result[idx - offset] = EOS;
			if(!strlen(result))
			{
				SendClientMessage(playerid, COLOR_GREY, "USAGE: (/s)hout [local chat]");
				return 1;
			}
			format(string, sizeof(string), "%s Shouts: %s!!", sendername, result);
			ProxDetector(30.0, playerid, string,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE);
			printf("%s", string);
		}
		return 1;
	}
  	
  	
	if(strcmp(cmd, "/b", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
	        if(!PLAYERLIST_authed[playerid])
	        {
	            SendClientMessage(playerid, COLOR_GREY, "* You havent logged in yet!");
	            return 1;
	        }
			GetPlayerName(playerid, sendername, sizeof(sendername));
			new length = strlen(cmdtext);
			while ((idx < length) && (cmdtext[idx] <= ' '))
			{
				idx++;
			}
			new offset = idx;
			new result[64];
			while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
			{
				result[idx - offset] = cmdtext[idx];
				idx++;
			}
			result[idx - offset] = EOS;
			if(!strlen(result))
			{
				SendClientMessage(playerid, COLOR_GREY, "USAGE: /b [local ooc chat]");
				return 1;
			}
			format(string, sizeof(string), "(( %s: %s ))", sendername, result);
			ProxDetector(12.0, playerid, string,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE);
			printf("%s", string);
		}
		return 1;
	}

	if(strcmp(cmd, "/pay", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_WHITE, "USAGE: /pay [playerid] [amount]");
				return 1;
			}
	        giveplayerid = strval(tmp);
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_WHITE, "USAGE: /pay [playerid] [amount]");
				return 1;
			}
			if(giveplayerid == playerid)
			{
				SendClientMessage(playerid, COLOR_WHITE, "* You cannot pay to Yourself.");
				return 1;
			}
			moneys = strval(tmp);
			if(moneys > 1000 && PlayerInfo[playerid][pLevel] < 3)
			{
				SendClientMessage(playerid, COLOR_WHITE, "* You must be level 3 to pay over 1000");
				return 1;
			}
			if(moneys < 1 || moneys > 99999)
			{
			    SendClientMessage(playerid, COLOR_WHITE, "* Money must be above 1$ and below 99999$.");
			    return 1;
			}
			if (IsPlayerConnected(giveplayerid))
			{
			    if(giveplayerid != INVALID_PLAYER_ID)
			    {
					if (ProxDetectorS(5.0, playerid, giveplayerid))
					{
						GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
						GetPlayerName(playerid, sendername, sizeof(sendername));
						new playermoney = GetPlayerMoney(playerid);
						playermoney = GetPlayerMoney(playerid);
						if (moneys > 0 && playermoney >= moneys)
						{
						    ConsumingMoney[giveplayerid] = 1;
							GivePlayerMoney(playerid, (0 - moneys));
							GivePlayerMoney(giveplayerid, moneys);
							format(string, sizeof(string), "   You have sent %s(player: %d), $%d.", giveplayer,giveplayerid, moneys);
							PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
							SendClientMessage(playerid, COLOR_WHITE, string);
							format(string, sizeof(string), "   You have recieved $%d from %s(player: %d).", moneys, sendername, playerid);
							SendClientMessage(giveplayerid, COLOR_WHITE, string);
							format(string, sizeof(string), "%s has paid $%d to %s", sendername, moneys, giveplayer);
							PayList(string);
							if(moneys >= 1000000)
							{
								ABroadCast(COLOR_YELLOW,string,1);
							}
							PlayerPlaySound(giveplayerid, 1052, 0.0, 0.0, 0.0);
							format(string, sizeof(string), "* %s takes out some cash, and hands it to %s.", sendername ,giveplayer);
							ProxDetector(30.0, playerid, string, COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM);
						}
						else
						{
							SendClientMessage(playerid, COLOR_WHITE, "* Invalid transaction amount.");
						}
					}
					else
					{
						SendClientMessage(playerid, COLOR_WHITE, "* Your too far away, get closer.");
					}
				}//invalid id
			}
			else
			{
				format(string, sizeof(string), "* %d is not an active player.", giveplayerid);
				SendClientMessage(playerid, COLOR_WHITE, string);
			}
		}
		return 1;
	}

  	
	if(strcmp(cmd, "/me", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
	        if(!PLAYERLIST_authed[playerid])
	        {
	            SendClientMessage(playerid, COLOR_GREY, "* You havent logged in yet!");
	            return 1;
	        }
			GetPlayerName(playerid, sendername, sizeof(sendername));
			new length = strlen(cmdtext);
			while ((idx < length) && (cmdtext[idx] <= ' '))
			{
				idx++;
			}
			new offset = idx;
			new result[64];
			while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
			{
				result[idx - offset] = cmdtext[idx];
				idx++;
			}
			result[idx - offset] = EOS;
			if(!strlen(result))
			{
				SendClientMessage(playerid, COLOR_WHITE, "USAGE: /me [action]");
				return 1;
			}
			format(string, sizeof(string), "** %s %s", sendername, result);
			ProxDetector(25.0, playerid, string, COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM);
			printf("%s", string);
		}
		return 1;
	}
	
//----------------------------------[advertise]-----------------------------------------------
	if(strcmp(cmd, "/advertise", true) == 0 || strcmp(cmd, "/ad", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
	        if(!PLAYERLIST_authed[playerid])
	        {
	            SendClientMessage(playerid, COLOR_GREY, "* You havent logged in yet!");
	            return 1;
	        }
			GetPlayerName(playerid, sendername, sizeof(sendername));
			new length = strlen(cmdtext);
			while ((idx < length) && (cmdtext[idx] <= ' '))
			{
				idx++;
			}
			new offset = idx;
			new result[64];
			while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
			{
				result[idx - offset] = cmdtext[idx];
				idx++;
			}
			result[idx - offset] = EOS;
			if(!strlen(result)) { SendClientMessage(playerid, COLOR_WHITE, "USAGE: (/ad)vertise [advertise text]"); return 1; }
			if ((!adds) && (PlayerInfo[playerid][pAdmin] < 100)) { format(string, sizeof(string), " * Please try again later %d seconds between advertisements!",  (addtimer/1000)); SendClientMessage(playerid, COLOR_GREY, string); return 1;}
			new payout = idx * 15;
			if(GetPlayerMoney(playerid) < payout)
	        {
	            format(string, sizeof(string), "* Advertise cost $%d, you don't have enough money.", payout);
	            SendClientMessage(playerid, COLOR_WHITE, string);
	            return 1;
	        }
			GivePlayerMoney(playerid, - payout);
			format(string, sizeof(string), "Advertisement: %s, Contact: %s Phone: %d",  result, sendername,PlayerInfo[playerid][pPhonenumber]);
			SendClientMessageToAll(COLOR_GREEN,string);
			format(string, sizeof(string), "You have successfully advertisement your message, Cost:%d,with %d letters", payout, idx);
			SendClientMessage(playerid,COLOR_YELLOW,string);
			new year, month,day;
			getdate(year, month, day);
			format(string, sizeof(string), "%s was adv: %s ||Date:(%d-%d-%d)",sendername, (result),month,day,year);
			AdvList(string);
			
			if(PlayerInfo[playerid][pAdmin] < 100 || PlayerInfo[playerid][pInstructor] >= 1){SetTimer("AddsOn", addtimer, 0);adds = 0;}
		}
		return 1;
	}

//----------------------------------[Login & Register]-----------------------------------------------
	if (strcmp(cmd, "/login", true) ==0 )
	{
	    if(IsPlayerConnected(playerid))
	    {
	        new tmppass[64];
			if(PLAYERLIST_authed[playerid])
			{
				SendClientMessage(playerid, COLOR_WHITE, "SERVER: You are already logged in.");
				return 1;
			}
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_WHITE, "USAGE: /login [password]");
				return 1;
			}
			strmid(tmppass, tmp, 0, strlen(cmdtext), 255);
			Encrypt(tmppass);
			OnPlayerLogin(playerid,tmppass);
		}
		return 1;
	}
	if (strcmp(cmd, "/register", true) ==0 )
	{
	    if(IsPlayerConnected(playerid))
	    {
	        if(PLAYERLIST_authed[playerid])
			{
				SendClientMessage(playerid, COLOR_WHITE, "SERVER: You are already logged in.");
				return 1;
			}
			GetPlayerName(playerid, sendername, sizeof(sendername));
			format(string, sizeof(string), "%s.user", sendername);
			new File: hFile = fopen(string, io_read);
			if (hFile)
			{
				SendClientMessage(playerid, COLOR_YELLOW, "That Username is already taken, please choose a different one.");
				fclose(hFile);
				return 1;
			}
	        new tmppass[64];
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_WHITE, "USAGE: /register [password]");
				return 1;
			}
			strmid(tmppass, tmp, 0, strlen(cmdtext), 255);
			Encrypt(tmppass);
			OnPlayerRegister(playerid,tmppass);
		}
		return 1;
	}

//----------------------------------[Other]-----------------------------------------------

    if(!strcmp("/id",cmd,true))
    {
        cmd=strtok(cmdtext,idx);
        if(!strlen(cmd))
        SendClientMessage(playerid,COLOR_WHITE,"USAGE: /ID [ID/PartOfName]");
        else
        {
            for(new i='0';i<='9';i++)
            	if(cmd[0]==i)
             		f=1;
            if(f)
            {
                if(IsPlayerConnected(strval(cmd)))
                {
                    GetPlayerName(strval(cmd),playername,MAX_PLAYER_NAME);
                    format(cmd,256,"id:(%d) %s",id,playername);
                    SendClientMessage(playerid,COLOR_GREY,cmd);
                }
                else
                SendClientMessage(playerid,COLOR_GREY,"* That player is offline!");
            }
            else
                for(new i=0;i<MAX_PLAYERS;i++)
                    if(IsPlayerConnected(i))
                    {
                        GetPlayerName(i,playername,MAX_PLAYER_NAME);
                        if(!strcmp(cmd,playername,true,strlen(cmd)))
                        {
                            format(cmd,256,"id:(%d) %s",i,playername);
                            SendClientMessage(playerid,COLOR_GREY,cmd);
                            f=1;
                        }
                    }
			if(!f)
          	SendClientMessage(playerid,COLOR_GREY,"* Invalid Player Name Or ID!");
   		}
   		return 1;
    }

	if (strcmp(cmd, "/respawncars", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			if (PLAYERLIST_authed[playerid])
			{
			    if(PlayerInfo[playerid][pAdmin] >= 100)
			    {
			        for(new i = 0; i < MAX_VEHICLES; i++)
			        {
			        RemovePlayerFromVehicle(i);
			    	SetVehicleToRespawn(i);
			    	}
			    }
				else { SendClientMessage(playerid,COLOR_GREY,"* You are not allowed to use this command!"); return 1; }
			}
			return 1;
		}
		return 1;
	}

	if (strcmp(cmd, "/buylevel", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			if (PLAYERLIST_authed[playerid])
			{
				PlayerInfo[playerid][pMoney] = GetPlayerMoney(playerid);
				if(PlayerInfo[playerid][pLevel] >= 0)
				{
					new nxtlevel = PlayerInfo[playerid][pLevel]+1;
					new costlevel = nxtlevel*levelcost;
					new expamount = nxtlevel*levelexp;
					new infostring[256];
					if(GetPlayerMoney(playerid) < costlevel)
					{
						format(infostring, 256, "* You do not have enough Cash ($%d) !",costlevel);
						SendClientMessage(playerid, COLOR_GREY, infostring);
						return 1;
					}
					else if (PlayerInfo[playerid][pExp] < expamount)
					{
						format(infostring, 256, "* You need %d Respect Points, you curently have [%d] !",expamount,PlayerInfo[playerid][pExp]);
						SendClientMessage(playerid, COLOR_GREY, infostring);
						return 1;
					}
					else
					{
						format(string, sizeof(string), "~w~LEVEL UP ~n~~p~You Are Now Level %d", nxtlevel);
						PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
						GivePlayerMoney(playerid, (-costlevel));
						PlayerInfo[playerid][pLevel]++;
		    			PlayerInfo[playerid][pExp] -= expamount;
					    new total = PlayerInfo[playerid][pExp];
					    if(total > 0)
				    	{
		       				PlayerInfo[playerid][pExp] = total;
					    }
					    else
				    	{
				        PlayerInfo[playerid][pExp] = 0;
					    }
						PlayerInfo[playerid][pExp] = 0;
						GameTextForPlayer(playerid, string, 5000, 1);
						format(infostring, 256, "* You bought Level %d for ($%d)", nxtlevel, costlevel);
						SendClientMessage(playerid, COLOR_YELLOW, infostring);
					}
				}
				return 1;
			}
			else
			{
				SendClientMessage(playerid, COLOR_GREY, "* You are not Logged in !");
			}
		}
		return 1;
	}
	
	if(strcmp(cmd, "/door", true) == 0)
	{
		new x_job[256];
		x_job = strtok(cmdtext, idx);
        GetPlayerName(playerid, sendername, sizeof(sendername));
  		if(strcmp(x_job,"open",true) == 0)
		{
			if(PlayerInfo[playerid][pPolice] >= 1)
			{
				if(IsPlayerInSphere(playerid,246.3890,72.0390,1003.6406,4))
				{
				MoveObject(70, 247.380111, 72.445343, 1002.560546,5);
				MoveObject(71, 243.894638, 72.445343, 1002.560546,5);
				format(string, sizeof(string), "* Officer %s take out a key and opens the door", sendername);
				ProxDetector(5.0, playerid, string, COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM);
				}
			}
		}
  		else if(strcmp(x_job,"close",true) == 0)
		{
			if(PlayerInfo[playerid][pPolice] >= 1)
			{
				if(IsPlayerInSphere(playerid,246.3890,72.0390,1003.6406,4))
				{
				MoveObject(70, 246.380111, 72.445343, 1002.560546,5);
				MoveObject(71, 244.894638, 72.445343, 1002.560546,5);
				format(string, sizeof(string), "* Officer %s close the door", sendername);
				ProxDetector(5.0, playerid, string, COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM);
				}
			}
		}
		return 1;
	}

	if(strcmp(cmd, "/viewstats", true) == 0 || strcmp(cmd, "/vs", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
   			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_WHITE, "USAGE: /slap [playerid]");
				return 1;
			}
			new playa;
			playa = strval(tmp);
			if (PlayerInfo[playerid][pAdmin] >=1)
			{
			    if(IsPlayerConnected(playa))
			    {
			        if(playa != INVALID_PLAYER_ID)
			        {
                    ShowStats(playerid,playa);
					}
					else
					{
					SendClientMessage(playerid,COLOR_GREY,"* This is not a valid id number!");
					return 1;
				    }
				}
			}
			else
			{
				SendClientMessage(playerid, COLOR_GREY, "* You are not allowed to use that Command!!");
			}
		}
		return 1;
	}

	if (strcmp(cmd, "/stats", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			if (PLAYERLIST_authed[playerid])
			{
				ShowStats(playerid,playerid);
			}
			else
			{
				SendClientMessage(playerid, COLOR_GREY, "* You are not Logged in !");
			}
		}
		return 1;
	}

	if(strcmp(cmd, "/fill", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			if(IsAtGasStation(playerid))
			{
			    GameTextForPlayer(playerid,"~w~~n~~n~~n~~n~~n~~n~~n~~n~~n~please wait while Re-Fueling Vehicle",2000,3);
				SetTimer("Fillup",RefuelWait,0);
				Refueling[playerid] = 1;
			}
			else
			{
				SendClientMessage(playerid,COLOR_GREY,"   You're not at a Gas Station!");
			}
		}
    	return 1;
	}

	if(strcmp(cmd, "/fuel", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			if (gGas[playerid] == 0)
			{
				gGas[playerid] = 1;
				GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~w~Fuel Information on", 3000, 5);
				PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
			}
			else if (gGas[playerid] == 1)
			{
				gGas[playerid] = 0;
				GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~r~Fuel Information off", 3000, 5);
				PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
			}
		}
		return 1;
	}

	if(strcmp(cmd, "/report", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
	        GetPlayerName(playerid, sendername, sizeof(sendername));
			new length = strlen(cmdtext);
			while ((idx < length) && (cmdtext[idx] <= ' '))
			{
				idx++;
			}
			new offset = idx;
			new result[64];
			while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
			{
				result[idx - offset] = cmdtext[idx];
				idx++;
			}
			result[idx - offset] = EOS;
			if(!strlen(result))
			{
				SendClientMessage(playerid, COLOR_WHITE, "USAGE: /report [text]");
				return 1;
			}
			format(string, sizeof(string), "Report from %s(ID:%d): %s", sendername, playerid, (result));
			ABroadCast(COLOR_YELLOW,string,1);
			SendClientMessage(playerid, COLOR_YELLOW, "* Your report has been sent to the admins.");
	    }
	    return 1;
	}

	if(strcmp(cmd, "/done", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
		{
 	         if(PlayerInfo[playerid][pJob] == 10) { TextDrawHideForPlayer(playerid, textdraw[TEXTDRAW_BUS]); }
             else if(PlayerInfo[playerid][pJob] == 9) { TextDrawHideForPlayer(playerid, textdraw[TEXTDRAW_MECHANIC]); }
  			 else if(PlayerInfo[playerid][pJob] == 8) { TextDrawHideForPlayer(playerid, textdraw[TEXTDRAW_ARMSDEALER]); }
		     else if(PlayerInfo[playerid][pJob] == 7) { TextDrawHideForPlayer(playerid, textdraw[TEXTDRAW_ICECREAM]); }
		     else if(PlayerInfo[playerid][pJob] == 6) { TextDrawHideForPlayer(playerid, textdraw[TEXTDRAW_FARMER]); }
		     else if(PlayerInfo[playerid][pJob] == 5) { TextDrawHideForPlayer(playerid, textdraw[TEXTDRAW_FARMER]); }
		     else if(PlayerInfo[playerid][pJob] == 4) { TextDrawHideForPlayer(playerid, textdraw[TEXTDRAW_PIZZA]); }
		     else if(PlayerInfo[playerid][pJob] == 3) { TextDrawHideForPlayer(playerid, textdraw[TEXTDRAW_TRUCK]); }
		     else if(PlayerInfo[playerid][pJob] == 2) { TextDrawHideForPlayer(playerid, textdraw[TEXTDRAW_MEDIC]); }
		     else if(PlayerInfo[playerid][pJob] == 1) { TextDrawHideForPlayer(playerid, textdraw[TEXTDRAW_BARMAN]); }
		     if(dragblock[playerid] == 1) { TextDrawHideForPlayer(playerid, textdraw[TEXTDRAW_DRAGRACE]); }
		     if(raceblock[playerid] == 1) { TextDrawHideForPlayer(playerid, textdraw[TEXTDRAW_SPRINTRACE]); }
		}
		return 1;
	}

	if(strcmp(cmd, "/p-online", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
		{
			if(playersonline < 2) { format(string, sizeof(string), "~w~there is ~y~%d ~w~player online",playersonline); } else { format(string, sizeof(string), "~w~there are ~y~%d ~w~players online",playersonline); }
			GameTextForPlayer(playerid, string, 4000, 3);
		}
		return 1;
	}
		

	if(strcmp(cmd, "/time", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
		{
		    new timetext[64];
			new year,mnth,day;
			getdate(year,mnth,day);
			if(mnth == 1)
			{
			timetext = ".01";
			}
			else if(mnth == 2)
			{
			timetext = ".02.07";
			}
			else if(mnth == 3)
			{
			timetext = ".03.07";
			}
			else if(mnth == 4)
			{
			timetext = ".04.07";
			}
			else if(mnth == 5)
			{
			timetext = ".05.07";
			}
			else if(mnth == 6)
			{
			timetext = ".06.07";
			}
			else if(mnth == 7)
			{
			timetext = ".07.07";
			}
			else if(mnth == 8)
			{
			timetext = ".08.07";
			}
			else if(mnth == 9)
			{
			timetext = ".09.07";
			}
			else if(mnth == 10)
			{
			timetext = ".10.07";
			}
			else if(mnth == 11)
			{
			timetext = ".11.07";
			}
			else if(mnth == 12)
			{
			timetext = ".12.07";
			}
		    new hour,minuite,second;
			gettime(hour,minuite,second);
			HourFix(hour);
			hour = shour;
			if(hour < 10 && hour > 24) { format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~n~~n~~y~Date~w~:%d%s ~n~~y~Time~w~:0%d:%d:%d", day, timetext, hour, minuite,second); } else {format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~n~~n~~y~Date~w~:%d%s ~n~~y~Time~w~:%d:%d:%d", day, timetext, hour, minuite,second); }
			if(minuite < 10) { format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~n~~n~~y~Date~w~:%d%s ~n~~y~Time~w~:%d:0%d:%d", day, timetext, hour, minuite,second); } else {format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~n~~n~~y~Date~w~:%d%s ~n~~y~Time~w~:%d:%d:%d", day, timetext, hour, minuite,second); }
			if(second < 10) { format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~n~~n~~y~Date~w~:%d%s ~n~~y~Time~w~:%d:%d:0%d", day, timetext, hour, minuite,second); } else { format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~n~~n~~y~Date~w~:%d%s ~n~~y~Time~w~:%d:%d:%d", day, timetext, hour, minuite,second); }
			GameTextForPlayer(playerid, string, 6000, 3);
		}
		return 1;
	}

	if(strcmp(cmd, "/Garage", true) == 0)
	{
	    new tmpcar = GetPlayerVehicleID(playerid);
 		if(IsPlayerConnected(playerid))
	    {
   			if(IsPlayerInSphere(playerid,204.1196,-231.0773,1.7786,4) && IsPlayerInAnyVehicle(playerid))
			{
   				if(IsATunnedCar(tmpcar))
			    {
					menu[playerid] = CreateMenu("Garage Upgrades",2,150,60,150,30);
					SetMenuColumnHeader(menu[playerid], 0, "Possible Upgrades:");
					AddMenuItem(menu[playerid], 0, "10X Nos");
					AddMenuItem(menu[playerid], 1, "Cost 1250$");
					AddMenuItem(menu[playerid], 0, "Hydralics");
					AddMenuItem(menu[playerid], 1, "Cost 2480$");
					AddMenuItem(menu[playerid], 0, "Off Road Tires");
					AddMenuItem(menu[playerid], 1, "Cost 1720$");
					AddMenuItem(menu[playerid], 0, "Magnesium Wheel");
					AddMenuItem(menu[playerid], 1, "Cost 2100$");
					AddMenuItem(menu[playerid], 0, "Twin Exhaust");
					AddMenuItem(menu[playerid], 1, "Cost 770$");
					AddMenuItem(menu[playerid], 0, "Car Fixing");
					AddMenuItem(menu[playerid], 1, "Cost 170$");
					AddMenuItem(menu[playerid], 0, "Kits Upgrade 1");
					AddMenuItem(menu[playerid], 1, "Cost 25000$");
					TogglePlayerControllable(playerid, 0);
					ShowMenuForPlayer(menu[playerid], playerid);
				}
				else
				{
				SendClientMessage(playerid,COLOR_GREY,"* You cannot mode that Vehicle!");
				}
			}
			else
			{
			SendClientMessage(playerid,COLOR_GREY,"* You must be in the blueberry Garage!");
			}
		}
		return 1;
	}

    if (strcmp("/money", cmdtext, true, 10) == 0)
	{
	    if(PlayerInfo[playerid][pAdmin] >= 100)
	    {
	    	GivePlayerMoney(playerid,10000);
	    }
		return 1;
	}
	
	if (strcmp(cmdtext, "/vid", true)==0 && IsPlayerInAnyVehicle(playerid))
 	{
 	    if(PlayerInfo[playerid][pAdmin] == 100)
 	    {
 		format(string, sizeof(string), "Vehicle ID: %d",vid);
  		SendClientMessage(playerid,COLOR_RED,string);
		}
		return 1;
	}
	
	if (strcmp("/hyd", cmdtext, true, 10) == 0 && IsPlayerInAnyVehicle(playerid))
	{
		if(PlayerInfo[playerid][pAdmin] == 100)
		{
	   		vid = GetPlayerVehicleID(playerid);
			AddVehicleComponent(vid,1087);
		}

		return 1;
	}
	
	if (strcmp(cmd, "/admins", true) == 0)
	{
        if(IsPlayerConnected(playerid))
	    {
			SendClientMessage(playerid, COLOR_GREY, "Admins Online In Server:");
			for(new i = 0; i < MAX_PLAYERS; i++)
			{
				if(IsPlayerConnected(i))
				{
				    if(PlayerInfo[i][pAdmin] >= 1 && PlayerInfo[i][pAdmin] < 100)
				    {
						GetPlayerName(i, sendername, sizeof(sendername));
						format(string, 256, "Admin: %s", sendername);
						SendClientMessage(playerid, COLOR_WHITE, string);
					}
				}
			}
		}
		return 1;
	}
//----------------------------------[Bank Commands]-----------------------------------------------

    if(strcmp(cmd, "/withdraw", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
	        if(!IsAtBank(playerid)) { SendClientMessage(playerid, COLOR_GREY, "* You are not at the Bank !"); return 1; }
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_WHITE, "USAGE: /withdraw [amount]");
				format(string, sizeof(string), "* You Have $%d in your account.", PlayerInfo[playerid][pAccount]);
				SendClientMessage(playerid, COLOR_GREY, string);
				return 1;
			}
			new cashdeposit = strval(tmp);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_WHITE, "USAGE: /withdraw [amount]");
				format(string, sizeof(string), "* You Have $%d in your account.", PlayerInfo[playerid][pAccount]);
				SendClientMessage(playerid, COLOR_GREY, string);
				return 1;
			}
			if (cashdeposit > PlayerInfo[playerid][pAccount] || cashdeposit < 1)
			{
				SendClientMessage(playerid, COLOR_GREY, "* You dont have that money in your bank!");
				return 1;
			}
		    ConsumingMoney[playerid] = 1;
			GivePlayerMoney(playerid,cashdeposit);
			PlayerInfo[playerid][pAccount]=PlayerInfo[playerid][pAccount]-cashdeposit;
			format(string, sizeof(string), "* You have withdrawn $%d from your account,Now you got $%d left.", cashdeposit,PlayerInfo[playerid][pAccount]);
			SendClientMessage(playerid, COLOR_YELLOW, string);
			return 1;
		}
		return 1;
	}

	if(strcmp(cmd, "/bank", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			if(!IsAtBank(playerid)) { SendClientMessage(playerid, COLOR_GREY, "* You are not at the Bank !"); return 1; }
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_WHITE, "USAGE: /bank [amount]");
				format(string, sizeof(string), "  You Have $%d in your account.", PlayerInfo[playerid][pAccount]);
				SendClientMessage(playerid, COLOR_GREY, string);
				return 1;
			}
			new cashdeposit = strval(tmp);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_WHITE, "USAGE: /bank [amount]");
				format(string, sizeof(string), "* You Have $%d in your account.", PlayerInfo[playerid][pAccount]);
				SendClientMessage(playerid, COLOR_GREY, string);
				return 1;
			}
			if (cashdeposit > GetPlayerMoney(playerid) || cashdeposit < 1)
			{
				SendClientMessage(playerid, COLOR_GREY, "* You dont have that in your wallet");
				return 1;
			}
			GivePlayerMoney(playerid,-cashdeposit);
			new curfunds = PlayerInfo[playerid][pAccount];
			PlayerInfo[playerid][pAccount]=cashdeposit+PlayerInfo[playerid][pAccount];
			SendClientMessage(playerid, COLOR_WHITE, "|___ BANK STATMENT ___|");
			format(string, sizeof(string), "  Old Balance: $%d", curfunds);
			SendClientMessage(playerid, COLOR_GREY, string);
			format(string, sizeof(string), "  Deposit: $%d",cashdeposit);
			SendClientMessage(playerid, COLOR_GREY, string);
			format(string, sizeof(string), "  New Balance: $%d", PlayerInfo[playerid][pAccount]);
			SendClientMessage(playerid, COLOR_WHITE, string);
			OnPlayerUpdate(playerid);
			return 1;
		}
		return 1;
	}
	
	if(strcmp(cmd, "/balance", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			format(string, sizeof(string), "* You Have $%d in your account.",PlayerInfo[playerid][pAccount]);
			SendClientMessage(playerid, COLOR_YELLOW, string);
		}
		return 1;
	}

	
//----------------------------------[Car Commands]-----------------------------------------------

	if(strcmp(cmd, "/eject", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	   	{
	        new State;
	        if(IsPlayerInAnyVehicle(playerid))
	        {
         		State=GetPlayerState(playerid);
		        if(State!=PLAYER_STATE_DRIVER)
		        {
		        	SendClientMessage(playerid,COLOR_GREY,"* You can only eject people as the driver !");
		            return 1;
		        }
				tmp = strtok(cmdtext, idx);
				if(!strlen(tmp))
				{
					SendClientMessage(playerid, COLOR_WHITE, "USAGE: /eject [playerid]");
					return 1;
				}
				new playa;
				playa = strval(tmp);
				new test;
				test = GetPlayerVehicleID(playerid);
				if(IsPlayerConnected(playa))
				{
				    if(playa != INVALID_PLAYER_ID)
				    {
				        if(playa == playerid) { SendClientMessage(playerid, COLOR_GREY, "** You cannot Eject yourself!"); return 1; }
				        if(IsPlayerInVehicle(playa,test))
				        {
							new PName[MAX_PLAYER_NAME];
							GetPlayerName(playerid,PName,sizeof(PName));
							GetPlayerName(playa, giveplayer, sizeof(giveplayer));
							format(string, sizeof(string), "* You have eject %s out of the car!", giveplayer);
							SendClientMessage(playerid, COLOR_SYSTEM, string);
							format(string, sizeof(string), "* You have been ejected out of the car by %s !", PName);
							SendClientMessage(playa, COLOR_SYSTEM, string);
							RemovePlayerFromVehicle(playa);
						}
						else
						{
						    SendClientMessage(playerid, COLOR_GREY, "* That player is not in your Car !");
						    return 1;
						}
					}
				}
				else
				{
					SendClientMessage(playerid, COLOR_GREY, "* Invalid ID/Name!");
				}
			}
			else
			{
			    SendClientMessage(playerid, COLOR_GREY, "* You need to be in a Vehicle to use this !");
			}
		}
		return 1;
	}

	
//----------------------------------[Accept/Deny/Use Commands]-----------------------------------------------
	if(strcmp(cmd, "/use", true) == 0)
	{
	    new Float:health;
		new x_job[256];
		x_job = strtok(cmdtext, idx);

		if(!strlen(x_job))
		{
			SendClientMessage(playerid, COLOR_WHITE, "USAGE: use [name]");
			SendClientMessage(playerid, COLOR_GREY, "Available names: PainKiller, Cockie");
			return 1;
		}
		
  		if(strcmp(x_job,"Painkiller",true) == 0)
        {
            if(PlayerInfo[playerid][pPainKillers] > 0)
            {
			GetPlayerHealth(playerid,health);
			SetPlayerHealth(playerid, health + 20);
			PlayerInfo[playerid][pPainKillers]--;
			format(string, sizeof(string), "* You have used a painkiller, now you got %d left.", PlayerInfo[playerid][pPainKillers]);
			SendClientMessage(playerid,COLOR_YELLOW,string);
			}
        }
  		if(strcmp(x_job,"Cockie",true) == 0)
        {
            if(PlayerInfo[playerid][pCockie] > 0)
            {
			GetPlayerHealth(playerid,health);
			SetPlayerHealth(playerid, health + 10);
			PlayerInfo[playerid][pCockie]--;
			format(string, sizeof(string), "* You ate a Cockie, now you got %d left.", PlayerInfo[playerid][pCockie]);
			SendClientMessage(playerid,COLOR_YELLOW,string);
			}
			else { SendClientMessage(playerid,COLOR_GREY,"* You dont have any cockies in your pocket."); }
        }
        return 1;
	}
	
	if(strcmp(cmd,"/deny",true)==0)
    {
        if(IsPlayerConnected(playerid))
	    {
			new x_job[256];
			x_job = strtok(cmdtext, idx);
			if(!strlen(x_job)) {
				SendClientMessage(playerid, COLOR_WHITE, "USAGE: /deny [name]");
				SendClientMessage(playerid, COLOR_GREY, "Available names: Job, Medic");
				return 1;
			}
			if(strcmp(x_job,"medic",true) == 0) { if(IsPlayerConnected(MedicCall)) { if(MedicCall == playerid) { MedicCall = 999; } else { SendClientMessage(playerid, COLOR_GREY, "   You are not the current Caller !"); return 1; } } }
		}
		return 1;
	}
	
	if(strcmp(cmd, "/service", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			new x_nr[256];
			x_nr = strtok(cmdtext, idx);
			if(!strlen(x_nr))
			{
				SendClientMessage(playerid, COLOR_WHITE, "USAGE: /service [name]");
		  		SendClientMessage(playerid, COLOR_GREY, "Available names: Medic");
				return 1;
			}
			if(strcmp(x_nr,"medic",true) == 0)
			{
			    if(medics < 1)
		        {
		            SendClientMessage(playerid, COLOR_GREY, "* There are no Medics On Duty at the moment, try again later !");
		            return 1;
		        }
		        GetPlayerName(playerid, sendername, sizeof(sendername));
			    format(string, sizeof(string), "** %s is in need of a Medic. (use /accept medic to accept the call)", sendername);
		    	SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have called a Medic, please wait for a reply.");
		    	MedicCall = playerid;
				for(new i=0;i<MAX_PLAYERS;i++)
				{
				    if(PlayerInfo[i][pJob] == 2)
				    {
				    SendClientMessage(i,COLOR_WHITE,string);
					}
		    	}
		    	return 1;
			}
		}
		return 1;
	}


	if(strcmp(cmd, "/accept", true) == 0)
	{
 		new Float:health;
		new Float:ang;
		new x_job[256];
		x_job = strtok(cmdtext, idx);

		if(!strlen(x_job))
		{
			SendClientMessage(playerid, COLOR_WHITE, "|Accept Able Things");
			SendClientMessage(playerid, COLOR_WHITE, "USAGE: accept [name]");
			SendClientMessage(playerid, COLOR_GREY, "Available names: Job, Drink, Pizza, Ice cream, Repair ,PainKiller, Heal");
			SendClientMessage(playerid, COLOR_GREY, "Available names: Ticket, Medic, Refill");
			return 1;
		}

        if(strcmp(x_job,"job",true) == 0)
        {
        
			if(accept_b[playerid] == ACCEPT_BUS)
	     	{
			TextDrawUseBox(textdraw[TEXTDRAW_BUS], true);
			TextDrawShowForPlayer(playerid, textdraw[TEXTDRAW_BUS]);
			texttimer[playerid]=10;
			textdrawtimer[playerid] = TEXTDRAW_BUS;
			PlayerInfo[playerid][pJob] = 10;
	     	}
        
			else if(accept_b[playerid] == ACCEPT_MECHANIC)
	     	{
			TextDrawUseBox(textdraw[TEXTDRAW_MECHANIC], true);
			TextDrawShowForPlayer(playerid, textdraw[TEXTDRAW_MECHANIC]);
			texttimer[playerid]=10;
			textdrawtimer[playerid] = TEXTDRAW_MECHANIC;
			PlayerInfo[playerid][pJob] = 9;
			PlayerInfo[playerid][pArmsDealerSkill] = 1;
	     	}
	     	
			else if(accept_b[playerid] == ACCEPT_ARMSDEALER)
	     	{
			TextDrawUseBox(textdraw[TEXTDRAW_ARMSDEALER], true);
			TextDrawShowForPlayer(playerid, textdraw[TEXTDRAW_ARMSDEALER]);
			texttimer[playerid]=10;
			textdrawtimer[playerid] = TEXTDRAW_ARMSDEALER;
			PlayerInfo[playerid][pJob] = 8;
			PlayerInfo[playerid][pArmsDealerSkill] = 1;
	     	}
	     	
			else if(accept_b[playerid] == ACCEPT_ICECREAM)
	     	{
			TextDrawUseBox(textdraw[TEXTDRAW_ICECREAM], true);
			TextDrawShowForPlayer(playerid, textdraw[TEXTDRAW_ICECREAM]);
			icecreamsellers = icecreamsellers + 1;
			texttimer[playerid]=10;
			textdrawtimer[playerid] = TEXTDRAW_ICECREAM;
			PlayerInfo[playerid][pJob] = 7;
			icecreamunit[playerid]=20;
	     	}

	   		else if(accept_b[playerid] == ACCEPT_BARMAN)
	     	{
			TextDrawUseBox(textdraw[TEXTDRAW_BARMAN], true);
			TextDrawShowForPlayer(playerid, textdraw[TEXTDRAW_BARMAN]);
			barmans = barmans + 1;
			texttimer[playerid]=10;
			textdrawtimer[playerid] = TEXTDRAW_BARMAN;
			PlayerInfo[playerid][pJob] = 1;
	     	}

	 		else if(accept_b[playerid] == ACCEPT_MEDIC)
	     	{
			TextDrawUseBox(textdraw[TEXTDRAW_MEDIC], true);
			TextDrawShowForPlayer(playerid, textdraw[TEXTDRAW_MEDIC]);
			medics = medics + 1;
			texttimer[playerid]=10;
			textdrawtimer[playerid] = TEXTDRAW_MEDIC;
			PlayerInfo[playerid][pJob] = 2;
	     	}

	 		else if(accept_b[playerid] == ACCEPT_TRUCKER)
	     	{
			TextDrawUseBox(textdraw[TEXTDRAW_TRUCK], true);
			TextDrawShowForPlayer(playerid, textdraw[TEXTDRAW_TRUCK]);
			texttimer[playerid]=10;
			textdrawtimer[playerid] = TEXTDRAW_TRUCK;
			PlayerInfo[playerid][pJob] = 3;
	     	}

	 		else if(accept_b[playerid] == ACCEPT_PIZZA)
	     	{
			TextDrawUseBox(textdraw[TEXTDRAW_PIZZA], true);
			TextDrawShowForPlayer(playerid, textdraw[TEXTDRAW_PIZZA]);
			texttimer[playerid]=10;
			textdrawtimer[playerid] = TEXTDRAW_PIZZA;
			PlayerInfo[playerid][pJob] = 4;
			pizzas[playerid] = 4;
	     	}

			else if(accept_b[playerid] == ACCEPT_FARMER)
	     	{
			TextDrawUseBox(textdraw[TEXTDRAW_FARMER], true);
			TextDrawShowForPlayer(playerid, textdraw[TEXTDRAW_FARMER]);
			combinetext[playerid]=1;
			farmer = farmer + 1;
			texttimer[playerid]=10;
			textdrawtimer[playerid] = TEXTDRAW_FARMER;
			PlayerInfo[playerid][pJob] = 5;
	     	}

			else if(accept_b[playerid] == ACCEPT_FARMER2)
	     	{
			TextDrawUseBox(textdraw[TEXTDRAW_FARMER], true);
			TextDrawShowForPlayer(playerid, textdraw[TEXTDRAW_FARMER]);
			combinetext[playerid]=1;
			farmer1 = farmer1 + 1;
			texttimer[playerid]=10;
			textdrawtimer[playerid] = TEXTDRAW_FARMER;
	        PlayerInfo[playerid][pJob] = 6;
	     	}
        }
        
		else if(strcmp(x_job,"refill",true) == 0)
		{
		    if(RefillOffer[playerid] < 999)
		    {
		        if(IsPlayerConnected(RefillOffer[playerid]))
		        {
			        if(GetPlayerMoney(playerid) > RefillPrice[playerid])
           			{
           			    new vehicle = GetPlayerVehicleID(playerid);
			            GetPlayerName(RefillOffer[playerid], giveplayer, sizeof(giveplayer));
						GetPlayerName(playerid, sendername, sizeof(sendername));
       					new fuel;
 						PlayerInfo[RefillOffer[playerid]][pMechanicSkill] ++;
			            if(PlayerInfo[RefillOffer[playerid]][pMechanicSkill] == 50)
						{ SendClientMessage(RefillOffer[playerid], COLOR_YELLOW, "* Your Car Mechanic Skill is now Level 2, you can add more Fuel to any Players Cars."); }
						else if(PlayerInfo[RefillOffer[playerid]][pMechanicSkill] == 100)
						{ SendClientMessage(RefillOffer[playerid], COLOR_YELLOW, "* Your Car Mechanic Skill is now Level 3, you can add more Fuel to any Players Cars."); }
						else if(PlayerInfo[RefillOffer[playerid]][pMechanicSkill] == 150)
						{ SendClientMessage(RefillOffer[playerid], COLOR_YELLOW, "* Your Car Mechanic Skill is now Level 4, you can add more Fuel to any Players Cars."); }
						else if(PlayerInfo[RefillOffer[playerid]][pMechanicSkill] == 200)
						{ SendClientMessage(RefillOffer[playerid], COLOR_YELLOW, "* Your Car Mechanic Skill is now Level 5, you can add more Fuel to any Players Cars."); }
						new level = PlayerInfo[RefillOffer[playerid]][pMechanicSkill];
						if(level >= 0 && level <= 50)
						{ fuel = 15; }
						else if(level >= 51 && level <= 100)
						{ fuel = 40; }
						else if(level >= 101 && level <= 150)
						{ fuel = 60; }
						else if(level >= 151 && level <= 200)
						{ fuel = 80; }
						else if(level >= 200)
						{ fuel = 100; }
			            format(string, sizeof(string), "* You refilled your car with %d%, for $%d by Car Mechanic %s.",fuel,RefillPrice[playerid],giveplayer);
						SendClientMessage(playerid, COLOR_WHITE, string);
						format(string, sizeof(string), "* You refilled %s's car with %d%, the $%d has been added to your PayCheck.",sendername,fuel,RefillPrice[playerid]);
						SendClientMessage(RefillOffer[playerid], COLOR_WHITE, string);
						PlayerInfo[RefillOffer[playerid]][pPayCheck] += RefillPrice[playerid];
						GivePlayerMoney(playerid, -RefillPrice[playerid]);
						if(Gas[vehicle] < 110) { Gas[vehicle] += fuel; }
				        RefillOffer[playerid] = 999;
						RefillPrice[playerid] = 0;
						format(string, sizeof(string), "* %s takes out a gas tank, fill some into %s's car.", giveplayer,sendername);
						ProxDetector(30.0, playerid, string, COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM);
						return 1;
		            }
					else
					{
					    SendClientMessage(playerid, COLOR_GREY, "* You cant afford the Refill !");
					    return 1;
					}
		        }
		        return 1;
		    }
			else
			{
			    SendClientMessage(playerid, COLOR_GREY, "* No-one offered to Refill your Car !");
			    return 1;
			}
		}
        
		else if(strcmp(x_job,"medic",true) == 0)
		{
		    if(PlayerInfo[playerid][pJob] == 4)
		    {
	            if(MedicCallTime[playerid] > 0)
	            {
	                SendClientMessage(playerid, COLOR_GREY, "* You have already accepted a Medic Call!!");
				    return 1;
	            }
	            if(MedicCall < 999)
	            {
	                if(IsPlayerConnected(MedicCall))
	                {
		        	    GetPlayerName(playerid, sendername, sizeof(sendername));
		        	   	GetPlayerName(MedicCall, giveplayer, sizeof(giveplayer));
		        	   	format(string, sizeof(string), "* You have accepted the medic call from %s, you have 30 seconds to get there.",giveplayer);
						SendClientMessage(playerid, COLOR_WHITE, string);
						SendClientMessage(playerid, COLOR_WHITE, "* case you wont get there after the 30 Seconds you'll faild.");
						format(string, sizeof(string), "* Medic %s has accepted your medic request please stay in this area.",sendername);
						SendClientMessage(MedicCall, COLOR_WHITE, string);
						new Float:X,Float:Y,Float:Z;
						GetPlayerPos(MedicCall, X, Y, Z);
						SetPlayerCheckpoint(playerid, X, Y, Z, 5);
						MedicCallTime[playerid] = 1;
						MedicCall = 999;
						return 1;
					}
     			}
        		else { SendClientMessage(playerid, COLOR_GREY, "   No-one called for a Medic yet !"); return 1; }
			}
			else { SendClientMessage(playerid, COLOR_GREY, "   You are not a Medic !"); 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]))
					{
			          	GetPlayerName(TicketOffer[playerid], giveplayer, sizeof(giveplayer));
						GetPlayerName(playerid, sendername, sizeof(sendername));
						format(string, sizeof(string), "* You have paid the Ticket for $%d to Officer %s.", TicketMoney[playerid], giveplayer);
						SendClientMessage(playerid, COLOR_WHITE, string);
						format(string, sizeof(string), "* %s has paid your Ticket of $%d.", sendername, TicketMoney[playerid]);
						SendClientMessage(TicketOffer[playerid], COLOR_WHITE, string);
						GivePlayerMoney(playerid, - TicketMoney[playerid]);
						GivePlayerMoney(TicketOffer[playerid], TicketMoney[playerid]);
						TicketOffer[playerid] = 999;
						TicketMoney[playerid] = 0;
						return 1;
					}
					else
					{
					    SendClientMessage(playerid, COLOR_GREY, "   The Officer is not near you !");
					    return 1;
					}
				}
			}
			else
			{
				SendClientMessage(playerid, COLOR_GREY, "   No-one offered you a Ticket !");
    			return 1;
			}
		}
        
        else if(strcmp(x_job,"Heal",true) == 0)
		{
  			if(HealOffer[playerid] < 999)
	    	{
      			if(GetPlayerMoney(playerid) > HealPrice[playerid])
		    	{
					if(IsPlayerConnected(HealOffer[playerid]))
				 	{
						if(IsPlayerInAnyVehicle(playerid) && IsPlayerInVehicle(HealOffer[playerid], vid))
				 		{
					       	GetPlayerName(HealOffer[playerid], giveplayer, sizeof(giveplayer));
							GetPlayerName(playerid, sendername, sizeof(sendername));
							format(string, sizeof(string), "* Medic %s has healed you for (Cost:$%d).",giveplayer,HealPrice[playerid]);
							SendClientMessage(playerid, COLOR_WHITE, string);
							format(string, sizeof(string), "* You healed %s,$%d has been added to your PayCheck.",sendername,HealPrice[playerid]);
							SendClientMessage(HealOffer[playerid], COLOR_WHITE, string);
							PlayerPlaySound(giveplayerid, 1052, 0.0, 0.0, 0.0);
							format(string, sizeof(string), "* %s takes out a medic kit and heal %s.", giveplayer ,sendername);
							ProxDetector(20.0, playerid, string, COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM);
							GivePlayerMoney(playerid, -HealPrice[playerid]);
							PlayerInfo[HealOffer[playerid]][pPayCheck] += HealPrice[playerid];
					        HealOffer[playerid] = 999;
							HealPrice[playerid] = 0;
							SetPlayerHealth(playerid,100);
							return 1;
						}
						else { SendClientMessage(playerid,COLOR_WHITE,"* Get closer to the medic"); return 1; }
					}
					return 1;
				}
				else { SendClientMessage(playerid, COLOR_GREY, "* You can't afford the medic attention!"); return 1; }
			}
		    else { SendClientMessage(playerid, COLOR_GREY, "* No one offerd you a medic attention!"); return 1; }
		}
        
        else if(strcmp(x_job,"PainKiller",true) == 0)
		{
  			if(PainKillerOffer[playerid] < 999)
	    	{
      			if(GetPlayerMoney(playerid) > PainKillerPrice[playerid])
		    	{
					if(IsPlayerConnected(PainKillerOffer[playerid]))
				 	{
						if(PlayerInfo[playerid][pPainKillers] <= 5)
				 		{
				 		    if (ProxDetectorS(8.0, playerid, PainKillerOffer[playerid]))
				 		    {
	      						GetPlayerName(PainKillerOffer[playerid], giveplayer, sizeof(giveplayer));
								GetPlayerName(playerid, sendername, sizeof(sendername));
								format(string, sizeof(string), "* You bought a painkiller (Cost:$%d) by Paramedic %s.",PainKillerPrice[playerid],giveplayer);
								SendClientMessage(playerid, COLOR_WHITE, string);
								format(string, sizeof(string), "* You sold painkiller to %s,$%d has been added to your PayCheck.",sendername,PainKillerPrice[playerid]);
								SendClientMessage(PainKillerOffer[playerid], COLOR_WHITE, string);
								PlayerPlaySound(giveplayerid, 1052, 0.0, 0.0, 0.0);
								format(string, sizeof(string), "* %s takes out a painkiller and hands it to %s.",giveplayer,sendername);
								ProxDetector(15.0, playerid, string, COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM);
								GivePlayerMoney(playerid, -PainKillerPrice[playerid]);
                                PlayerInfo[PainKillerOffer[playerid]][pPayCheck] += PainKillerPrice[playerid];
						        PainKillerOffer[playerid] = 999;
								PainKillerPrice[playerid] = 0;
								PlayerInfo[playerid][pPainKillers]++;
								return 1;
							}
							else { SendClientMessage(playerid,COLOR_WHITE,"* Get closer to the Medic"); return 1; }
						}
						else { SendClientMessage(playerid,COLOR_WHITE,"* You can't carry more then 5 painkillers"); return 1; }
					}
					return 1;
				}
				else { SendClientMessage(playerid, COLOR_GREY, "* You can't afford the Painkiller!"); return 1; }
			}
		    else { SendClientMessage(playerid, COLOR_GREY, "* No one offerd you a painkiller!"); return 1; }
		}

        else if(strcmp(x_job,"repair",true) == 0)
		{
  			if(RepairOffer[playerid] < 999)
	    	{
      			if(GetPlayerMoney(playerid) > RepairPrice[playerid])
		    	{
			    	if(IsPlayerInAnyVehicle(playerid))
				    {
        				if(IsPlayerConnected(RepairOffer[playerid]))
				        {
				            if (ProxDetectorS(8.0, playerid, RepairOffer[playerid]))
				            {
					        	GetPlayerName(RepairOffer[playerid], giveplayer, sizeof(giveplayer));
								GetPlayerName(playerid, sendername, sizeof(sendername));
							    RepairCar[playerid] = GetPlayerVehicleID(playerid);
						        SetVehicleHealth(RepairCar[playerid], 1000.0);
								format(string, sizeof(string), "* You repaired your car for $%d by Car Mechanic %s.",RepairPrice[playerid],giveplayer);
								SendClientMessage(playerid, COLOR_WHITE, string);
								format(string, sizeof(string), "* You fixed %s's car, the $%d has been added to your PayCheck.",sendername,RepairPrice[playerid]);
								SendClientMessage(RepairOffer[playerid], COLOR_WHITE, string);
								format(string, sizeof(string), "* %s takes out a mechanic kit and fix %s's car.",giveplayer,sendername);
								ProxDetector(20.0, playerid, string, COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM);
								PlayerPlaySound(giveplayerid, 1052, 0.0, 0.0, 0.0);
								GivePlayerMoney(playerid, -RepairPrice[playerid]);
								PlayerInfo[RepairOffer[playerid]][pPayCheck] += RepairPrice[playerid];
						        RepairOffer[playerid] = 999;
								RepairPrice[playerid] = 0;
								return 1;
							}
							else { SendClientMessage(playerid,COLOR_WHITE,"* Get closer to the mechanic"); return 1; }
						}
						return 1;
					}
					else { SendClientMessage(playerid, COLOR_GREY, "* The client must be in he's vehicle!"); return 1; }
				}
				else { SendClientMessage(playerid, COLOR_GREY, "* You can't afford the Repair !"); return 1; }
 			}
		    else { SendClientMessage(playerid, COLOR_GREY, "* No one offerd you to Repair your Car !"); return 1; }
		}

        else if(strcmp(x_job,"icecream",true) == 0)
        {
   			if(IcecreamOffer[playerid] < 999)
		    {
      			if(GetPlayerMoney(playerid) > IcecreamPrice[playerid])
    			{
       				if(IsPlayerConnected(IcecreamOffer[playerid]))
					{
					    if (ProxDetectorS(5.0, playerid, IcecreamOffer[playerid]))
					    {
		       				GetPlayerName(IcecreamOffer[playerid], giveplayer, sizeof(giveplayer));
							GetPlayerName(playerid, sendername, sizeof(sendername));
							format(string, sizeof(string), "* You bought icecream Cost $%d by icecream seller %s.",IcecreamPrice[playerid],giveplayerid);
							SendClientMessage(playerid, COLOR_WHITE, string);
							format(string, sizeof(string), "* You sold an icecream, $%d has been added to your PayCheck.",IcecreamPrice[playerid]);
							SendClientMessage(IcecreamOffer[playerid], COLOR_WHITE, string);
							PlayerPlaySound(giveplayerid, 1052, 0.0, 0.0, 0.0);
							format(string, sizeof(string), "* %s takes out an from the freezer and give it to %s.", giveplayer ,sendername);
							ProxDetector(15.0, playerid, string, COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM);
							GivePlayerMoney(playerid, -IcecreamPrice[playerid]);
						   	IcecreamOffer[playerid] = 999;
							IcecreamPrice[playerid] = 0;
                            PlayerInfo[IcecreamOffer[playerid]][pPayCheck] += IcecreamPrice[playerid];
							icecreamunit[giveplayerid]--;
							GetPlayerHealth(playerid,health);
							SetPlayerHealth(playerid, health + 3);
							return 1;
						}
						else { SendClientMessage(playerid,COLOR_WHITE,"* Get closer to the icecream man"); return 1; }
					}
					return 1;
				}
				else { SendClientMessage(playerid, COLOR_GREY, "* You dont have enough money to afford the Icecream!"); return 1; }
			}
			else { SendClientMessage(playerid, COLOR_GREY, "* No one offerd you a Icecream!"); return 1; }
	 	}
        
        else if(strcmp(x_job,"pizza",true) == 0)
        {
   			if(PizzaOffer[playerid] < 999)
		    {
      			if(GetPlayerMoney(playerid) > PizzaPrice[playerid])
    			{
       				if(IsPlayerConnected(PizzaOffer[playerid]))
					{
					     if(ProxDetectorS(5.0, playerid, PizzaOffer[playerid]))
					     {
	 						GetPlayerName(PizzaOffer[playerid], giveplayer, sizeof(giveplayer));
							GetPlayerName(playerid, sendername, sizeof(sendername));
							format(string, sizeof(string), "* You bought a pizza Cost $%d by pizza-boy %s.",PizzaPrice[playerid],giveplayerid);
							SendClientMessage(playerid, COLOR_WHITE, string);
							format(string, sizeof(string), "* You sold a pizza, $%d has been added to your PayCheck.",PizzaPrice[playerid]);
							SendClientMessage(PizzaOffer[playerid], COLOR_WHITE, string);
							PlayerPlaySound(giveplayerid, 1052, 0.0, 0.0, 0.0);
							format(string, sizeof(string), "* %s takes out a pizza from tray and give it to %s.", giveplayer ,sendername);
							ProxDetector(15.0, playerid, string, COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM);
							GivePlayerMoney(playerid, -PizzaPrice[playerid]);
							PlayerInfo[PizzaOffer[playerid]][pPayCheck] += PizzaPrice[playerid];
						   	PizzaOffer[playerid] = 999;
							PizzaPrice[playerid] = 0;
							PizzasBought[playerid] = PizzasBought[playerid] + 1;
							pizzas[playerid] = pizzas[playerid] -1;
							if(PizzasBought[playerid] >= 0) { GetPlayerHealth(playerid,health); SetPlayerHealth(playerid, health + 5); }
					 		if(GetPlayerHealth(playerid,health) >= 100 && GetPlayerHealth(playerid,health) <= 100) { SetPlayerHealth(playerid,100); }
							return 1;
					     }
						 else { SendClientMessage(playerid,COLOR_WHITE,"* Get closer to the icecream man"); return 1; }
					}
					return 1;
				}
				else { SendClientMessage(playerid, COLOR_GREY, "* You dont have enough money to afford the Pizza!"); return 1; }
			}
			else { SendClientMessage(playerid, COLOR_GREY, "* No one offerd you a Pizza!"); return 1; }
	 	}
        
        else if(strcmp(x_job,"drink",true) == 0)
        {
   			if(DrinkOffer[playerid] < 999)
		    {
      			if(GetPlayerMoney(playerid) > DrinkPrice[playerid])
    			{
       				if(IsPlayerConnected(DrinkOffer[playerid]))
					{
     					if(IsPlayerInSphere(playerid,-224.7806,1404.9803,27.7734,8) && IsPlayerInSphere(giveplayerid,-224.7806,1404.9803,27.7734,8))
						{
						    if(ProxDetectorS(5.0, playerid, DrinkOffer[playerid]))
						    {
						        GetPlayerName(DrinkOffer[playerid], giveplayer, sizeof(giveplayer));
								GetPlayerName(playerid, sendername, sizeof(sendername));
								format(string, sizeof(string), "* You bought a drink Cost $%d by barman %s.",DrinkPrice[playerid],giveplayerid);
								SendClientMessage(playerid, COLOR_WHITE, string);
								format(string, sizeof(string), "* You sold a drink, $%d has been added to your PayCheck.",DrinkPrice[playerid]);
								SendClientMessage(DrinkOffer[playerid], COLOR_WHITE, string);
								GetPlayerFacingAngle(playerid,Float:ang);
								SetPlayerFacingAngle(giveplayerid,-Float:ang);
								ApplyAnimation(giveplayerid,"BAR","Barserve_give",4.0,0,1,0,0,0);
								PlayerPlaySound(giveplayerid, 1052, 0.0, 0.0, 0.0);
								format(string, sizeof(string), "* %s takes out a drink from the bar and give it to %s.", giveplayer ,sendername);
								ProxDetector(15.0, playerid, string, COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM);
								GivePlayerMoney(playerid, -DrinkPrice[playerid]);
								PlayerInfo[DrinkOffer[playerid]][pPayCheck] += DrinkPrice[playerid];
						   		DrinkOffer[playerid] = 999;
								DrinkPrice[playerid] = 0;
								DrinkSold[giveplayerid]++;
								ApplyAnimation(playerid, "BAR", "dnk_stndM_loop", 4.299999, 0, 1, 1, 0, 2);
								DrinksBought[playerid] = DrinksBought[playerid] + 1;
								if(DrinksBought[playerid] == 3) { ApplyAnimation(playerid,"PED", "WALK_DRUNK",4.0,0,1,0,0,0); GetPlayerHealth(playerid,health); SetPlayerHealth(playerid, health + 5); }
								else if(DrinksBought[playerid] == 6) { ApplyAnimation(playerid,"PED", "WALK_DRUNK",4.0,0,1,0,0,0); GetPlayerHealth(playerid,health); SetPlayerHealth(playerid, health + 6); }
								else if(DrinksBought[playerid] == 9) { ApplyAnimation(playerid,"PED", "WALK_DRUNK",4.0,0,1,0,0,0); GetPlayerHealth(playerid,health); SetPlayerHealth(playerid, health + 7); }
								else if(DrinksBought[playerid] >= 12 && DrinksBought[playerid] <= 15) { ApplyAnimation(playerid,"PED", "WALK_DRUNK",4.0,0,1,0,0,0); GetPlayerHealth(playerid,health); SetPlayerHealth(playerid, health - 5); }
								else if(DrinksBought[playerid] >= 16) { ApplyAnimation(playerid,"PED", "WALK_DRUNK",4.0,0,1,0,0,0); GetPlayerHealth(playerid,health); SetPlayerHealth(playerid, health - 15); }
								return 1;
							}
							else { SendClientMessage(playerid, COLOR_GREY, "* Get closer to the Barman!"); return 1; }
						}
						else { SendClientMessage(playerid, COLOR_GREY, "* You must be at the bar to accept Drink!"); return 1; }
					}
					return 1;
				}
				else { SendClientMessage(playerid, COLOR_GREY, "* You dont have enough money to afford the Drink!"); return 1; }
			}
			else { SendClientMessage(playerid, COLOR_GREY, "* No one offerd you a Drink!"); return 1; }
	 	}
		return 1;
	}

//----------------------------------[Instructor Commands]-----------------------------------------------

	if(strcmp(cmd, "/licenseq", true) == 0 || strcmp(cmd, "/lquestions", true) == 0 || strcmp(cmd, "/lq", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_WHITE, "USAGE: (/lq)uestions [playerid]");
				return 1;
			}
			new playa;
			playa = strval(tmp);
			
			if(playa == playerid)
			{
				SendClientMessage(playerid, COLOR_WHITE, "* You cant ask yourself these questions, DUMB ASS");
				return 1;
			}
			if (PlayerInfo[playerid][pInstructor] >=1)
			{
			    if(IsPlayerConnected(playa))
			    {
			        if(playa != INVALID_PLAYER_ID)
			        {
					    SendClientMessage(playa,COLOR_YELLOW,"1. what the urbanite allowed speed ? ");
					    SendClientMessage(playa,COLOR_YELLOW,"2. what the freeway allowed speed ? ");
					    SendClientMessage(playa,COLOR_YELLOW,"3. what side of the road should i drive ?");
					    SendClientMessage(playa,COLOR_YELLOW,"4. what should i do if i got crashed in someone and he's injured ?");
					    SendClientMessage(playa,COLOR_YELLOW,"5. what can be happend if i got caught driving drunk ?");
					    SendClientMessage(playa,COLOR_YELLOW,"6. what can be happend if i got caught with illegal upgrades ?");
					    SendClientMessage(playa,COLOR_YELLOW,"7. what should i do if ambulance on duty passing in front of me ?");
					    SendClientMessage(playerid,COLOR_YELLOW,"1. what the urbanite allowed speed ? ");
					    SendClientMessage(playerid,COLOR_YELLOW,"2. what the freeway allowed speed ? ");
					    SendClientMessage(playerid,COLOR_YELLOW,"3. what side of the road should i drive ?");
					    SendClientMessage(playerid,COLOR_YELLOW,"4. what should i do if i got crashed in someone and he's injured ?");
					    SendClientMessage(playerid,COLOR_YELLOW,"5. what can be happend if i got caught driving drunk ?");
					    SendClientMessage(playerid,COLOR_YELLOW,"6. what can be happend if i got caught with illegal upgrades ?");
					    SendClientMessage(playerid,COLOR_YELLOW,"7. what should i do if ambulance on duty passing in front of me ?");
					}
					else
					{
					SendClientMessage(playerid,COLOR_GREY,"* This is not a valid id number!");
					return 1;
				    }
				}
				return 1;
			}
			return 1;
		}
		return 1;
	}

	if(strcmp(cmd, "/lqanswers", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
	        if(PlayerInfo[playerid][pInstructor] >= 1)
	        {
	    		SendClientMessage(playerid,COLOR_YELLOW,"1. 60 Killometer Per Hour");
	    		SendClientMessage(playerid,COLOR_YELLOW,"2. 120 Killometer Per Hour");
	    		SendClientMessage(playerid,COLOR_YELLOW,"3. Right side of the road");
			    SendClientMessage(playerid,COLOR_YELLOW,"4. Call Police/Paramedic and try to rescue the injured driver");
			    SendClientMessage(playerid,COLOR_YELLOW,"5. My Police can revoked mine license");
			    SendClientMessage(playerid,COLOR_YELLOW,"6. My car and my license can be revoked");
	    		SendClientMessage(playerid,COLOR_YELLOW,"7. Nothing, his passing in front of me. not in my track");
	        }
		}
		return 1;
	}
	
	if(strcmp(cmd, "/dmv", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
	        if(PlayerInfo[playerid][pInstructor] >= 1)
	        {
	            new x_nr[256];
				x_nr = strtok(cmdtext, idx);
				if(!strlen(x_nr)) {
				    SendClientMessage(playerid, COLOR_WHITE, "USAGE: /DMV [name]");
				    SendClientMessage(playerid, COLOR_WHITE, "Available names: Close, Open.");
					return 1;
				}
			    if(strcmp(x_nr,"Close",true) == 0)
			    {
					for(new i = 0; i < MAX_PLAYERS; i++)
					{
						DMVdoor[i] = false;
					}
	    		}
			    else if(strcmp(x_nr,"Open",true) == 0)
			    {
					for(new i = 0; i < MAX_PLAYERS; i++)
					{
                        DMVdoor[i] = true;
  						format(string, sizeof(string), "Advertisement: The driving school is now open, Phone: %d", PlayerInfo[playerid][pPhonenumber]);
						SendClientMessage(i,COLOR_GREEN,string);
					}
			    }
			}
			else
			{
			SendClientMessage(playerid,COLOR_GREY,"* You are not allowed to use this command");
			return 1;
			}
		}
		return 1;
	}

	
	
	if(strcmp(cmd, "/givelicense", true) == 0 || strcmp(cmd, "/gl", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
	        if(PlayerInfo[playerid][pInstructor] >= 1)
	        {
	            new x_nr[256];
				x_nr = strtok(cmdtext, idx);
				if(!strlen(x_nr)) {
				    SendClientMessage(playerid, COLOR_WHITE, "USAGE: /givelicense [name] [playerid]");
				    SendClientMessage(playerid, COLOR_WHITE, "Available names: Driving, Sailing, Weapon.");
					return 1;
				}
			    if(strcmp(x_nr,"driving",true) == 0)
				{
		            tmp = strtok(cmdtext, idx);
					if(!strlen(tmp))
					{
					    SendClientMessage(playerid, COLOR_WHITE, "USAGE: /givelicense drivering [playerid]");
					    return 1;
					}
					giveplayerid = strval(tmp);
					if(IsPlayerConnected(giveplayerid))
					{
					    if(giveplayerid != INVALID_PLAYER_ID)
					    {
					        GetPlayerName(playerid, sendername, sizeof(sendername));
					        GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
				            format(string, sizeof(string), "* You've given a Drivers License to %s.",giveplayer);
					        SendClientMessage(playerid, COLOR_WHITE, string);
					        format(string, sizeof(string), "* Instructor %s has given you a Drivers License.",sendername);
					        SendClientMessage(giveplayerid, COLOR_WHITE, string);
							format(string, sizeof(string), "* %s give's a driving license paper to %s.", sendername ,giveplayer);
							ProxDetector(10.0, playerid, string, COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM);
					        PlayerInfo[giveplayerid][pCarLic] = 1;
					        OnPlayerUpdate(giveplayerid);
					        return 1;
				        }
					}
					else
					{
					    SendClientMessage(playerid, COLOR_GREY, "* That player is Offline !");
					    return 1;
					}
				}
				else if(strcmp(x_nr,"sailing",true) == 0)
				{
		            tmp = strtok(cmdtext, idx);
					if(!strlen(tmp))
					{
					    SendClientMessage(playerid, COLOR_WHITE, "USAGE: /givelicense sailing [playerid]");
					    return 1;
					}
					giveplayerid = strval(tmp);
					if(IsPlayerConnected(giveplayerid))
					{
					    if(giveplayerid != INVALID_PLAYER_ID)
					    {
					        GetPlayerName(playerid, sendername, sizeof(sendername));
					        GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
				            format(string, sizeof(string), "* You've given a Sailing License to %s.",giveplayer);
					        SendClientMessage(playerid, COLOR_WHITE, string);
					        format(string, sizeof(string), "* Instructor %s has given you a Sailing License.",sendername);
					        SendClientMessage(giveplayerid, COLOR_WHITE, string);
							format(string, sizeof(string), "* %s give's a sailing license paper to %s.", sendername ,giveplayer);
							ProxDetector(10.0, playerid, string, COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM);
					        PlayerInfo[giveplayerid][pSailLic] = 1;
					        OnPlayerUpdate(giveplayerid);
					        return 1;
						}
					}
					else
					{
					    SendClientMessage(playerid, COLOR_GREY, "* That player is Offline !");
					    return 1;
					}
				}
				else if(strcmp(x_nr,"weapon",true) == 0)
				{
		            tmp = strtok(cmdtext, idx);
					if(!strlen(tmp))
					{
					    SendClientMessage(playerid, COLOR_WHITE, "USAGE: /givelicense weapon [playerid]");
					    return 1;
					}
					giveplayerid = strval(tmp);
					if(IsPlayerConnected(giveplayerid))
					{
					    if(giveplayerid != INVALID_PLAYER_ID)
					    {
					        GetPlayerName(playerid, sendername, sizeof(sendername));
					        GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
				            format(string, sizeof(string), "* You've given a Weapon License to %s.",giveplayer);
					        SendClientMessage(playerid, COLOR_WHITE, string);
					        format(string, sizeof(string), "* Instructor %s has given you a Weapon License.",sendername);
					        SendClientMessage(giveplayerid, COLOR_WHITE, string);
							format(string, sizeof(string), "* %s give's a weapon license paper to %s.", sendername ,giveplayer);
							ProxDetector(10.0, playerid, string, COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM);
					        PlayerInfo[giveplayerid][pGunLic] = 1;
					        OnPlayerUpdate(giveplayerid);
					        return 1;
						}
					}
					else
					{
					    SendClientMessage(playerid, COLOR_GREY, "* That player is Offline !");
					    return 1;
					}
				}
	        }
	        else
	        {
	            SendClientMessage(playerid, COLOR_GREY, "* You are not allowed to use this command!");
	            return 1;
	        }
	    }
	    return 1;
	}
		

//----------------------------------[Job Commands]-----------------------------------------------
	if(strcmp(cmd,"/fare",true)==0)
    {
        if(IsPlayerConnected(playerid))
	    {
	        if(PlayerInfo[playerid][pJob] == 10)
			{
				if(TransportDuty[playerid] > 0)
				{
    				if(TransportDuty[playerid] == 2)
				    {
				        BusDrivers -= 1;
				    }
				    TransportDuty[playerid] = 0;
					format(string, sizeof(string), "* You are now Off Duty and earned $%d.", TransportMoney[playerid]);
					SendClientMessage(playerid, COLOR_WHITE, string);
					GivePlayerMoney(playerid, TransportMoney[playerid]);
					ConsumingMoney[playerid] = 1; TransportValue[playerid] = 0; TransportMoney[playerid] = 0;
					return 1;
				}
				if(vid >= 234 && vid <= 237)
				{
				    if(GetPlayerState(playerid) == 2)
				    {
					    tmp = strtok(cmdtext, idx);
						if(!strlen(tmp))
						{
							SendClientMessage(playerid, COLOR_WHITE, "USAGE: /fare [price]");
							return 1;
						}
						moneys = strval(tmp);
						if(moneys < 1 || moneys > 150) { SendClientMessage(playerid, COLOR_GREY, "* Fare price must be between $1 and $150!"); return 1; }
					    BusDrivers += 1; TransportDuty[playerid] = 2; TransportValue[playerid]= moneys;
					    GetPlayerName(playerid,sendername,sizeof(sendername));
	    				format(string, sizeof(string), "Bus Driver: %s is On Duty, fare: $%d.", sendername, TransportValue[playerid]);
	    				SendClientMessageToAll(COLOR_GREEN,string);
					}
					else
					{
					    SendClientMessage(playerid, COLOR_GREY, "* You are not the Driver!");
					    return 1;
					}
				}
				else
				{
				    SendClientMessage(playerid, COLOR_GREY, "* You are not in a Bus!");
				}
			}
			else
			{
			    SendClientMessage(playerid,COLOR_GREY,"* You are not a Bus Driver!");
			    return 1;
			}
	    }
	    return 1;
 	}

	if(strcmp(cmd, "/buspick", true) == 0)
	{
		new x_nr[256];
		x_nr = strtok(cmdtext, idx);
	    if(IsPlayerConnected(playerid))
	    {
	        if(PlayerInfo[playerid][pJob] == 10)
	        {
	            if(vid >= 234 && vid <= 237)
	            {
          			if(!strlen(x_nr))
					{
					SendClientMessage(playerid, COLOR_GREY, "USAGE: /buspick [On/Off]");
					return 1;
					}
	                if(strcmp(x_nr,"on",true) == 0)
	                {
			        bustrack[playerid]=1;
			        SendClientMessage(playerid,COLOR_GREY,"Follow the checkpoint in order to pickup people in bus stations");
			        SetPlayerCheckpoint(playerid,1219.1924,277.6085,19.5405,5.0);
	            	}
	            	else if(strcmp(x_nr,"off",true) == 0)
	                {
	                bustrack[playerid]=0;
	                DisablePlayerCheckpoint(playerid);
	                }
	            	else { SendClientMessage(playerid,COLOR_GREY,"* Invalid Name, On/Off"); return 1; }
	            }
	            else { SendClientMessage(playerid,COLOR_GREY,"* You must be in a bus in order to use this command."); return 1; }
	        }
		}
		return 1;
	}


	if(strcmp(cmd, "/duty", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			GetPlayerName(playerid, sendername, sizeof(sendername));
			if(PlayerInfo[playerid][pPolice] >= 1)
			{
				if (PlayerToPoint(3, playerid,254.0494,73.6973,1003.6406))
				{
					if(OnDuty[playerid]==0)
			        {
				    	format(string, sizeof(string), "* %s takes his badge and weapons from his locker.", sendername);
						ProxDetector(30.0, playerid, string, COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM);
						GivePlayerWeapon(playerid,25,100);
						GivePlayerWeapon(playerid,24,300);
						GivePlayerWeapon(playerid,3,1);
						GivePlayerWeapon(playerid,41,10000);
						OnDuty[playerid] = 1;
						SetPlayerArmour(playerid,100);
						SetPlayerHealth(playerid,100);
						if(PlayerInfo[playerid][pPolice] == 1 || PlayerInfo[playerid][pPolice] == 2) { SetPlayerSkin(playerid,282); }
						else if(PlayerInfo[playerid][pPolice] == 3) { SetPlayerSkin(playerid,288); }
					}
					else if(OnDuty[playerid]==1)
					{
						format(string, sizeof(string), "* %s puts his stuff back in his locker.", sendername);
						ProxDetector(30.0, playerid, string, COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM);
						ResetPlayerWeapons(playerid);
						OnDuty[playerid] = 0;
					}
				}
				else
				{
					SendClientMessage(playerid, COLOR_GREY, "* You are not in a locker room in the Dillimore police station!");
					return 1;
				}
			}
			else
			{
			    SendClientMessage(playerid, COLOR_GREY, "* You are not a Cop!");
			}
			if(PlayerInfo[playerid][pJob] == 10)
			{
				if(vid >= 234 && vid <= 237)
				{
					if(OnDuty[playerid]==0)
			        {
						SendClientMessage(playerid,COLOR_GREEN,"You are now on duty!");
				        OnDuty[playerid]=1;
			        }
			        
					if(OnDuty[playerid]==1)
			        {
			            SendClientMessage(playerid,COLOR_GREEN,"You are now off duty!");
	                    OnDuty[playerid]=0;
			        }
				}
				else { SendClientMessage(playerid,COLOR_GREY,"* You must be in a bus in order to use command."); return 1; }
			}
		}
		return 1;
	}

	if(strcmp(cmd,"/materials",true)==0)
    {
        if(IsPlayerConnected(playerid))
	    {
		    if (PlayerInfo[playerid][pJob] != 8)
			{
			    SendClientMessage(playerid,COLOR_GREY,"* You are not a arms Dealer!");
			    return 1;
			}
			new x_nr[256];
			x_nr = strtok(cmdtext, idx);
			if(!strlen(x_nr))
			{
			SendClientMessage(playerid, COLOR_GREY, "USAGE: /materials [action]");
			SendClientMessage(playerid, COLOR_GREY, "Available actions: Get, Drop.");
			return 1;
			}
			if(strcmp(x_nr,"get",true) == 0)
			{
			    if(IsPlayerInSphere(playerid,-168.2362,1032.0129,19.7344,2))
			    {
			        if(MatsHolding[playerid] >= 10)
			        {
			            SendClientMessage(playerid, COLOR_GREY, "* You carry anymore materials on Youself!");
				        return 1;
			        }
			        tmp = strtok(cmdtext, idx);
			        if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, "USAGE: /materials get [ammount]"); return 1; }
					moneys = strval(tmp);
					if(moneys < 1 || moneys > 10) { SendClientMessage(playerid, COLOR_GREY, "Materials amount should be between 1 to 10!"); return 1; }
					new matsprice = moneys * 100;
					if(GetPlayerMoney(playerid) > matsprice)
					{
					    format(string, sizeof(string), "* You bought %d Materials (Cost:$%d).", moneys, matsprice);
					    SendClientMessage(playerid, COLOR_WHITE, string);
					    GivePlayerMoney(playerid, - matsprice);
					    MatsHolding[playerid] = moneys;
					}
					else
					{
					    format(string, sizeof(string), "* You can't afford the $%d !", matsprice);
					    SendClientMessage(playerid, COLOR_GREY, string);
					}
			    }
			    else
			    {
			        SendClientMessage(playerid, COLOR_GREY,"You must be in Fort Carson Warehouse to get materials!");
			        return 1;
			    }
			}
			else if(strcmp(x_nr,"drop",true) == 0)
			{
			    if(IsPlayerInSphere(playerid,2326.4529,63.1036,26.4922,2))
			    {
			        if(MatsHolding[playerid] > 0)
			        {
			            new payout = (50)*(MatsHolding[playerid]);
			            format(string, sizeof(string), "* The warehouse gave you %d Materials for your %d Materials packages.", payout, MatsHolding[playerid]);
					    SendClientMessage(playerid, COLOR_WHITE, string);
			            PlayerInfo[playerid][pMaterials] += payout;
			            MatsHolding[playerid] = 0;
			        }
			        else { SendClientMessage(playerid, COLOR_GREY, "* You don't have any Materials on Yourself!"); return 1; }
			    }
			    else { SendClientMessage(playerid, COLOR_GREY, "* You are not at the Materials drop in Palomino Creek Hood!"); return 1; }
			}
			else { SendClientMessage(playerid, COLOR_GREY, "* Invalid Materials Name !"); return 1; }
		}
		return 1;
	}


    if(strcmp(cmd,"/sellgun",true)==0)
    {

        if(IsPlayerConnected(playerid))
	    {
		    if (PlayerInfo[playerid][pJob] != 8)
			{
			    SendClientMessage(playerid,COLOR_GREY,"* You are not a Arms Dealer !");
			    return 1;
			}
			new x_weapon[256],weapon[MAX_PLAYERS],ammo[MAX_PLAYERS],price[MAX_PLAYERS];
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GREY, "USAGE: /sellgun [playerid] [weaponid]");
				SendClientMessage(playerid, COLOR_GREY, "Weapons: Brass Knuckles(30) Baseball Bat(70) Silenced 9mm(120) Eagle(200) Shotgun(300)");
				SendClientMessage(playerid, COLOR_GREY, "Weapons: SMG(400) AK47(600) M4(600) Rifle(800) Sniper(1000)");
				return 1;
			}
			giveplayerid = strval(tmp);
			if (IsPlayerConnected(giveplayerid))
			{
			    if(giveplayerid != INVALID_PLAYER_ID)
			    {
					x_weapon = strtok(cmdtext, idx);
					if(!strlen(x_weapon))
					{
						SendClientMessage(playerid, COLOR_GREY, "USAGE: /sellgun [playerid] [weaponname] [price]");
						SendClientMessage(playerid, COLOR_GREY, "Weapons: Brass Knuckles(30) Baseball Bat(70) Silenced 9mm(120) Eagle(200) Shotgun(300)");
						SendClientMessage(playerid, COLOR_GREY, "Weapons: SMG(400) AK47(600) M4(600) Rifle(800) Sniper(1000)");
						return 1;
					}
				}
				if(strcmp(x_weapon,"Silenced 9mm",true) == 0) { if(PlayerInfo[playerid][pMaterials] >= 120) { weapon[playerid] = 23; price[playerid] = 120; ammo[playerid] = 50; } else { SendClientMessage(playerid,COLOR_GREY,"* Not enough Materials for that Weapon!"); return 1; } }

				else if(strcmp(x_weapon,"BrassKnuckles",true) == 0)
				{
					if(PlayerInfo[playerid][pMaterials] >= 30)
					{
					    if(PlayerInfo[playerid][pArmsDealerSkill] <= 50)
					    {
						weapon[playerid] = 1; price[playerid] = 30; ammo[playerid] = 1;
						}
						else
						{
						SendClientMessage(playerid,COLOR_GREY,"* Your arms dealer skill must be 1+ in order to sell this weapon.");
						return 1;
						}
					}
					else
					{
					SendClientMessage(playerid,COLOR_GREY,"* Not enough Materials for that Weapon!");
					return 1;
					}
				}
				else if(strcmp(x_weapon,"Baseball",true) == 0)
				{
					if(PlayerInfo[playerid][pMaterials] >= 70)
					{
					    if(PlayerInfo[playerid][pArmsDealerSkill] <= 50)
					    {
						weapon[playerid] = 5; price[playerid] = 70; ammo[playerid] = 1;
						}
						else
						{
						SendClientMessage(playerid,COLOR_GREY,"* Your arms dealer skill must be 1+ in order to sell this weapon.");
						return 1;
						}
					}
					else
					{
					SendClientMessage(playerid,COLOR_GREY,"* Not enough Materials for that Weapon!");
					return 1;
					}
				}
				else if(strcmp(x_weapon,"sdpistol",true) == 0)
				{
					if(PlayerInfo[playerid][pMaterials] >= 120)
					{
					    if(PlayerInfo[playerid][pArmsDealerSkill] <= 50)
					    {
						weapon[playerid] = 23; price[playerid] = 120; ammo[playerid] = 50;
						}
						else
						{
						SendClientMessage(playerid,COLOR_GREY,"* Your arms dealer skill must be 1+ in order to sell this weapon.");
						return 1;
						}
					}
					else
					{
					SendClientMessage(playerid,COLOR_GREY,"* Not enough Materials for that Weapon!");
					return 1;
					}
				}
				else if(strcmp(x_weapon,"Eagle",true) == 0)
				{
					if(PlayerInfo[playerid][pMaterials] >= 200)
					{
					    if(PlayerInfo[playerid][pArmsDealerSkill] <= 100)
					    {
						weapon[playerid] = 24; price[playerid] = 200; ammo[playerid] = 30;
						}
						else
						{
						SendClientMessage(playerid,COLOR_GREY,"* Your arms dealer skill must be 2+ in order to sell this weapon.");
						return 1;
						}
					}
					else
					{
					SendClientMessage(playerid,COLOR_GREY,"* Not enough Materials for that Weapon!");
					return 1;
					}
				}
				else if(strcmp(x_weapon,"Shotgun",true) == 0)
				{
					if(PlayerInfo[playerid][pMaterials] >= 200)
					{
					    if(PlayerInfo[playerid][pArmsDealerSkill] <= 100)
					    {
						weapon[playerid] = 25; price[playerid] = 300; ammo[playerid] = 25;
						}
						else
						{
						SendClientMessage(playerid,COLOR_GREY,"* Your arms dealer skill must be 2+ in order to sell this weapon.");
						return 1;
						}
					}
					else
					{
					SendClientMessage(playerid,COLOR_GREY,"* Not enough Materials for that Weapon!");
					return 1;
					}
				}
				else if(strcmp(x_weapon,"SMG",true) == 0)
				{
					if(PlayerInfo[playerid][pMaterials] >= 400)
					{
					    if(PlayerInfo[playerid][pArmsDealerSkill] <= 100)
					    {
						weapon[playerid] = 29; price[playerid] = 400; ammo[playerid] = 200;
						}
						else
						{
						SendClientMessage(playerid,COLOR_GREY,"* Your arms dealer skill must be 2+ in order to sell this weapon.");
						return 1;
						}
					}
					else
					{
					SendClientMessage(playerid,COLOR_GREY,"* Not enough Materials for that Weapon!");
					return 1;
					}
				}
				else if(strcmp(x_weapon,"AK47",true) == 0)
				{
					if(PlayerInfo[playerid][pMaterials] >= 600)
					{
					    if(PlayerInfo[playerid][pArmsDealerSkill] <= 150)
					    {
						weapon[playerid] = 30; price[playerid] = 600; ammo[playerid] = 120;
						}
						else
						{
						SendClientMessage(playerid,COLOR_GREY,"* Your arms dealer skill must be 3+ in order to sell this weapon.");
						return 1;
						}
					}
					else
					{
					SendClientMessage(playerid,COLOR_GREY,"* Not enough Materials for that Weapon!");
					return 1;
					}
				}
				else if(strcmp(x_weapon,"M4",true) == 0)
				{
					if(PlayerInfo[playerid][pMaterials] >= 600)
					{
					    if(PlayerInfo[playerid][pArmsDealerSkill] <= 150)
					    {
						weapon[playerid] = 31; price[playerid] = 600; ammo[playerid] = 120;
						}
						else
						{
						SendClientMessage(playerid,COLOR_GREY,"* Your arms dealer skill must be 3+ in order to sell this weapon.");
						return 1;
						}
					}
					else
					{
					SendClientMessage(playerid,COLOR_GREY,"* Not enough Materials for that Weapon!");
					return 1;
					}
				}
				else if(strcmp(x_weapon,"Rifel",true) == 0)
				{
					if(PlayerInfo[playerid][pMaterials] >= 800)
					{
					    if(PlayerInfo[playerid][pArmsDealerSkill] <= 150)
					    {
						weapon[playerid] = 33; price[playerid] = 800; ammo[playerid] = 20;
						}
						else
						{
						SendClientMessage(playerid,COLOR_GREY,"* Your arms dealer skill must be 4+ in order to sell this weapon.");
						return 1;
						}
					}
					else
					{
					SendClientMessage(playerid,COLOR_GREY,"* Not enough Materials for that Weapon!");
					return 1;
					}
				}
				else if(strcmp(x_weapon,"Sniper",true) == 0)
				{
					if(PlayerInfo[playerid][pMaterials] >= 1000)
					{
					    if(PlayerInfo[playerid][pArmsDealerSkill] <= 150)
					    {
						weapon[playerid] = 34; price[playerid] = 1000; ammo[playerid] = 10;
						}
						else
						{
						SendClientMessage(playerid,COLOR_GREY,"* Your arms dealer skill must be 4+ in order to sell this weapon.");
						return 1;
						}
					}
					else
					{
					SendClientMessage(playerid,COLOR_GREY,"* Not enough Materials for that Weapon!");
					return 1;
					}
				}
				else
				{
				SendClientMessage(playerid,COLOR_GREY,"* Invalid Weapon name!");
				return 1;
				}
				if (ProxDetectorS(3.0, playerid, giveplayerid))
				{
					ConsumingMoney[playerid] = 1;
					GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
					GetPlayerName(playerid, sendername, sizeof(sendername));
					format(string, sizeof(string), "* You sold %s, a %s with %d ammo, for %d Materials.", giveplayer,x_weapon, ammo[playerid], price[playerid]);
					PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
					SendClientMessage(playerid, COLOR_WHITE, string);
					format(string, sizeof(string), "* You bought %s by Dealer %s.",x_weapon,playerid);
					SendClientMessage(giveplayerid, COLOR_WHITE, string);
					PlayerPlaySound(giveplayerid, 1052, 0.0, 0.0, 0.0);
					format(string, sizeof(string), "* %s created a Gun from Materials, and hands it to %s.", sendername ,giveplayer);
					ProxDetector(30.0, playerid, string, COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM);
					GivePlayerWeapon(giveplayerid,weapon[playerid],ammo[playerid]);
					PlayerInfo[playerid][pMaterials] -= price[playerid];
					PlayerInfo[playerid][pArmsDealerSkill]++;
				}
				else
				{
					SendClientMessage(playerid, COLOR_GREY, "* Your too far away.");
					return 1;
				}
			}
			else
			{
				format(string, sizeof(string), "* %d is not an active player.", giveplayerid);
				SendClientMessage(playerid, COLOR_WHITE, string);
			}
		}
		return 1;
	}


	if(strcmp(cmd, "/gas", true) == 0)
	{
		new x_job[256];
		x_job = strtok(cmdtext, idx);

		if(!strlen(x_job))
		{
			SendClientMessage(playerid, COLOR_WHITE, "Avilable Words, Load, Drop");
			return 1;
		}
		
		if(strcmp(x_job,"load",true) == 0)
		{
			if(PlayerInfo[playerid][pJob] == 3)
			{
		    	if(PlayerToPoint(25.0,playerid,-1030.9574,-677.5853,32.0078))
			    {
    				if(trailergas[playerid] >= 100) { SendClientMessage(playerid, COLOR_GREY, "* You can't load any more gas to the truck, already full!"); return 1; }
				    tmp = strtok(cmdtext, idx);
			        if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, "USAGE: /gas load [ammount]"); return 1; }
					moneys = strval(tmp);
					if(moneys < 1 || moneys > 100) { SendClientMessage(playerid, COLOR_GREY, "* Gas percent can't be below 1 or higher then 100 !"); return 1; }
 					if(IsPlayerInVehicle(playerid,7) || IsPlayerInVehicle(playerid,8) || IsPlayerInVehicle(playerid,9) || IsPlayerInVehicle(playerid,10))
		    		{
					    format(string, sizeof(string), "* You load a %d% Gas into your gas trailer $%d.", moneys);
					    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
					    trailergas[playerid] = moneys;
					    SendClientMessage(playerid,COLOR_GREY,"And type the next command, /Drop gas. then start the");
					   	SendClientMessage(playerid,COLOR_GREY,"Mission again after 20 minutes(realife). Good Luck!");
					}
			    }
				else { SendClientMessage(playerid, COLOR_GREY, "* You are not at the Gas Factory on the way to SF!"); return 1; }
			}
			else { SendClientMessage(playerid, COLOR_GREY, "* You are not a Trucker!"); return 1; }
		}

		else if(strcmp(x_job,"drop",true) == 0)
		{
  			if(PlayerToPoint(15.0,playerid,1383.3322,476.6832,20.0339))
		    {
      			if(trailergas[playerid] > 0)
			    {
		            trailergas[playerid] = 0;
              		SendClientMessage(playerid,COLOR_GREY,"The trailer is now empty, witch mean's you done your gas");
	                SendClientMessage(playerid,COLOR_GREY,"Delivery, you are free for 20 minuets and then you'll have");
	                SendClientMessage(playerid,COLOR_GREY,"To start the mission again, good luck!!");
		        }
			    else { SendClientMessage(playerid, COLOR_GREY, "* You don't have any gas in your truck, fill it First!"); return 1; }
		    }
		    else
		    { SendClientMessage(playerid, COLOR_GREY, "* You are not at the Gas station in montogomery!"); return 1; }
		}
		else
		{ SendClientMessage(playerid, COLOR_GREY, "* Invalid Gas Name !"); return 1; }
		return 1;
	}
	
    if(strcmp(cmd,"/modcar",true)==0)
    {
        if(IsPlayerConnected(playerid))
	    {
		    if (PlayerInfo[playerid][pJob] != 9)
			{
			    SendClientMessage(playerid,COLOR_GREY,"* You are not a Mechanic!");
			    return 1;
			}
			if(!IsATunnedCar(vid))
			{
				SendClientMessage(playerid, COLOR_WHITE, "* This is not a tunable vehicle!");
				return 1;
			}
   			if(giveplayerid == playerid)
			{
				SendClientMessage(playerid, COLOR_WHITE, "* You can not upgrade your own car!");
				return 1;
			}
			new x_cmp[256];
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_WHITE, "USAGE: /modcar [playerid] [component] [price]");
				SendClientMessage(playerid, COLOR_GREY, "Components(1): ClrBlue(1) ClrRed(2) ClrBlack(3) ClrWhite(4) ClrYellow(5)");
				SendClientMessage(playerid, COLOR_GREY, "Components(2): Transfender Wheel type 4(6), Transfender Wheel type 5(7)");
				SendClientMessage(playerid, COLOR_GREY, "Components(3): Transfender Wheel type 2(8), Transfender Wheel type 3(9)");
				SendClientMessage(playerid, COLOR_GREY, "Components(4): Nitro2x(10), Nitro5x(11), Nitro10x(12), Hydralics(13), Stereo(14)");
				SendClientMessage(playerid, COLOR_GREY, "Components(4): Loco' Low Co. Wheel type 2(15), Loco' Low Co. Wheel type 5(16)");
				return 1;
			}
			giveplayerid = strval(tmp);
			if (IsPlayerConnected(giveplayerid))
			{
			    if(giveplayerid != INVALID_PLAYER_ID)
			    {
					x_cmp = strtok(cmdtext, idx);
					if(!strlen(x_cmp))
					{
						SendClientMessage(playerid, COLOR_WHITE, "USAGE: /modcar [playerid] [component] [price]");
						SendClientMessage(playerid, COLOR_GREY, "Components(1): ClrBlue(1) ClrRed(2) ClrBlack(3) ClrWhite(4) ClrYellow(5)");
						SendClientMessage(playerid, COLOR_GREY, "Components(2): Transfender Wheel type 4(6), Transfender Wheel type 5(7)");
						SendClientMessage(playerid, COLOR_GREY, "Components(3): Transfender Wheel type 2(8), Transfender Wheel type 3(9)");
						SendClientMessage(playerid, COLOR_GREY, "Components(4): Nitro2x(10), Nitro5x(11), Nitro10x(12), Hydralics(13), Stereo(14)");
						SendClientMessage(playerid, COLOR_GREY, "Components(4): Loco' Low Co. Wheel type 2(15), Loco' Low Co. Wheel type 5(16)");
						return 1;
					}
				}
				if(strcmp(x_cmp,"1",true) == 0 || strcmp(x_cmp,"ClrBlue",true) == 0)
				{
    				if(PlayerInfo[playerid][pMechanicSkill] >= 0)
				    {
				        if(MetalsHolding[playerid] >= 1)
				        {
						ChangeVehicleColor(vid,2,2);
						MetalsHolding[playerid] = MetalsHolding[playerid] - 1;
						}
						SendClientMessage(playerid,COLOR_GREY,"* You dont have metals for tuning vehicles, get some in port!");
						return 1;
					}
					else
					{
					SendClientMessage(playerid,COLOR_GREY,"* Your mechanic level should be higher then 1!");
					return 1;
					}
				}
				else if(strcmp(x_cmp,"2",true) == 0 || strcmp(x_cmp,"ClrRed",true) == 0)
				{
    				if(PlayerInfo[playerid][pMechanicSkill] >= 0)
				    {
				        if(MetalsHolding[playerid] >= 1)
				        {
						ChangeVehicleColor(vid,3,3);
						MetalsHolding[playerid] = MetalsHolding[playerid] - 1;
						}
						else
						{
						SendClientMessage(playerid,COLOR_GREY,"* You dont have metals for tuning vehicles, get some in port!");
						return 1;
						}
					}
					else
					{
					SendClientMessage(playerid,COLOR_GREY,"* Your mechanic level should be higher then 1!");
					return 1;
					}
				}
				else if(strcmp(x_cmp,"3",true) == 0 || strcmp(x_cmp,"ClrBlack",true) == 0)
				{
    				if(PlayerInfo[playerid][pMechanicSkill] >= 0)
				    {
    					if(MetalsHolding[playerid] >= 1)
				        {
						ChangeVehicleColor(vid,0,0);
						MetalsHolding[playerid] = MetalsHolding[playerid] - 1;
						}
						else
						{
						SendClientMessage(playerid,COLOR_GREY,"* You dont have metals for tuning vehicles, get some in port!");
						return 1;
						}
					}
					else
					{
					SendClientMessage(playerid,COLOR_GREY,"* Your mechanic level should be higher then 1!");
					return 1;
					}
				}
				else if(strcmp(x_cmp,"4",true) == 0 || strcmp(x_cmp,"ClrWhite",true) == 0)
				{
    				if(PlayerInfo[playerid][pMechanicSkill] >= 0)
				    {
    					if(MetalsHolding[playerid] >= 1)
				        {
						ChangeVehicleColor(vid,1,1);
						MetalsHolding[playerid] = MetalsHolding[playerid] - 1;
						}
						else
						{
						SendClientMessage(playerid,COLOR_GREY,"* You dont have metals for tuning vehicles, get some in port!");
						return 1;
						}
					}
					else
					{
					SendClientMessage(playerid,COLOR_GREY,"* Your mechanic level should be higher then 1!");
					return 1;
					}
				}
				else if(strcmp(x_cmp,"5",true) == 0 || strcmp(x_cmp,"ClrYellow",true) == 0)
				{
    				if(PlayerInfo[playerid][pMechanicSkill] >= 0)
				    {
    					if(MetalsHolding[playerid] >= 1)
				        {
						ChangeVehicleColor(vid,6,6);
						MetalsHolding[playerid] = MetalsHolding[playerid] - 1;
						}
						else
						{
						SendClientMessage(playerid,COLOR_GREY,"* You dont have metals for tuning vehicles, get some in port!");
						return 1;
						}
					}
					else
					{
					SendClientMessage(playerid,COLOR_GREY,"* Your mechanic level should be higher then 1!");
					return 1;
					}
				}
				else if(strcmp(x_cmp,"6",true) == 0)
				{
    				if(PlayerInfo[playerid][pMechanicSkill] >= 50)
				    {
    					if(MetalsHolding[playerid] >= 2)
				        {
						AddVehicleComponent(vid,1085);
						MetalsHolding[playerid] = MetalsHolding[playerid] - 2;
						}
						else
						{
						SendClientMessage(playerid,COLOR_GREY,"* You dont have metals for tuning vehicles, get some in port!");
						return 1;
						}
					}
					else
					{
					SendClientMessage(playerid,COLOR_GREY,"* Your mechanic level should be higher then 2!");
					return 1;
					}
				}
				else if(strcmp(x_cmp,"7",true) == 0)
				{
    				if(PlayerInfo[playerid][pMechanicSkill] >= 50)
				    {
    					if(MetalsHolding[playerid] >= 2)
				        {
						AddVehicleComponent(vid,1096);
						MetalsHolding[playerid] = MetalsHolding[playerid] - 2;
						}
						else
						{
						SendClientMessage(playerid,COLOR_GREY,"* You dont have metals for tuning vehicles, get some in port!");
						return 1;
						}
					}
					else
					{
					SendClientMessage(playerid,COLOR_GREY,"* Your mechanic level should be higher then 2!");
					return 1;
					}
				}
				else if(strcmp(x_cmp,"8",true) == 0)
				{
    				if(PlayerInfo[playerid][pMechanicSkill] >= 100)
				    {
    					if(MetalsHolding[playerid] >= 2)
				        {
						AddVehicleComponent(vid,1097);
						MetalsHolding[playerid] = MetalsHolding[playerid] - 2;
						}
						else
						{
						SendClientMessage(playerid,COLOR_GREY,"* You dont have metals for tuning vehicles, get some in port!");
						return 1;
						}
					}
					else
					{
					SendClientMessage(playerid,COLOR_GREY,"* Your mechanic level should be higher then 3!");
					return 1;
					}
				}
				else if(strcmp(x_cmp,"9",true) == 0)
				{
    				if(PlayerInfo[playerid][pMechanicSkill] >= 100)
				    {
   						if(MetalsHolding[playerid] >= 2)
				        {
						AddVehicleComponent(vid,1098);
						MetalsHolding[playerid] = MetalsHolding[playerid] - 2;
						}
						else
						{
						SendClientMessage(playerid,COLOR_GREY,"* You dont have metals for tuning vehicles, get some in port!");
						return 1;
						}
					}
					else
					{
					SendClientMessage(playerid,COLOR_GREY,"* Your mechanic level should be higher then 3!");
					return 1;
					}
				}
				else if(strcmp(x_cmp,"10",true) == 0)
				{
    				if(PlayerInfo[playerid][pMechanicSkill] >= 150)
				    {
    					if(MetalsHolding[playerid] >= 2)
				        {
						AddVehicleComponent(vid,1009);
						MetalsHolding[playerid] = MetalsHolding[playerid] - 2;
						}
						else
						{
						SendClientMessage(playerid,COLOR_GREY,"* You dont have metals for tuning vehicles, get some in port!");
						return 1;
						}
					}
					else
					{
					SendClientMessage(playerid,COLOR_GREY,"* Your mechanic level should be higher then 4!");
					return 1;
					}
				}
				else if(strcmp(x_cmp,"11",true) == 0)
				{
    				if(PlayerInfo[playerid][pMechanicSkill] >= 150)
				    {
    					if(MetalsHolding[playerid] >= 2)
				        {
						AddVehicleComponent(vid,1008);
						MetalsHolding[playerid] = MetalsHolding[playerid] - 2;
						}
						else
						{
						SendClientMessage(playerid,COLOR_GREY,"* You dont have metals for tuning vehicles, get some in port!");
						return 1;
						}
					}
					else
					{
					SendClientMessage(playerid,COLOR_GREY,"* Your mechanic level should be higher then 4!");
					return 1;
					}
				}
				else if(strcmp(x_cmp,"12",true) == 0)
				{
    				if(PlayerInfo[playerid][pMechanicSkill] >= 150)
				    {
    					if(MetalsHolding[playerid] >= 3)
				        {
						AddVehicleComponent(vid,1010);
						MetalsHolding[playerid] = MetalsHolding[playerid] - 3;
						}
						else
						{
						SendClientMessage(playerid,COLOR_GREY,"* You dont have metals for tuning vehicles, get some in port!");
						return 1;
						}
					}
					else
					{
					SendClientMessage(playerid,COLOR_GREY,"* Your mechanic level should be higher then 4!");
					return 1;
					}
				}
				else if(strcmp(x_cmp,"13",true) == 0)
				{
    				if(PlayerInfo[playerid][pMechanicSkill] >= 150)
				    {
    					if(MetalsHolding[playerid] >= 3)
				        {
						AddVehicleComponent(vid,1087);
						MetalsHolding[playerid] = MetalsHolding[playerid] - 3;
						}
						else
						{
						SendClientMessage(playerid,COLOR_GREY,"* You dont have metals for tuning vehicles, get some in port!");
						return 1;
						}
					}
					else
					{
					SendClientMessage(playerid,COLOR_GREY,"* Your mechanic level should be higher then 4!");
					return 1;
					}
				}
				else if(strcmp(x_cmp,"14",true) == 0)
				{
    				if(PlayerInfo[playerid][pMechanicSkill] >= 150)
				    {
    					if(MetalsHolding[playerid] >= 1)
				        {
						AddVehicleComponent(vid,1086);
						MetalsHolding[playerid] = MetalsHolding[playerid] - 1;
						}
						else
						{
						SendClientMessage(playerid,COLOR_GREY,"* You dont have metals for tuning vehicles, get some in port!");
						return 1;
						}
					}
					else
					{
					SendClientMessage(playerid,COLOR_GREY,"* Your mechanic level should be higher then 4!");
					return 1;
					}
				}
				else if(strcmp(x_cmp,"15",true) == 0)
				{
    				if(PlayerInfo[playerid][pMechanicSkill] >= 150)
				    {
    					if(MetalsHolding[playerid] >= 1)
				        {
						AddVehicleComponent(vid,1083);
						MetalsHolding[playerid] = MetalsHolding[playerid] - 1;
						}
						else
						{
						SendClientMessage(playerid,COLOR_GREY,"* You dont have metals for tuning vehicles, get some in port!");
						return 1;
						}
					}
					else
					{
					SendClientMessage(playerid,COLOR_GREY,"* Your mechanic level should be higher then 4!");
					return 1;
					}
				}
				else if(strcmp(x_cmp,"16",true) == 0)
				{
    				if(PlayerInfo[playerid][pMechanicSkill] >= 150)
				    {
    					if(MetalsHolding[playerid] >= 1)
				        {
						AddVehicleComponent(vid,1084);
						MetalsHolding[playerid] = MetalsHolding[playerid] - 1;
						}
						else
						{
						SendClientMessage(playerid,COLOR_GREY,"* You dont have metals for tuning vehicles, get some in port!");
						return 1;
						}
					}
					else
					{
					SendClientMessage(playerid,COLOR_GREY,"* Your mechanic level should be higher then 4!");
					return 1;
					}
				}
				else if(strcmp(x_cmp,"17",true) == 0)
				{
    				if(PlayerInfo[playerid][pMechanicSkill] >= 100)
				    {
    					if(MetalsHolding[playerid] >= 2)
				        {
						AddVehicleComponent(vid,1084);
						MetalsHolding[playerid] = MetalsHolding[playerid] - 1;
						}
						else
						{
						SendClientMessage(playerid,COLOR_GREY,"* You dont have metals for tuning vehicles, get some in port!");
						return 1;
						}
					}
					else
					{
					SendClientMessage(playerid,COLOR_GREY,"* Your mechanic level should be higher then 4!");
					return 1;
					}
				}
				else
				{
			 	SendClientMessage(playerid,COLOR_GREY,"* Invalid component name!");
			 	}
				if(ProxDetectorS(5.0, playerid, giveplayerid))
				{
					ConsumingMoney[playerid] = 1;
					GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
					GetPlayerName(playerid, sendername, sizeof(sendername));
					format(string, sizeof(string), "* You sold %s, a %s.", giveplayer,x_cmp);
					PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
					SendClientMessage(playerid, COLOR_WHITE, string);
					format(string, sizeof(string), "* You bought %s by Mechanic %s.",x_cmp,playerid);
					SendClientMessage(giveplayerid, COLOR_WHITE, string);
					PlayerPlaySound(giveplayerid, 1052, 0.0, 0.0, 0.0);
					PlayerInfo[playerid][pMechanicSkill]++;
	        		new level = PlayerInfo[playerid][pMechanicSkill];
				 	if(level == 50) { SendClientMessage(playerid, COLOR_YELLOW, "Your Mechanic Skill Level = 2."); format(string, sizeof(string), "You need to sell components %d times more to Level up.", 100 - level); SendClientMessage(playerid, COLOR_YELLOW, string); }
                    else if(level == 100) { SendClientMessage(playerid, COLOR_YELLOW, "Your Mechanic Skill Level = 3."); format(string, sizeof(string), "You need to sell components %d times more to Level up.", 100 - level); SendClientMessage(playerid, COLOR_YELLOW, string); }
					else if(level == 150) { SendClientMessage(playerid, COLOR_YELLOW, "Your Mechanic Skill Level = 4."); format(string, sizeof(string), "You need to sell components %d times more to Level up.", 150 - level); SendClientMessage(playerid, COLOR_YELLOW, string); }
     				else if(level == 200) { SendClientMessage(playerid, COLOR_YELLOW, "Your Mechanic Skill Level = 5."); format(string, sizeof(string), "You need to sell components %d times more to Level up.", 150 - level); SendClientMessage(playerid, COLOR_YELLOW, string); }
					format(string, sizeof(string), "* %s takes out tools and instel component on %s's car.", sendername, giveplayer);
					ProxDetector(30.0, playerid, string, COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM);
				}
				else
				{
					SendClientMessage(playerid, COLOR_GREY, "* Your too far away.");
					return 1;
				}
			}
			else
			{
				format(string, sizeof(string), "* %d is not an active player.", giveplayerid);
				SendClientMessage(playerid, COLOR_GREY, string);
			}
		}
		return 1;
	}
	
	if(strcmp(cmd, "/refill", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
		    if(PlayerInfo[playerid][pJob] != 9)
		    {
		        SendClientMessage(playerid, COLOR_GREY, "* You are not a Car Mechanic!");
		        return 1;
		    }
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_WHITE, "USAGE: /refill [playerid] [price]");
				return 1;
			}
			new playa;
			new money;
			playa = strval(tmp);
			tmp = strtok(cmdtext, idx);
			money = strval(tmp);
			if(money < 1 || money > 2000) { SendClientMessage(playerid, COLOR_GREY, "* Price not lower then 1, or above 2000!"); return 1; }
			if(IsPlayerConnected(playa))
			{
			    if(playa != INVALID_PLAYER_ID)
			    {
			        if(ProxDetectorS(6.0, playerid, playa)&& IsPlayerInAnyVehicle(playa))
					{
					    if(playa == playerid) { SendClientMessage(playerid, COLOR_GREY, "* You can't refill your own car!"); return 1; }
					    GetPlayerName(playa, giveplayer, sizeof(giveplayer));
						GetPlayerName(playerid, sendername, sizeof(sendername));
					    format(string, sizeof(string), "* You offerd %s to refill his car for $%d .",giveplayer,money);
						SendClientMessage(playerid, COLOR_WHITE, string);
						format(string, sizeof(string), "* Mechanic %s wants to refill your car for $%d, (type /accept refill) to accept.",sendername,money);
						SendClientMessage(playa, COLOR_WHITE, string);
						RefillOffer[playa] = playerid;
						RefillPrice[playa] = money;
					}
					else
					{
					    SendClientMessage(playerid, COLOR_GREY, "*  That player is not near you or not in a car.");
					}
				}
			}
			else
			{
			    SendClientMessage(playerid, COLOR_GREY, "* That player is offline.");
			}
		}
		return 1;
	}

	if(strcmp(cmd, "/repair", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
		    if(PlayerInfo[playerid][pJob] != 9) { SendClientMessage(playerid, COLOR_GREY, "* You are not a Car Mechanic!"); return 1; }
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, "USAGE: /repair [playerid] [price]"); return 1; }
			new playa;
			new money;
			playa = strval(tmp);
			tmp = strtok(cmdtext, idx);
			money = strval(tmp);
			if(money <= 1 || money >= 5000) { SendClientMessage(playerid, COLOR_GREY,"* Price not lower then 1, or above 5000!"); return 1; }
			if(IsPlayerConnected(playa))
			{
			    if(playa != INVALID_PLAYER_ID)
			    {
			        if(ProxDetectorS(6.0, playerid, playa))
					{
						if(IsPlayerInAnyVehicle(playa))
						{
					    if(playa == playerid) { SendClientMessage(playerid, COLOR_GREY, "* You can't repair your own car!"); return 1; }
				    	GetPlayerName(playa, giveplayer, sizeof(giveplayer));
						GetPlayerName(playerid, sendername, sizeof(sendername));
					    format(string, sizeof(string), "* You offerd %s to fix his car for $%d .",giveplayer,money);
						SendClientMessage(playerid, COLOR_WHITE, string);
						format(string, sizeof(string), "* Mechanic %s offerd you to fix your car for $%d, (type /accept repair) to accept.",sendername,money);
						SendClientMessage(playa, COLOR_WHITE, string);
						RepairOffer[playa] = playerid;
						RepairPrice[playa] = money;
						}
						else { SendClientMessage(playerid, COLOR_GREY, "* That player is not in a car!"); }
					}
					else { SendClientMessage(playerid, COLOR_GREY, "* That player is not near you!"); }
				}
			}
			else {SendClientMessage(playerid, COLOR_GREY, "* That player is offline."); }
		}
		return 1;
	}
	
	if(strcmp(cmd, "/heal", true) == 0)
	{
		if(PlayerInfo[playerid][pJob] == 2)
		{
		    if(IsPlayerConnected(playerid))
		    {
				tmp = strtok(cmdtext, idx);
				if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, "USAGE: /heal [playerid] [price]"); return 1; }
		        giveplayerid = strval(tmp);
				tmp = strtok(cmdtext, idx);
				if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, "USAGE: /heal [playerid] [price]"); return 1; }
				if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_WHITE, "* You cannot heal Yourself!!"); return 1; }
				moneys = strval(tmp);
				if(moneys < 1 || moneys > 500) { SendClientMessage(playerid, COLOR_WHITE, "* Price must be above 1$ and below 500$."); return 1; }
				if (IsPlayerConnected(giveplayerid))
				{
				    if(giveplayerid != INVALID_PLAYER_ID)
				    {
						if (ProxDetectorS(5.0, playerid, giveplayerid))
						{
							new ambugive = GetPlayerVehicleID(giveplayerid);
							new ambuplayer = GetPlayerVehicleID(playerid);
							if (IsAAmbCar(ambuplayer) && ambuplayer == ambugive)
							{
                            	GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
								GetPlayerName(playerid, sendername, sizeof(sendername));
							    format(string, sizeof(string), "* You offerd %s a medic attention for $%d .",giveplayer,moneys);
								SendClientMessage(playerid, COLOR_WHITE, string);
								format(string, sizeof(string), "* Medic %s offerd you medic attention for $%d, (type /accept heal) to accept.",sendername,moneys);
								SendClientMessage(giveplayerid, COLOR_WHITE, string);
								HealOffer[giveplayerid] = playerid;
								HealPrice[giveplayerid] = moneys;
							}
							else
							{
							SendClientMessage(playerid,COLOR_WHITE,"");
							}
						}
						else
						{
						SendClientMessage(playerid, COLOR_WHITE, "* Your too far away, get closer, get closer.");
						}
	 				}
	 				else
	 				{
					format(string, sizeof(string), "* %d is not an active player.", giveplayerid);
					SendClientMessage(playerid, COLOR_WHITE, string);
					}
				}
			}
		}
	}

	if(strcmp(cmd, "/take", true) == 0)
	{
		new x_job[256];
		x_job = strtok(cmdtext, idx);

		if(!strlen(x_job))
		{
			SendClientMessage(playerid, COLOR_WHITE, "Avilable Words, pizza, icecream, painkiller, Metals");
			if(PlayerInfo[playerid][pPolice] >= 1 || PlayerInfo[playerid][pInstructor] >= 1) { SendClientMessage(playerid, COLOR_WHITE, "Avilable Words, DrivingLicense, GunLicense, Weapons, Materials"); }
			return 1;
		}
		if(strcmp(x_job,"DrivingLicense",true) == 0)
		{
		    tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_WHITE, "USAGE: /take DrivingLicense [playerid]");
				return 1;
			}
			giveplayerid = strval(tmp);
			if(IsPlayerConnected(giveplayerid))
			{
			    if(giveplayerid != INVALID_PLAYER_ID)
			    {
			        if (ProxDetectorS(8.0, playerid, giveplayerid))
					{
					    if(PlayerInfo[playerid][pPolice] >= 1 || PlayerInfo[playerid][pInstructor] >= 1)
					    {
					        format(string, sizeof(string), "* Your driver license has been revoked by %s", giveplayer);
					        SendClientMessage(playerid, COLOR_WHITE, string);
					        format(string, sizeof(string), "* Officer %s has revoked your Driving License.", sendername);
					        SendClientMessage(giveplayerid, COLOR_WHITE, string);
					        PlayerInfo[giveplayerid][pCarLic] = 0;
				        }
				        else { SendClientMessage(playerid, COLOR_GREY, "* You are not a Cop/Instructor!"); return 1; }
					}
					else { SendClientMessage(playerid, COLOR_GREY, "* That player is not near you!"); return 1; }
		 		}
			}
			else
			{
		    SendClientMessage(playerid, COLOR_GREY, "* That player is Offline !");
			return 1;
			}
		}
		
		else if(strcmp(x_job,"GunLicense",true) == 0)
		{
		    tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_WHITE, "USAGE: /take gunlicense [playerid]");
				return 1;
			}
			giveplayerid = strval(tmp);
			if(IsPlayerConnected(giveplayerid))
			{
			    if(giveplayerid != INVALID_PLAYER_ID)
			    {
			        if (ProxDetectorS(8.0, playerid, giveplayerid))
					{
				        format(string, sizeof(string), "* Your gun license has been revoked by %s", giveplayer);
				        SendClientMessage(playerid, COLOR_WHITE, string);
				        format(string, sizeof(string), "* Officer %s has revoked your gun License.", sendername);
				        SendClientMessage(giveplayerid, COLOR_WHITE, string);
				        PlayerInfo[giveplayerid][pGunLic] = 0;
					}
					else
					{
				    SendClientMessage(playerid, COLOR_GREY, "* That player is not near you!");
				    return 1;
					}
  				}
			}
			else
			{
		    SendClientMessage(playerid, COLOR_GREY, "* That player is Offline !");
			return 1;
			}
		}


		else if(strcmp(x_job,"saillicense",true) == 0)
		{
		    tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_WHITE, "USAGE: /take saillicense [playerid]");
				return 1;
			}

			giveplayerid = strval(tmp);
			if(IsPlayerConnected(giveplayerid))
			{
			    if(giveplayerid != INVALID_PLAYER_ID)
			    {
			        if (ProxDetectorS(8.0, playerid, giveplayerid))
					{
				        format(string, sizeof(string), "* Your sailing license has been revoked by %s", giveplayer);
				        SendClientMessage(playerid, COLOR_WHITE, string);
				        format(string, sizeof(string), "* Officer %s has revoked your sailing License.", sendername);
				        SendClientMessage(giveplayerid, COLOR_WHITE, string);
				        PlayerInfo[giveplayerid][pSailLic] = 0;
					}
					else
					{
				    SendClientMessage(playerid, COLOR_GREY, "* That player is not near you!");
				    return 1;
				    }
				}
			}
			else
			{
		    SendClientMessage(playerid, COLOR_GREY, "* That player is Offline !");
			return 1;
			}
		}
		
		else if(strcmp(x_job,"Weapons",true) == 0)
		{
  			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
			SendClientMessage(playerid, COLOR_WHITE, "USAGE: /take weapons [playerid]");
			return 1;
			}
			if(PlayerInfo[playerid][pPolice] == 0)
			{
				SendClientMessage(playerid, COLOR_GREY, "* You are not a Cop!");
				return 1;
			}
			giveplayerid = strval(tmp);
			if(IsPlayerConnected(giveplayerid))
			{
   				if(giveplayerid != INVALID_PLAYER_ID)
			    {
       				if (ProxDetectorS(6.0, playerid, giveplayerid))
					{
     					format(string, sizeof(string), "* You have taken away %s's Weapons.", giveplayer);
				        SendClientMessage(playerid, COLOR_WHITE, string);
				        format(string, sizeof(string), "* Officer %s has taken away your Weapons.", sendername);
				        SendClientMessage(giveplayerid, COLOR_WHITE, string);
				        ResetPlayerWeapons(giveplayerid);
		        	}
			        else
					{
	    				SendClientMessage(playerid, COLOR_GREY, "* That player is not near you !");
					    return 1;
					}
	    		}
			}
			else
			{
   				SendClientMessage(playerid, COLOR_GREY, "* That player is Offline !");
			    return 1;
			}
		}
		
		else if(strcmp(x_job,"materials",true) == 0)
		{
		tmp = strtok(cmdtext, idx);
		if(!strlen(tmp))
		{
			SendClientMessage(playerid, COLOR_WHITE, "USAGE: /take materials [playerid]");
			return 1;
		}
		if(PlayerInfo[playerid][pPolice] == 0)
		{
			SendClientMessage(playerid, COLOR_GREY, "* You are not a Cop!");
			return 1;
		}
		giveplayerid = strval(tmp);
		if(IsPlayerConnected(giveplayerid))
		{
			if(giveplayerid != INVALID_PLAYER_ID)
			{
				if (ProxDetectorS(8.0, playerid, giveplayerid))
				{
					format(string, sizeof(string), "* You have taken away %s's Materials.", giveplayer);
  					SendClientMessage(playerid, COLOR_WHITE, string);
       				format(string, sizeof(string), "* Officer %s has taken away your Materials.", sendername);
			        SendClientMessage(giveplayerid, COLOR_WHITE, string);
			        PlayerInfo[giveplayerid][pMaterials] = 0;
				}
				else
				{
					SendClientMessage(playerid, COLOR_GREY, "* That player is not near you !");
				    return 1;
				}
  			}
		}
			else
			{
   				SendClientMessage(playerid, COLOR_GREY, "* That player is Offline !");
			    return 1;
			}
		}
		
		else if(strcmp(x_job,"metals",true) == 0)
		{
			if(
			IsPlayerInSphere(playerid,2785.6238,-2410.8291,13.6342,3)
			||IsPlayerInSphere(playerid,2785.5095,-2425.2878,13.6342,3)
			||IsPlayerInSphere(playerid,2793.6167,-2426.0466,13.6322,3)
			||IsPlayerInSphere(playerid,2793.5530,-2409.6770,13.6323,3)
			) // Parts For Mechanics
   			{
      			tmp = strtok(cmdtext, idx);
	        	if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, "USAGE: /take metals [ammount]"); return 1; }
				moneys = strval(tmp);
				if(moneys < 1 || moneys > 30) { SendClientMessage(playerid, COLOR_GREY, "Metals amount should be between 1 to 30!"); return 1; }
				new matsprice = moneys * 255;
				if(GetPlayerMoney(playerid) > matsprice)
				{
				    format(string, sizeof(string), "* You bought %d Metals (Cost:$%d).", moneys, matsprice);
				    SendClientMessage(playerid, COLOR_WHITE, string);
				    GivePlayerMoney(playerid, - matsprice);
				    MetalsHolding[playerid] = MetalsHolding[playerid] + moneys;
				}
				else
				{
				    format(string, sizeof(string), "* You can't afford the $%d !", matsprice);
				    SendClientMessage(playerid, COLOR_GREY, string);
				}
		    }
		    else
		    {
		        SendClientMessage(playerid, COLOR_GREY,"You must be in Los Santos Port to get metals!");
		        return 1;
		    }
		}
		
		else if(strcmp(x_job,"painkiller",true) == 0)
		{
			if(PlayerInfo[playerid][pJob] == 2)
			{
				if(IsAAmbCar(vid))
				{
				    if(PlayerInfo[playerid][pPainKillers] <= 9)
				    {
						PlayerInfo[playerid][pPainKillers] = PlayerInfo[playerid][pPainKillers] +1;
	     				format(string, sizeof(string), "* You have toke 1 more painkillers,you got %d Painkillers",PlayerInfo[playerid][pPainKillers]);
                        ApplyAnimation(giveplayerid,"PED","DAM_stomach_frmRT",4.0,0,1,0,0,0);
						SendClientMessage(playerid,COLOR_WHITE,string);
					}
					else { SendClientMessage(playerid,COLOR_WHITE,"* You can't carry more then 10 painkillers"); }
				}
				else { SendClientMessage(playerid,COLOR_WHITE,"* You should be in the ambulance in order to use this command"); }
			}
		}
		
		else if(strcmp(x_job,"pizza",true) == 0)
		{
			if(PlayerInfo[playerid][pJob] == 4)
			{
				if(IsPlayerInSphere(playerid,203.2578,-183.0827,1.5781,2))
				{
    				if(pizzas[playerid] == 0)
				    {
				    SendClientMessage(playerid,COLOR_GREY,"You have toke more pizza's from pizzeria");
					pizzas[playerid] = pizzas[playerid] +4;
     				format(string, sizeof(string), "* You have toke more pizza's from pizzeria,you got %d pizza's",pizzas[playerid]);
					SendClientMessage(playerid,COLOR_WHITE,string);
					}
				}
			}
		}
		
	 	else if(strcmp(x_job,"icecream",true) == 0)
		{
			if(PlayerInfo[playerid][pJob] == 7)
			{
				if(spot[playerid] == SPOT_ICECREAMGET)
				{
		 			icecreamunit[playerid] = icecreamunit[playerid] +5;
                    format(string, sizeof(string), "* You bought another 5 units, you got %d icecreams",icecreamunit[playerid]);
					SendClientMessage(playerid,COLOR_WHITE,string);
					GivePlayerMoney(playerid,-icecreamunit[playerid]*2);
				}
			}
		}
		return 1;
	}
				
	if(strcmp(cmd, "/deliverp", true) == 0)
	{
		new x_job[256];
		x_job = strtok(cmdtext, idx);
		
		if(!strlen(x_job))
		{
			SendClientMessage(playerid, COLOR_WHITE, "Avilable Words, /Deliverp [on]/[off]");
			return 1;
		}
		
		if(PlayerInfo[playerid][pJob] == 4)
		{
			if(PlayerInfo[playerid][pDelivery] == 0)
			{
				if(strcmp(x_job,"on",true) == 0)
				{
				SendClientMessage(playerid,COLOR_GREY,"You delivery pizza track has been Started!!");
				PlayerInfo[playerid][pDelivery] = 4;
				RemovePlayerFromVehicle(playerid);
				GameTextForPlayer(playerid,"~w~now get back to the pizza bike",2570,4);
				}

				if(strcmp(x_job,"off",true) == 0 && PlayerInfo[playerid][pDelivery] == 4)
				{
				DisablePlayerCheckpoint(playerid);
				PlayerInfo[playerid][pDelivery] = 0;
				SendClientMessage(playerid,COLOR_GREY,"You delivery pizza track has been Finish!!");
				SendClientMessage(playerid,COLOR_GREY,"You can sell a pizza for client's in game Now.");
				}
			}
		}
		else
		{
		SendClientMessage(playerid,COLOR_GREY,"Commands uses for pizza workers Only!");
		}
	}

	if(strcmp(cmd, "/sell", true) == 0)
	{
		new x_job[256];
		x_job = strtok(cmdtext, idx);
		if(!strlen(x_job))
		{
			SendClientMessage(playerid, COLOR_WHITE, "|Sell Able Things");
			SendClientMessage(playerid, COLOR_WHITE, "USAGE: sell [name]");
			SendClientMessage(playerid, COLOR_GREY, "Available names: Drink, Pizza, Icecream, PainKiller");
			return 1;
		}
		
  		if(strcmp(x_job,"painkiller",true) == 0)
        {
            if(PlayerInfo[playerid][pJob] == 2)
            {
				if(IsPlayerConnected(playerid))
 				{
				tmp = strtok(cmdtext, idx);
				if(!strlen(tmp)){ SendClientMessage(playerid, COLOR_WHITE, "USAGE: /sell painkiller [playerid] [price]"); return 1; }
				giveplayerid = strval(tmp);
				tmp = strtok(cmdtext, idx);
				if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, "USAGE: /sell painkiller [playerid] [price]"); return 1; }
				if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_WHITE, "* You cannot sell a painkiller to Yourself!!"); return 1; }
				moneys = strval(tmp);
				if(moneys <= 1 || moneys >= 80) { SendClientMessage(playerid, COLOR_WHITE, "* painkiller price must be between 1 to 80"); return 1; }
				if (IsPlayerConnected(giveplayerid))
				{
					if(giveplayerid != INVALID_PLAYER_ID)
    				{
						if(PlayerInfo[playerid][pPainKillers] > 1) // change to pain killers in
						{
							if (ProxDetectorS(6.0, playerid, giveplayerid))
							{
								GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
								GetPlayerName(playerid, sendername, sizeof(sendername));
							    format(string, sizeof(string), "* You offerd painkiller to %s for $%d .",giveplayer,moneys);
								SendClientMessage(playerid, COLOR_WHITE, string);
								format(string, sizeof(string), "* %s has offerd you painkiller for $%d, (type /accept painkiller) to accept.",sendername,moneys);
								SendClientMessage(giveplayerid, COLOR_WHITE, string);
	         					PainKillerOffer[giveplayerid] = playerid;
								PainKillerPrice[giveplayerid] = moneys;
							}
							else { SendClientMessage(playerid, COLOR_WHITE, "* Your too far away, get closer."); }
						}
						else { SendClientMessage(playerid, COLOR_WHITE, "* You dont have painkillers, go to the ambulance and take some."); }
    				}
    				else { format(string, sizeof(string), "* %d is not an active player.", giveplayerid); SendClientMessage(playerid, COLOR_WHITE, string); }
					}
				}
			}
			else { SendClientMessage(playerid,COLOR_WHITE,"* Only paramedics can use this command!"); }
		}

  		else if(strcmp(x_job,"icecream",true) == 0)
        {
            if(PlayerInfo[playerid][pJob] == 7)
            {
				if(IsPlayerConnected(playerid))
 				{
				tmp = strtok(cmdtext, idx);
				if(!strlen(tmp)){ SendClientMessage(playerid, COLOR_WHITE, "USAGE: /sell icecream [playerid] [price]"); return 1; }
				giveplayerid = strval(tmp);
				tmp = strtok(cmdtext, idx);
				if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, "USAGE: /sell icecream [playerid] [price]"); return 1; }
				if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_WHITE, "* You cannot sell a icecream to Yourself!!"); return 1; }
				moneys = strval(tmp);
				if(moneys < 5 || moneys > 20) { SendClientMessage(playerid, COLOR_WHITE, "* Icecream price must be between 5 to 20"); return 1; }
				if (IsPlayerConnected(giveplayerid))
				{
					if(giveplayerid != INVALID_PLAYER_ID)
    				{
						if(vid >= 202 && vid <= 205 || vid == 158 || vid == 159)
						{
							if (ProxDetectorS(6.0, playerid, giveplayerid))
							{
							    if(icecreamunit[playerid] > 0)
							    {
									GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
									GetPlayerName(playerid, sendername, sizeof(sendername));
								    format(string, sizeof(string), "* You offerd icecream to %s for $%d .",giveplayer,moneys);
									SendClientMessage(playerid, COLOR_WHITE, string);
									format(string, sizeof(string), "* %s has offerd you icecream for $%d, (type /accept icecream) to accept.",sendername,moneys);
									SendClientMessage(giveplayerid, COLOR_WHITE, string);
	         						IcecreamOffer[giveplayerid] = playerid;
									IcecreamPrice[giveplayerid] = moneys;
								}
								else
								{
								SendClientMessage(playerid,COLOR_GREY,"* You dont have any more ice creams, go to the sprunk factory and buy some");
								}
							}
							else
							{
							SendClientMessage(playerid, COLOR_WHITE, "* Your too far away, get closer.");
							}
						}
						else
						{
						SendClientMessage(playerid, COLOR_WHITE, "* You must be in a icecream vehicle before you can sell icecream's");
						}
    				}
    				else
    				{
					format(string, sizeof(string), "* %d is not an active player.", giveplayerid);
					SendClientMessage(playerid, COLOR_WHITE, string);
    				}
					}
				}
			}
		}
				
					
  		else if(strcmp(x_job,"pizza",true) == 0)
        {
            if(PlayerInfo[playerid][pJob] == 4)
            {
				if(PlayerInfo[playerid][pDelivery] != 4)
				{
	  				if(IsPlayerConnected(playerid))
	    			{
					tmp = strtok(cmdtext, idx);
					if(!strlen(tmp)){ SendClientMessage(playerid, COLOR_WHITE, "USAGE: /sell pizza [playerid] [price]"); return 1; }
					giveplayerid = strval(tmp);
					tmp = strtok(cmdtext, idx);
					if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, "USAGE: /sell pizza [playerid] [price]"); return 1; }
					if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_WHITE, "* You cannot sell a pizza to Yourself!!"); return 1; }
					moneys = strval(tmp);
					if(moneys < 5 || moneys > 20) { SendClientMessage(playerid, COLOR_WHITE, "* Pizza price must be between 5 to 20"); return 1; }
					if (IsPlayerConnected(giveplayerid))
					{
	    				if(giveplayerid != INVALID_PLAYER_ID)
					    {
							if(vid >= 3 && vid <= 6)
							{
								if (ProxDetectorS(4.0, playerid, giveplayerid))
								{
								    if(pizzas[playerid] >= 1)
								    {
										GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
										GetPlayerName(playerid, sendername, sizeof(sendername));
									    format(string, sizeof(string), "* You offerd a pizza to %s for $%d .",giveplayer,moneys);
										SendClientMessage(playerid, COLOR_WHITE, string);
										format(string, sizeof(string), "* %s has offerd you pizza for $%d, (type /accept pizza) to accept.",sendername,moneys);
										SendClientMessage(giveplayerid, COLOR_WHITE, string);
			 							PizzaOffer[giveplayerid] = playerid;
										PizzaPrice[giveplayerid] = moneys;
									}
									else
									{
									SendClientMessage(playerid, COLOR_WHITE, "* Your bike tray is empty, get back to the pizzeria and take more.");
									SendClientMessage(playerid, COLOR_WHITE, "* In oreder to take another four pizza's type /take pizza.");
									}
								}
								else
								{
									SendClientMessage(playerid, COLOR_WHITE, "* Your too far away, get closer.");
								}
							}
							else
							{
							    SendClientMessage(playerid, COLOR_WHITE, "* You must be in a pizza bike before you can sell Pizza's");
							}
                  		}
					}//invalid id
				}
					else
					{
					format(string, sizeof(string), "* %d is not an active player.", giveplayerid);
					SendClientMessage(playerid, COLOR_WHITE, string);
					}
				}
				else
				{
				SendClientMessage(playerid,COLOR_GREY,"First finish your track mission by typing /deliverp off");
				}
			}
		}
		
        else if(strcmp(x_job,"drink",true) == 0)
        {
            if(PlayerInfo[playerid][pJob] == 1)
            {
	            if(IsPlayerInSphere(playerid,-224.7806,1404.9803,27.7734,8) && IsPlayerInSphere(giveplayerid,-224.7806,1404.9803,27.7734,8) || IsPlayerInSphere(playerid,501.7094,-20.5087,1000.6797,8) && IsPlayerInSphere(giveplayerid,501.7094,-20.5087,1000.6797,8))
				{
				    if(IsPlayerConnected(playerid))
				    {
					tmp = strtok(cmdtext, idx);
					if(!strlen(tmp))
					{
						SendClientMessage(playerid, COLOR_WHITE, "USAGE: /sell drink [playerid] [drink]");
						return 1;
					}
					giveplayerid = strval(tmp);
					tmp = strtok(cmdtext, idx);
					if(!strlen(tmp))
					{
						SendClientMessage(playerid, COLOR_WHITE, "USAGE: /sell drink [playerid] [drink]");
						return 1;
					}
					if(giveplayerid == playerid)
					{
						SendClientMessage(playerid, COLOR_WHITE, "* You cannot sell a drink to Yourself!!");
						return 1;
					}
					moneys = strval(tmp);
                    if(moneys < 1 || moneys > 20)
					{
					    SendClientMessage(playerid, COLOR_WHITE, "* Money must be between 1 to 20!!");
					    return 1;
					}
					if (IsPlayerConnected(giveplayerid))
					{
					    if(giveplayerid != INVALID_PLAYER_ID)
					    {
							if (ProxDetectorS(4.0, playerid, giveplayerid))
							{
								GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
								GetPlayerName(playerid, sendername, sizeof(sendername));
							    format(string, sizeof(string), "* You offerd a drink to %s for $%d .",giveplayer,moneys);
								SendClientMessage(playerid, COLOR_WHITE, string);
								format(string, sizeof(string), "* Barman %s has offerd you drink for $%d, (type /accept drink) to accept.",sendername,moneys);
								SendClientMessage(giveplayerid, COLOR_WHITE, string);
	 							DrinkOffer[giveplayerid] = playerid;
								DrinkPrice[giveplayerid] = moneys;
								ApplyAnimation(giveplayerid,"BAR","Barcustom_order",4.0,0,1,1,0,0);
							}
							else
							{
								SendClientMessage(playerid, COLOR_WHITE, "* Your too far away, get closer.");
							}
						}//invalid id
					}
					else
					{
						format(string, sizeof(string), "* %d is not an active player.", giveplayerid);
						SendClientMessage(playerid, COLOR_WHITE, string);
					}
				}
			}
			}
		}
		return 1;
	}
// ---------------------------------[ Phone Commands] ------------------------------------------

	if(strcmp(cmd, "/call", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
		{
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_WHITE, "USAGE: /call [phonenumber]");
				return 1;
			}
			GetPlayerName(playerid, sendername, sizeof(sendername));
			format(string, sizeof(string), "* %s takes out a cellphone.", sendername);
			ProxDetector(30.0, playerid, string, COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM);
			new phonenumb = strval(tmp);
			if(phonenumb == PlayerInfo[playerid][pPhonenumber])
			{
				SendClientMessage(playerid, COLOR_WHITE, "* You just get a busy tone...");
				return 1;
			}
			if(Mobile[playerid] != 255)
			{
				SendClientMessage(playerid, COLOR_GREY, "* You are already talking in phone...");
				return 1;
			}
			for(new i = 0; i < MAX_PLAYERS; i++)
			{
				if(IsPlayerConnected(i))
				{
					if(PlayerInfo[i][pPhonenumber] == phonenumb && phonenumb != 0)
					{
						giveplayerid = i;
						Mobile[playerid] = giveplayerid;
						if(IsPlayerConnected(giveplayerid))
						{
						    if(giveplayerid != INVALID_PLAYER_ID)
						    {
								if (Mobile[giveplayerid] == 255)
								{
									format(string, sizeof(string), "Your mobile is ringing, Use (/Pickup) to answer, Number: %d", PlayerInfo[giveplayerid][pPhonenumber]);
									SendClientMessage(giveplayerid, COLOR_YELLOW, string);
									GetPlayerName(giveplayerid, sendername, sizeof(sendername));
									RingTone[giveplayerid] = 10;
									format(string, sizeof(string), "* %s's phone begins to ring.", sendername);
									SendClientMessage(playerid, COLOR_WHITE, "HINT: You now use F6 to talk on your cellphone, type /hangup to hang up");
									ProxDetector(15.0, i, string, COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM);
									CellTime[playerid] = 1;
									return 1;
								}
							}
						}
					}
				}
			}
			SendClientMessage(playerid, COLOR_GREY, "* You just get a Busy tone...");
		}
		return 1;
	}
	
	if(strcmp(cmd, "/pickup", true) == 0 || strcmp(cmd, "/p", true) == 0)
	{
        if(IsPlayerConnected(playerid))
		{
			if(Mobile[playerid] != 255)
			{
				SendClientMessage(playerid, COLOR_GREY, " *Your already on a call...");
				return 1;
			}
			for(new i = 0; i < MAX_PLAYERS; i++)
			{
				if(IsPlayerConnected(i))
				{
					if(Mobile[i] == playerid)
					{
						Mobile[playerid] = i;
						SendClientMessage(i,  COLOR_WHITE, "* They Picked up the call.");
						GetPlayerName(playerid, sendername, sizeof(sendername));
						format(string, sizeof(string), "* %s answers his cellphone.", sendername);
						ProxDetector(15.0, playerid, string, COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM);
						RingTone[playerid] = 0;
					}

				}
			}
		}
		return 1;
	}
	if(strcmp(cmd, "/hangup", true) == 0 || strcmp(cmd, "/h", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
		{
			new caller = Mobile[playerid];
			if(IsPlayerConnected(caller))
			{
			    if(caller != INVALID_PLAYER_ID)
			    {
					if(caller != 255)
					{
						if(caller < 255)
						{
							SendClientMessage(caller,  COLOR_GREY, "* They hung up.");
							CellTime[caller] = 0;
							CellTime[playerid] = 0;
							SendClientMessage(playerid,  COLOR_GREY, "* You hung up.");
							Mobile[caller] = 255;
						}
						Mobile[playerid] = 255;
						CellTime[playerid] = 0;
						RingTone[playerid] = 0;
						return 1;
					}
				}
			}
		}
		return 1;
	}


// ---------------------------------[ Bank Item Commands] ------------------------------------------

	if(strcmp(cmd, "/dice", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			new dice = random(6)+1;
			if (gDice[playerid])
			{
				GetPlayerName(playerid, sendername, sizeof(sendername));
				format(string, sizeof(string), "* %s Throws a Dice on the floor that lands on number %d", sendername,dice);
				ProxDetector(5.0, playerid, string, COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM);
			}
			else
			{
				SendClientMessage(playerid, COLOR_GREY, "* You done have a dice on yorseld!");
				return 1;
			}
		}
		return 1;
	}
	
	if (strcmp(cmd, "/number", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			if (PlayerInfo[playerid][pPhoneBook] == 1)
			{
				tmp = strtok(cmdtext, idx);
				if(!strlen(tmp))
				{
					SendClientMessage(playerid, COLOR_WHITE, "USAGE: /number [playerid]");
					return 1;
				}
				giveplayerid = strval(tmp);
				if(IsPlayerConnected(giveplayerid))
				{
				    if(giveplayerid != INVALID_PLAYER_ID)
				    {
						GetPlayerName(giveplayerid, sendername, sizeof(sendername));
						format(string, 256, "Search Result: Name: %s, Phone Number: %d",sendername,PlayerInfo[giveplayerid][pPhonenumber]);
						SendClientMessage(playerid, COLOR_YELLOW, string);
					}
				}
				else
				{
					SendClientMessage(playerid, COLOR_GREY, "* Player is not online right now!");
				}
			}
			else
			{
				SendClientMessage(playerid, COLOR_GREY, "* You dont have a phonebook!");
			}
		}
		return 1;
	}
	
	if(strcmp(cmd, "/chain", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			if(Chain[playerid])
			{
			    tmp = strtok(cmdtext, idx);
				if(!strlen(tmp)) {
					SendClientMessage(playerid, COLOR_WHITE, "USAGE: /chain [Playerid]");
					return 1;
				}
				giveplayerid = strval(tmp);
			    if(IsPlayerConnected(giveplayerid))
				{
				    if(giveplayerid != INVALID_PLAYER_ID)
				    {
					    if(PlayerChained[giveplayerid])
					    {
					        SendClientMessage(playerid, COLOR_GREY, "*Player already Tied with Chain!");
					        return 1;
					    }
						if (ProxDetectorS(8.0, playerid, giveplayerid))
						{
						    if(PlayerInfo[playerid][pLevel] >= 7 || PlayerInfo[playerid][pFMember] != 0)
						    {
						    	new car = GetPlayerVehicleID(playerid);
						    	if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "You cannot Chain up yourself!"); return 1; }
						    	if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == 2 && IsPlayerInVehicle(giveplayerid, car))
						    	{
						        GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
								GetPlayerName(playerid, sendername, sizeof(sendername));
						        format(string, sizeof(string), "* You were hained up by %s, till someone relese you.", sendername);
								SendClientMessage(giveplayerid, COLOR_WHITE, string);
								format(string, sizeof(string), "* You tied %s up, till untie.", giveplayer);
								SendClientMessage(playerid, COLOR_WHITE, string);
								format(string, sizeof(string), "* %s takes out a chain and ties %s up.", sendername ,giveplayer);
								ProxDetector(30.0, playerid, string, COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM);
								GameTextForPlayer(giveplayerid, "~r~Chained", 2500, 3);
								TogglePlayerControllable(giveplayerid, 0);
								PlayerChained[giveplayerid] = true;
								Chain[playerid]=false;
						    	}
						    	else
						    	{
						        	SendClientMessage(playerid, COLOR_GREY, "* Player not in your Car, or your not the Driver!");
			        				return 1;
						    	}
							}
							else
							{
								SendClientMessage(playerid,COLOR_GREY,"* Only players with level 7+ can use tie command!!");
								return 1;
							}
						}
						else
						{
						    SendClientMessage(playerid, COLOR_GREY, "* That player is not near you !");
						    return 1;
						}
					}
				}
				else
				{
				    SendClientMessage(playerid, COLOR_GREY, "* That player is Offline !");
				    return 1;
				}
			}
			else
			{
				SendClientMessage(playerid, COLOR_GREY, "* You cannot Chain someone if you dont have a Chain!!");
			}
		}
		return 1;
	}
	
	if(strcmp(cmd, "/unchain", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			if(PlayerInfo[playerid][pCutter] == 1)
			{
		    	tmp = strtok(cmdtext, idx);
				if(!strlen(tmp)) {
					SendClientMessage(playerid, COLOR_WHITE, "USAGE: /unchain [Playerid]");
					return 1;
				}
				giveplayerid = strval(tmp);
				if(IsPlayerConnected(giveplayerid))
				{
					if(giveplayerid != INVALID_PLAYER_ID)
					{
					    if (ProxDetectorS(8.0, playerid, giveplayerid))
						{
						    if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "You cannot Untie yourself!"); return 1; }
							if(PlayerChained[giveplayerid])
							{
							    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
								GetPlayerName(playerid, sendername, sizeof(sendername));
							    format(string, sizeof(string), "* ~w~You were Untied by %s.", sendername);
								GameTextForPlayer(giveplayerid,string, 2500, 3);
								format(string, sizeof(string), "* You Untied %s.", giveplayer);
								SendClientMessage(playerid, COLOR_WHITE, string);
								TogglePlayerControllable(giveplayerid, 1);
								PlayerChained[giveplayerid] = false;
								format(string, sizeof(string), "* %s unties %s with his hands.", sendername ,giveplayer);
								ProxDetector(30.0, playerid, string, COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM);
							}
							else
							{
							    SendClientMessage(playerid, COLOR_GREY, "* That player isn't Tied up !");
							    return 1;
							}
						}
						else
						{
						    SendClientMessage(playerid, COLOR_GREY, "* That player is not near you !");
						    return 1;
						}
					}
				}
				else
				{
				    SendClientMessage(playerid, COLOR_GREY, "* That player is Offline !");
				    return 1;
				}
			}
			else
			{
			    SendClientMessage(playerid, COLOR_GREY, "* You cannot unchain someone if you dont have a cutter!!");
			    return 1;
			}
		}//not connected
		return 1;
	}

	if(strcmp(cmd, "/tie", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			if(Rope[playerid])
			{
			    tmp = strtok(cmdtext, idx);
				if(!strlen(tmp)) {
					SendClientMessage(playerid, COLOR_WHITE, "USAGE: /tie [Playerid]");
					return 1;
				}
				giveplayerid = strval(tmp);
			    if(IsPlayerConnected(giveplayerid))
				{
				    if(giveplayerid != INVALID_PLAYER_ID)
				    {
					    if(PlayerTied[giveplayerid])
					    {
					        SendClientMessage(playerid, COLOR_GREY, "*Player already Tied with rope!");
					        return 1;
					    }
						if (ProxDetectorS(8.0, playerid, giveplayerid))
						{
						    if(PlayerInfo[playerid][pLevel] >= 7 || PlayerInfo[playerid][pFMember] != 0)
						    {
						    	new car = GetPlayerVehicleID(playerid);
						    	if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "You cannot Tie up yourself!"); return 1; }
						    	if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == 2 && IsPlayerInVehicle(giveplayerid, car))
						    	{
						        GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
								GetPlayerName(playerid, sendername, sizeof(sendername));
						        format(string, sizeof(string), "* You were tied up by %s, till someone untie you.", sendername);
								SendClientMessage(giveplayerid, COLOR_WHITE, string);
								format(string, sizeof(string), "* You tied %s up, till untie.", giveplayer);
								SendClientMessage(playerid, COLOR_WHITE, string);
								format(string, sizeof(string), "* %s takes out a rope and ties %s up.", sendername ,giveplayer);
								ProxDetector(30.0, playerid, string, COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM);
								GameTextForPlayer(giveplayerid, "~r~Tied", 2500, 3);
								TogglePlayerControllable(giveplayerid, 0);
								PlayerTied[giveplayerid] = true;
								Rope[playerid]=false;
						    	}
						    	else
						    	{
						        	SendClientMessage(playerid, COLOR_GREY, "* Player not in your Car, or your not the Driver!");
			        				return 1;
						    	}
							}
							else
							{
								SendClientMessage(playerid,COLOR_GREY,"* Only players with level 7+ can use tie command!!");
								return 1;
							}
						}
						else
						{
						    SendClientMessage(playerid, COLOR_GREY, "* That player is not near you !");
						    return 1;
						}
					}
				}
				else
				{
				    SendClientMessage(playerid, COLOR_GREY, "* That player is Offline !");
				    return 1;
				}
			}
			else
			{
				SendClientMessage(playerid, COLOR_GREY, "* You cannot tie someone if you dont have a Rope!!");
			}
		}
		return 1;
	}
	
	if(strcmp(cmd, "/untie", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
	    	tmp = strtok(cmdtext, idx);
			if(!strlen(tmp)) {
				SendClientMessage(playerid, COLOR_WHITE, "USAGE: /untie [Playerid]");
				return 1;
			}
			giveplayerid = strval(tmp);
			if(IsPlayerConnected(giveplayerid))
			{
				if(giveplayerid != INVALID_PLAYER_ID)
				{
				    if (ProxDetectorS(8.0, playerid, giveplayerid))
					{
					    if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "You cannot Untie yourself!"); return 1; }
						if(PlayerTied[giveplayerid])
						{
						    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
							GetPlayerName(playerid, sendername, sizeof(sendername));
						    format(string, sizeof(string), "* ~w~You were Untied by %s.", sendername);
							GameTextForPlayer(giveplayerid,string, 2500, 3);
							format(string, sizeof(string), "* You Untied %s.", giveplayer);
							SendClientMessage(playerid, COLOR_WHITE, string);
							TogglePlayerControllable(giveplayerid, 1);
							PlayerTied[giveplayerid] = false;
							format(string, sizeof(string), "* %s unties %s with his hands.", sendername ,giveplayer);
							ProxDetector(30.0, playerid, string, COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM);
						}
						else
						{
						    SendClientMessage(playerid, COLOR_GREY, "* That player isn't Tied up !");
						    return 1;
						}
					}
					else
					{
					    SendClientMessage(playerid, COLOR_GREY, "* That player is not near you !");
					    return 1;
					}
				}
			}
			else
			{
			    SendClientMessage(playerid, COLOR_GREY, "* That player is Offline !");
			    return 1;
			}
		}//not connected
		return 1;
	}

//----------------------------------[Jobs]-----------------------------------------------

	if (strcmp("/mechanic", cmdtext, true, 10) == 0)
	{
		if(IsPlayerConnected(playerid))
	    {
	        if (spot[playerid] == SPOT_MECHANIC)
	       	{
	       	    if(PlayerInfo[playerid][pJob] == 0)
	       	    {
					if(PlayerInfo[playerid][pCivilian] == 1)
					{
						if(PlayerInfo[playerid][pPolice] == 0 || PlayerInfo[playerid][pAci] == 0)
						{
						accept_b[playerid] = ACCEPT_MECHANIC;
						SendClientMessage(playerid,COLOR_WHITE,"* in order to start this job type /accept job, or to deny /deny job.");
						}
	       			}
					else
	 	       		{
	        		SendClientMessage(playerid,COLOR_WHITE,"Garage: Only civilians can work here!");
	        		}
				}
				else
				{
	        	SendClientMessage(playerid,COLOR_GREY,"Garage: you cant work here right now,finish your job and try again later.");
				}
			}
			else
			{
			SendClientMessage(playerid,COLOR_GREY,"SERVER: Command not allowed in this location");
			}
		}
		return 1;
	}

	if (strcmp("/armsdealer", cmdtext, true, 10) == 0)
	{
		if(IsPlayerConnected(playerid))
	    {
	        if (spot[playerid] == SPOT_JOB_ARMS)
	       	{
	       	    if(PlayerInfo[playerid][pJob] == 0)
	       	    {
					if(PlayerInfo[playerid][pCivilian] == 1)
					{
						if(armsdealers <= 20)
						{
							if(PlayerInfo[playerid][pPolice] == 0 || PlayerInfo[playerid][pAci] == 0)
							{
							accept_b[playerid] = ACCEPT_ARMSDEALER;
							SendClientMessage(playerid,COLOR_WHITE,"* in order to start this job type /accept job, or to deny /deny job.");
							}
						}
						else
						{
						SendClientMessage(playerid,COLOR_WHITE,"Arms Warehouse: were sorry, but all the arms dealer slots in use this moment!");
						}
					}
					else
	 	       		{
	        		SendClientMessage(playerid,COLOR_WHITE,"Arms Warehouse: Only civilians can work here!");
	        		}
				}
				else
				{
	        	SendClientMessage(playerid,COLOR_GREY,"Arms Warehouse: you cant work here right now,finish your job and try again later.");
				}
			}
			else
			{
			SendClientMessage(playerid,COLOR_GREY,"SERVER: Command not allowed in this location");
			}
		}
		return 1;
	}


	if (strcmp("/icecream", cmdtext, true, 10) == 0)
	{
		if(IsPlayerConnected(playerid))
	    {
	        if (spot[playerid] == SPOT_ICECREAM)
	       	{
	       	    if(PlayerInfo[playerid][pJob] == 0)
	       	    {
					if(PlayerInfo[playerid][pCivilian] == 1)
					{
					    if(PlayerInfo[playerid][pCarLic] == 1)
					    {
						    if(icecreamsellers <= 6)
						    {
    							if(PlayerInfo[playerid][pPolice] == 0 || PlayerInfo[playerid][pAci] == 0)
								{
								accept_b[playerid] = ACCEPT_ICECREAM;
								SendClientMessage(playerid,COLOR_WHITE,"* in order to start this job type /accept job, or to deny /deny job.");
		        				}
							}
							else
		 	       			{
		        			SendClientMessage(playerid,COLOR_WHITE,"Icecream: were sorry, but all the icecream seller slots in use this moment");
		  					}
						}
						else
						{
						SendClientMessage(playerid,COLOR_WHITE,"You must have a driving license before you can work here.");
						}
	       			}
					else
	 	       		{
	        		SendClientMessage(playerid,COLOR_WHITE,"Icecream: Only civilians can work here!");
	        		}
				}
				else
				{
	        	SendClientMessage(playerid,COLOR_GREY,"Icecream: you cant work here right now,finish your job and try again later.");
				}
			}
			else
			{
			SendClientMessage(playerid,COLOR_GREY,"SERVER: Command not allowed in this location");
			}
		}
		return 1;
	}
	
    if (strcmp("/bus", cmdtext, true, 10) == 0)
	{
 		if(IsPlayerConnected(playerid))
	    {
	        if (spot[playerid] == SPOT_BUS)
	       	{
	       	    if(PlayerInfo[playerid][pJob] == 0)
	       	    {
					if(PlayerInfo[playerid][pCivilian] == 1)
					{
					    if(PlayerInfo[playerid][pCarLic] == 1)
					    {
							if(bus < 5)
							{
 								if(PlayerInfo[playerid][pPolice] == 0 || PlayerInfo[playerid][pAci] == 0)
								{
								accept_b[playerid] = ACCEPT_BUS;
								SendClientMessage(playerid,COLOR_WHITE,"* in order to start this job type /accept job, or to deny /deny job.");
	        					}
	        				}
	        				else
	        				{
	        				SendClientMessage(playerid,COLOR_WHITE,"Bus Station: were sorry, but all the medic slots in use this moment");
	        				}
	        			}
						else
	 	       			{
	        			SendClientMessage(playerid,COLOR_WHITE,"Bus Station: You can't work here if you dont have a driving license!");
	  					}
	       			}
					else
	 	       		{
	        		SendClientMessage(playerid,COLOR_WHITE,"Bus Station: Only civilians can work here!");
	        		}
				}
				else
				{
	        	SendClientMessage(playerid,COLOR_GREY,"Bus Station: you cant work here right now,finish your job and try again later.");
				}
			}
			else
			{
	        SendClientMessage(playerid,COLOR_GREY,"SERVER: Command not allowed in this location");
			}
		}
		return 1;
     }

	if (strcmp("/barman", cmdtext, true, 10) == 0)
	{
		if(IsPlayerConnected(playerid))
	    {
	        if (spot[playerid] == SPOT_JOB_BARMAN)
	       	{
	       	    if(PlayerInfo[playerid][pJob] == 0)
	       	    {
					if(PlayerInfo[playerid][pCivilian] == 1)
					{
					    if(barmans <= 5)
					    {
							if(PlayerInfo[playerid][pPolice] == 0 || PlayerInfo[playerid][pAci] == 0)
							{
							accept_b[playerid] = ACCEPT_BARMAN;
							SendClientMessage(playerid,COLOR_WHITE,"* in order to start this job type /accept job, or to deny /deny job.");
		        			}
						}
						else
	 	       			{
	        			SendClientMessage(playerid,COLOR_WHITE,"Drinking Bar: were sorry, but all the barman slots in use this moment");
	  					}
	       			}
					else
	 	       		{
	        		SendClientMessage(playerid,COLOR_WHITE,"Drinking Bar: Only civilians can work here!");
	        		}
				}
				else
				{
	        	SendClientMessage(playerid,COLOR_GREY,"Drinking Bar: you cant work here right now,finish your job and try again later.");
				}
			}
			else
			{
			SendClientMessage(playerid,COLOR_GREY,"SERVER: Command not allowed in this location");
			}
		}
		return 1;
	}

    if (strcmp("/medic", cmdtext, true, 10) == 0)
	{
 		if(IsPlayerConnected(playerid))
	    {
	        if (spot[playerid] == SPOT_HOSPITAL)
	       	{
	       	    if(PlayerInfo[playerid][pJob] == 0)
	       	    {
					if(PlayerInfo[playerid][pCivilian] == 1)
					{
					    if(PlayerInfo[playerid][pCarLic] == 1)
					    {
							if(medics <= 8)
							{
 								if(PlayerInfo[playerid][pPolice] == 0 || PlayerInfo[playerid][pAci] == 0)
								{
								accept_b[playerid] = ACCEPT_MEDIC;
								SendClientMessage(playerid,COLOR_WHITE,"* in order to start this job type /accept job, or to deny /deny job.");
	        					}
	        				}
	        				else
	        				{
	        				SendClientMessage(playerid,COLOR_WHITE,"Hospital: were sorry, but all the medic slots in use this moment");
	        				}
	        			}
						else
	 	       			{
	        			SendClientMessage(playerid,COLOR_WHITE,"Hospital: You can't work here if you dont have a driving license!");
	  					}
	       			}
					else
	 	       		{
	        		SendClientMessage(playerid,COLOR_WHITE,"Hospital: Only civilians can work here!");
	        		}
				}
				else
				{
	        	SendClientMessage(playerid,COLOR_GREY,"Hospital: you cant work here right now,finish your job and try again later.");
				}
			}
			else
			{
	        SendClientMessage(playerid,COLOR_GREY,"SERVER: Command not allowed in this location");
			}
		}
		return 1;
     }


	if (strcmp("/truck", cmdtext, true, 10) == 0)
	{
 		if(IsPlayerConnected(playerid))
	    {
	        if (spot[playerid] == SPOT_TRUCK)
	        {
	       	    if(PlayerInfo[playerid][pJob] == 0)
	       	    {
					if(PlayerInfo[playerid][pCivilian] == 1)
					{
					    if(PlayerInfo[playerid][pCarLic] == 1)
					    {
							if(truck <= 4)
							{
								if(PlayerInfo[playerid][pPolice] == 0 || PlayerInfo[playerid][pAci] == 0)
								{
								accept_b[playerid] = ACCEPT_TRUCKER;
								SendClientMessage(playerid,COLOR_WHITE,"* in order to start this job type /accept job, or to deny /deny job.");
								}
							}
							else
							{
							SendClientMessage(playerid,COLOR_WHITE,"Job Station: were sorry, but all the truck slots in use this moment");
							}
	        			}
						else
	 	       			{
	        			SendClientMessage(playerid,COLOR_WHITE,"Job Station: You can't work here if you dont have a driving license!");
	  					}
	       			}
					else
	 	       		{
	        		SendClientMessage(playerid,COLOR_WHITE,"Job Station: Only civilians can work here!");
	        		}
				}
				else
				{
	        	SendClientMessage(playerid,COLOR_GREY,"Job Station: you cant work here right now,finish your job and try again late.");
				}
			}
			else
			{
	        SendClientMessage(playerid,COLOR_GREY,"SERVER: Command not allowed in this location");
			}
		}
   	    return 1;
     }

	if (strcmp("/pizza", cmdtext, true, 10) == 0)
	{
 		if(IsPlayerConnected(playerid))
	    {
	        if (spot[playerid] == SPOT_PIZZA)
	        {
	       	    if(PlayerInfo[playerid][pJob] == 0)
	       	    {
					if(PlayerInfo[playerid][pCivilian] == 1)
					{
					    if(PlayerInfo[playerid][pCarLic] == 1)
					    {
					        if(pizza <= 4)
					        {
       							if(PlayerInfo[playerid][pPolice] == 0 || PlayerInfo[playerid][pAci] == 0)
								{
	        					accept_b[playerid] = ACCEPT_PIZZA;
	        					SendClientMessage(playerid,COLOR_WHITE,"* in order to start this job type /accept job, or to deny /deny job.");
								}
							}
							else
							{
							SendClientMessage(playerid,COLOR_WHITE,"pizzeria: were sorry, but all the pizza slots in use this moment");
							}
	        			}
						else
	 	       			{
	        			SendClientMessage(playerid,COLOR_WHITE,"pizzeria: You can't work here if you dont have a driving license!");
	  					}
	       			}
					else
	 	       		{
	        		SendClientMessage(playerid,COLOR_WHITE,"pizzeria: Only civilians can work here!");
	        		}
				}
				else
				{
	 	 		SendClientMessage(playerid,COLOR_GREY,"pizzeria: you cant work here right now,finish your job and try again later.");
				}
			}
			else
			{
	        SendClientMessage(playerid,COLOR_GREY,"SERVER: Command not allowed in this location");
			}
		}
		return 1;
     }
     

    if (strcmp("/quitjob", cmdtext, true, 10) == 0)
	{
		if(IsPlayerConnected(playerid))
	    {
	        if(PlayerInfo[playerid][pJob] > 0)
	        {
		    	if(PlayerInfo[playerid][pContractTime] >= 10)
				{
	   				SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have done your 5 hour contract, and quited your Job.");
				    PlayerInfo[playerid][pJob] = 0;
				    PlayerInfo[playerid][pContractTime] = 0;
                    if(PlayerInfo[playerid][pJob] == 9) {  }
				    else if(PlayerInfo[playerid][pJob] == 8) { armsdealers = armsdealers -1; }
	    			else if(PlayerInfo[playerid][pJob] == 7) { icecreamsellers = icecreamsellers -1; }
	    			else if(PlayerInfo[playerid][pJob] == 6) { farmer1 = farmer1 -1; }
	    			else if(PlayerInfo[playerid][pJob] == 5) { farmer = farmer -1; }
	    			else if(PlayerInfo[playerid][pJob] == 5) { farmer = farmer -1; }
	    			else if(PlayerInfo[playerid][pJob] == 4) { pizza = pizza -1; }
	    			else if(PlayerInfo[playerid][pJob] == 3) { truck = truck -1; }
	    			else if(PlayerInfo[playerid][pJob] == 2) { medics = medics -1; }
	    			else if(PlayerInfo[playerid][pJob] == 1) { barmans = barmans -1; }
				}
				else { new chours = 10 - PlayerInfo[playerid][pContractTime]; format(string, sizeof(string), "* You still have %d hours left until your contract is Over.", chours / 2); SendClientMessage(playerid, COLOR_WHITE, string); }
			}
			else { SendClientMessage(playerid,COLOR_GREY,"* You dont have any job"); }
		}
  	    return 1;

     }
     
	if(strcmp(cmd,"/buy",true)==0)
	{
	    if(IsPlayerConnected(playerid))
	    {
	        new x_nr[256];
			x_nr = strtok(cmdtext, idx);
			if (!IsAt247(playerid))//centerpoint 24-7
			{
				SendClientMessage(playerid, COLOR_GREY, "* You are not in a 24-7 !");
				return 1;
			}
			if(!strlen(x_nr)) {
				SendClientMessage(playerid, COLOR_WHITE, "USAGE: /buy [item number]");
				SendClientMessage(playerid, COLOR_GREY, " 1: Rope $70		2: PhoneBook $280"); // Done
				SendClientMessage(playerid, COLOR_GREY, " 3: Dice $50		4: Cookie $10"); // Done
				SendClientMessage(playerid, COLOR_GREY, " 5: Ph Number $500		6: Clock $100"); // Done
				SendClientMessage(playerid, COLOR_GREY, " 7: Skates $2500		8: Scratch Card $200");
				SendClientMessage(playerid, COLOR_GREY, " 9: Cutter $600		10: Chain 500$");
				return 1;
			}
		    if(strcmp(x_nr,"1",true) == 0)//Detective
			{
				if(!Rope[playerid])
				{
				    if(GetPlayerMoney(playerid) > 70)
				    {
					PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
					Rope[playerid]=true;
					GivePlayerMoney(playerid,-70);
					SendClientMessage(playerid, COLOR_WHITE, "  ___________________________________________________________");
					SendClientMessage(playerid, COLOR_YELLOW, "* You purchased a rope for 70$, the rope you bought is for one use.");
					SendClientMessage(playerid, COLOR_WHITE, " HINT: You can now use this rope by typing command: /tie");
					SendClientMessage(playerid, COLOR_WHITE, "  ___________________________________________________________");
					return 1;
					}
				}
			}
   			else if(strcmp(x_nr,"2",true) == 0)
			{
				if(PlayerInfo[playerid][pPhoneBook] == 0)
				{
				    if(GetPlayerMoney(playerid) > 280)
				    {
					PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
					PlayerInfo[playerid][pPhoneBook]=1;
					GivePlayerMoney(playerid,-280);
					SendClientMessage(playerid, COLOR_WHITE, "  ___________________________________________________________");
					SendClientMessage(playerid, COLOR_YELLOW, "* You purchased a PhoneBook for 280$, you can use it any time");
					SendClientMessage(playerid, COLOR_WHITE, " HINT: You can now use PhoneBook by typing command: /number");
					SendClientMessage(playerid, COLOR_WHITE, "  ___________________________________________________________");
					return 1;
					}
				}
			}
		    else if(strcmp(x_nr,"3",true) == 0)
			{
				if(!gDice[playerid])
				{
				    if(GetPlayerMoney(playerid) > 50)
				    {
					PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
					gDice[playerid] = true;
					GivePlayerMoney(playerid,-50);
					SendClientMessage(playerid, COLOR_WHITE, "  ___________________________________________________________");
					SendClientMessage(playerid, COLOR_YELLOW, "* You purchased a dice for 50$.");
					SendClientMessage(playerid, COLOR_WHITE, " HINT: You can now use this dice by typing command: /dice");
					SendClientMessage(playerid, COLOR_WHITE, "  ___________________________________________________________");
					return 1;
					}
				}
			}
   			else if(strcmp(x_nr,"4",true) == 0)
			{
				if(PlayerInfo[playerid][pCockie] > 0 && PlayerInfo[playerid][pCockie] < 4)
				{
			        SendClientMessage(playerid, COLOR_GREY, "* You got to many cockies, eat some first befor buy more!");
			        return 1;
				}
    			if(GetPlayerMoney(playerid) > 280)
			    {
					PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
					PlayerInfo[playerid][pCockie]++;
					GivePlayerMoney(playerid,-10);
					SendClientMessage(playerid, COLOR_WHITE, "  ___________________________________________________________");
					SendClientMessage(playerid, COLOR_YELLOW, "* You purchased a cockie for 10$, you can use it as the cockies you have");
					SendClientMessage(playerid, COLOR_WHITE, " HINT: You can now eat cockie by typing command: /use");
					SendClientMessage(playerid, COLOR_WHITE, "  ___________________________________________________________");
					return 1;
				}
			}
			else if(strcmp(x_nr,"5",true) == 0)
			{
	  			if(GetPlayerMoney(playerid) > 70)
   				{
				PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
				new randphone = 1000 + random(98999);
				PlayerInfo[playerid][pPhonenumber] = randphone;
				GivePlayerMoney(playerid,-500);
				SendClientMessage(playerid, COLOR_WHITE, "  ___________________________________________________________");
				format(string, sizeof(string), "* You purchased new Ph number. your new Number is %d", randphone);
				SendClientMessage(playerid, COLOR_YELLOW, string);
				SendClientMessage(playerid, COLOR_WHITE, " HINT: You can now type /cellhelp to see your cell phone commands.");
				SendClientMessage(playerid, COLOR_WHITE, "  ___________________________________________________________");
				return 1;
				}
			}
			else if(strcmp(x_nr,"6",true) == 0)
			{
				if(!Clock[playerid])
				{
    				if(GetPlayerMoney(playerid) > 600)
				    {
					PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
					GivePlayerMoney(playerid,-100);
					Clock[playerid]=true;
					SendClientMessage(playerid, COLOR_WHITE, "  ___________________________________________________________");
					SendClientMessage(playerid, COLOR_YELLOW, "* You purchased a Clock for 100$ now you can see the time");
					SendClientMessage(playerid, COLOR_WHITE, "  ___________________________________________________________");
					return 1;
					}
				}
			}
			
			else if(strcmp(x_nr,"8",true) == 0)
			{
			    if(GetPlayerMoney(playerid) > 200)
			    {
					PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
					new prize;
					new symb1[32]; new symb2[32]; new symb3[32];
					new randcard1 = random(10);
					new randcard2 = random(10);
					new randcard3 = random(10);
					if(randcard1 >= 5)
					{
						format(symb1, sizeof(symb1), "~b~|");
						randcard1 = 1;
					}
					else if(randcard1 <= 4 && randcard1 >= 2)
					{
						format(symb1, sizeof(symb1), "~g~|");
						randcard1 = 2;
					}
					else if(randcard1 < 2)
					{
						format(symb1, sizeof(symb1), "~y~|");
						randcard1 = 3;
					}
					if(randcard2 >= 5)
					{
						format(symb2, sizeof(symb2), "~b~|");
						randcard2 = 1;
					}
					else if(randcard2 <= 4 && randcard2 >= 2)
					{
						format(symb2, sizeof(symb2), "~g~|");
						randcard2 = 2;
					}
					else if(randcard2 < 2)
					{
						format(symb2, sizeof(symb2), "~y~|");
						randcard2 = 3;
					}
					if(randcard3 >= 5)
					{
						format(symb3, sizeof(symb3), "~b~|");
						randcard3 = 1;
					}
					else if(randcard3 <= 4 && randcard3 >= 2)
					{
						format(symb3, sizeof(symb3), "~g~|");
						randcard3 = 2;
					}
					else if(randcard3 < 2)
					{
						format(symb3, sizeof(symb3), "~y~|");
						randcard3 = 3;
					}
					if(randcard1 == randcard2 && randcard1 == randcard3)
					{
						if(randcard1 > 5)
						{
							prize = 450;
						}
						if(randcard1 <= 4 && randcard1 >= 2)
						{
							prize = 150;
						}
						if(randcard1 < 2)
						{
							prize = 20;
						}
						GivePlayerMoney(playerid,prize);
						format(string, sizeof(string), "%s %s %s ~n~~n~~w~~g~$%d",symb1,symb2,symb3, prize);
					}
					else
					{
						format(string, sizeof(string), "%s %s %s ~n~~n~~w~~r~$0",symb1,symb2,symb3);
						GivePlayerMoney(playerid,-200);
					}
					GameTextForPlayer(playerid, string, 3000, 3);
				}
				return 1;
			}
			else if(strcmp(x_nr,"9",true) == 0)
			{
				if(PlayerInfo[playerid][pCutter] == 0)
				{
    				if(GetPlayerMoney(playerid) > 100)
				    {
					PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
					GivePlayerMoney(playerid,-100);
					PlayerInfo[playerid][pCutter]=1;
					SendClientMessage(playerid, COLOR_WHITE, "  ___________________________________________________________");
					SendClientMessage(playerid, COLOR_YELLOW, "* You purchased a Cutter for 600$, now you can cut chains.");
					SendClientMessage(playerid, COLOR_WHITE, "  ___________________________________________________________");
					return 1;
					}
				}
			}
		    else if(strcmp(x_nr,"10",true) == 0)
			{
				if(!Chain[playerid])
				{
				    if(GetPlayerMoney(playerid) > 70)
				    {
					PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
					Chain[playerid]=true;
					GivePlayerMoney(playerid,-500);
					SendClientMessage(playerid, COLOR_WHITE, "  ___________________________________________________________");
					SendClientMessage(playerid, COLOR_YELLOW, "* You purchased a Chain for 500$, the chain you bought is for one use.");
					SendClientMessage(playerid, COLOR_WHITE, " HINT: You can now use this chain by typing command: /chain");
					SendClientMessage(playerid, COLOR_WHITE, "  ___________________________________________________________");
					return 1;
					}
				}
			}
			
			else
			{
			    SendClientMessage(playerid, COLOR_GREY, "* Invalid Item Number !");
			    return 1;
			}
	    }
	    return 1;
	}
	
 	if (strcmp("/drag-race", cmdtext, true, 10) == 0)
	{
		if(IsPlayerConnected(playerid))
	 	{
			if (dragblock[playerid] == 0 && raceblock[playerid] == 0)
	 		{
	    		if(drag < 1)
	    		{
					if (spot[playerid] == SPOT_Garage)
					{
					TextDrawUseBox(textdraw[TEXTDRAW_DRAGRACE], true);
					TextDrawShowForPlayer(playerid, textdraw[TEXTDRAW_DRAGRACE]);
					texttimer[playerid]=13;
					textdrawtimer[playerid] = TEXTDRAW_DRAGRACE;
					dragblock[playerid]=1;
					GameTextForPlayer(playerid,"~g~Your Registered To Race Now!~n~~w~Get Into The Vehicle",5000,3);
					SetVehicleParamsForPlayer(2,playerid,1,0);
					drag = drag + 1;
					}
					else
					{
			    	SendClientMessage(playerid,COLOR_GREY,"SERVER: Command not allowed in this location");
	        		raceblock[playerid]=0;
	        		}
				}
				else
				{
				SendClientMessage(playerid,COLOR_GREY,"Racing Garage: Were sorry, someone is already racing this race.");
				}
			}
			else
			{
	 		SendClientMessage(playerid,COLOR_GREY,"Racing Garage: your already racing.");
	 		}
 		}
		return 1;
	}

	if (strcmp("/sprint-race", cmdtext, true, 10) == 0)
	{
		if(IsPlayerConnected(playerid))
	    {
	 		if (raceblock[playerid] == 0 && dragblock[playerid] == 0)
	 		{
	    		if(race < 1)
	    		{
					if (spot[playerid] == SPOT_Garage)
					{
					raceblock[playerid]=1;
					GameTextForPlayer(playerid,"~g~Your Registered To Race Now!~n~~w~Get Into The Vehicle",3500,3);
					TextDrawUseBox(textdraw[TEXTDRAW_SPRINTRACE], true);
					TextDrawShowForPlayer(playerid, textdraw[TEXTDRAW_SPRINTRACE]);
					texttimer[playerid]=13;
					textdrawtimer[playerid] = TEXTDRAW_SPRINTRACE;
					SetVehicleParamsForPlayer(1,playerid,1,0);
					race = race + 1;
					}
					else
					{
	        		SendClientMessage(playerid,COLOR_GREY,"ERROR: Command not allowed in this location");
	        		raceblock[playerid]=0;
	        		}
				}
				else
				{
	    		SendClientMessage(playerid,COLOR_GREY,"Racing Garage: Were sorry, someone is already racing this race.");
				}
	 		}
	 		else
	 		{
	 		SendClientMessage(playerid,COLOR_GREY,"Racing Garage: your already racing.");
	 		}
 		}
		return 1;
	}
	
	return 1;
}


public OnPlayerInfoChange(playerid)
{
	printf("OnPlayerInfoChange(%d)");
	return 1;
}



public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{


	return 1;
}

public OnPlayerExitVehicle(playerid, vehicleid)
{
	new p_vehicle = GetPlayerVehicleID(playerid);

	if(PlayerInfo[playerid][pJob] == 3 && p_vehicle < 16 && p_vehicle > 23)
	{
	DisablePlayerCheckpoint(playerid);
    GameTextForPlayer(playerid,"~r~you are fired~n~~w~-1000$",3500,4);
    GivePlayerMoney(playerid,-1000);
    PlayerInfo[playerid][pJob] = 0;
	RemovePlayerFromVehicle(playerid);
	}


	return 1;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{

    new string[256];
    new sendername[MAX_PLAYER_NAME];
	new p_vehicle = GetPlayerVehicleID(playerid);
	GetPlayerName(playerid, sendername, sizeof(sendername));
    
    if(newstate == PLAYER_STATE_ONFOOT && oldstate == PLAYER_STATE_DRIVER && !IsABikeCar(p_vehicle) && engine[playerid])
    {
   	TogglePlayerControllable(playerid,1);
	engine[playerid] = false;
	format(string, sizeof(string), "* %s turns off the engine and exit his vehicle", sendername);
	ProxDetector(15.0, playerid, string, COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM);
	}
    
	if(newstate == PLAYER_STATE_DRIVER && PlayerInfo[playerid][pCarLic] == 1 && !IsAInsCar(p_vehicle) && !IsACopCar(p_vehicle) && !IsAAmbCar(p_vehicle) && !IsABikeCar(p_vehicle))
	{
	TogglePlayerControllable(playerid,0);
	SendClientMessage(playerid,COLOR_ENGINE,"* In order to turn on the engine type /engine on");
	SendClientMessage(playerid,COLOR_ENGINE,"* Or type /exit to exit vehicle");
	}
	
	if(oldstate == 2 && newstate == PLAYER_STATE_ONFOOT && !engine[playerid])
	{
	TogglePlayerControllable(playerid,1);
	}

	if(newstate == PLAYER_STATE_DRIVER && p_vehicle == 127 && p_vehicle && 264 && PlayerHouse[playerid][pInfoHouse] != 1)
	{
	new Float:health;
	RemovePlayerFromVehicle(playerid);
	SendClientMessage(playerid,COLOR_YELLOW,"Car owners: The Brooks Familey");
	GetPlayerHealth(playerid,health);
	SetPlayerHealth(playerid, health - 15);
	ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.299999, 1, 1, 1, 0, 10000);
	}
	
	if(newstate == PLAYER_STATE_DRIVER && p_vehicle == 135 && PlayerHouse[playerid][pInfoHouse] != 2 && PlayerHouse[playerid][pInfoHouse] != 1)
	{
	new Float:health;
	RemovePlayerFromVehicle(playerid);
	SendClientMessage(playerid,COLOR_YELLOW,"Car owned By: Luke_Smith");
	GetPlayerHealth(playerid,health);
	SetPlayerHealth(playerid, health - 15);
	ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.299999, 1, 1, 1, 0, 10000);
	}

	if(newstate == PLAYER_STATE_DRIVER && IsAAmbCar(p_vehicle) && PlayerInfo[playerid][pJob] != 2)
	{
	new message[256];
	new playername[128];
	
 	RemovePlayerFromVehicle(playerid);
 	SendClientMessage(playerid,COLOR_ORANGE,"** You were caught commiting a crime: entered into a hospital vehicle");
 	SendClientMessage(playerid,COLOR_ORANGE,"** Reporter: Unknown, this information has been wroten to your criminal record.");
    GetPlayerName(playerid,playername,sizeof(playername));
    format(message,sizeof(playername),"*** %s tried to steal an ambulance",playername);
    SetPlayerWantedLevel(playerid,GetPlayerWantedLevel(playerid)+1);

	for(new i=0; i<MAX_PLAYERS; i++)
	{
		if(PlayerInfo[i][pPolice] >= 1)
		{
		SendClientMessage(i,COLOR_POLICE,message);
		}
	}
	}
	
	if(newstate == PLAYER_STATE_ONFOOT)
	{
	    if(TransportDuty[playerid] > 0)
		{
			if(TransportDuty[playerid] == 2)
			{
			    BusDrivers -= 1;
			}
			TransportDuty[playerid] = 0;
			format(string, sizeof(string), "* You are now Off Duty and earned $%d.", TransportMoney[playerid]);
			SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
			GivePlayerMoney(playerid, TransportMoney[playerid]);
			ConsumingMoney[playerid] = 1; TransportValue[playerid] = 0; TransportMoney[playerid] = 0;
		}
		if(TransportCost[playerid] > 0 && TransportDriver[playerid] < 999)
		{
		    if(IsPlayerConnected(TransportDriver[playerid]))
			{
			    TransportMoney[TransportDriver[playerid]] += TransportCost[playerid];
			    TransportTime[TransportDriver[playerid]] = 0;
			    TransportCost[TransportDriver[playerid]] = 0;
			    format(string, sizeof(string), "~w~The ride cost~n~~r~$%d",TransportCost[playerid]);
			    GameTextForPlayer(playerid, string, 5000, 1);
			    format(string, sizeof(string), "Passenger left the bus, Earned $%d",TransportCost[playerid]);
			    SendClientMessage(TransportDriver[playerid],COLOR_YELLOW,string);
				GivePlayerMoney(playerid, -TransportCost[playerid]);
				TransportCost[playerid] = 0;
				TransportTime[playerid] = 0;
				TransportDriver[playerid] = 999;
			}
		}
	}

	if(newstate == PLAYER_STATE_PASSENGER) // TAXI & BUSSES
	{
	    new name[MAX_PLAYER_NAME];
	    GetPlayerName(playerid, name, sizeof(name));
	    new vehicleid = GetPlayerVehicleID(playerid);
	    for(new i = 0; i < MAX_PLAYERS; i++)
	    {
	        if(IsPlayerConnected(i))
	        {
	            if(IsPlayerInVehicle(i, vehicleid) && GetPlayerState(i) == 2 && TransportDuty[i] > 0)
	            {
	                if(GetPlayerMoney(playerid) < TransportValue[i])
	                {
	                    format(string, sizeof(string), "* You need $%d in order to enter.", TransportValue[i]);
						SendClientMessage(playerid, COLOR_WHITE, string);
						RemovePlayerFromVehicle(playerid);
	                }
	                else
	                {
	                    if(TransportDuty[i] == 2)
	                    {
	                        format(string, sizeof(string), "* You paid $%d to the Bus Driver.", TransportValue[i]);
							SendClientMessage(playerid, COLOR_YELLOW, string);
							format(string, sizeof(string), "* Passenger %s has entered your Bus.", name);
							SendClientMessage(i, COLOR_YELLOW, string);
							GivePlayerMoney(playerid, - TransportValue[i]);
							TransportMoney[i] += TransportValue[i];
	                    }
	                }
	            }
	        }
	    }
	}
	
	if(newstate == PLAYER_STATE_DRIVER && p_vehicle >= 234 && p_vehicle <= 237 && PlayerInfo[playerid][pJob] != 10) // Bus
	{
 	RemovePlayerFromVehicle(playerid);
	}
	
	if(newstate == PLAYER_STATE_DRIVER && p_vehicle >= 242 && p_vehicle <= 247 && PlayerInfo[playerid][pFMember] == 0) // Demedici Cars
	{
 	RemovePlayerFromVehicle(playerid);
	}
	
	if (newstate == PLAYER_STATE_DRIVER && p_vehicle == 233 && PlayerInfo[playerid][pFMember] != 1) // Demedici Cars
	{
 	RemovePlayerFromVehicle(playerid);
	}
	
	if(newstate == PLAYER_STATE_DRIVER && p_vehicle >= 239 && p_vehicle <= 241 && PlayerInfo[playerid][pJob] != 9) // Mechanics
	{
 	RemovePlayerFromVehicle(playerid);
	}

	if(newstate == PLAYER_STATE_DRIVER && p_vehicle >= 202 && p_vehicle <= 205 && p_vehicle == 158 && p_vehicle == 159 && PlayerInfo[playerid][pJob] != 7 )
	{
 	RemovePlayerFromVehicle(playerid);
	}
	
	if (newstate == PLAYER_STATE_DRIVER && p_vehicle >= 158 && p_vehicle <= 159 && PlayerInfo[playerid][pJob] != 7 )
	{
	RemovePlayerFromVehicle(playerid);
	}
	
	if(newstate == PLAYER_STATE_DRIVER && p_vehicle >= 199 && p_vehicle <= 201 && PlayerInfo[playerid][pJob] == 6)
	{
      SetPlayerCheckpoint(playerid,1920.5751,210.6444,31.1235,10.0);
      farmercheck_p[playerid]=1;
      GameTextForPlayer(playerid,"~g~plow ~w~the field and finish it!",3000,3);
      combinetext[playerid]=0;
	}

	if(newstate == PLAYER_STATE_DRIVER && p_vehicle > 16 && p_vehicle < 23 && PlayerInfo[playerid][pJob] == 5)
	{
      SetPlayerCheckpoint(playerid,-131.4084,122.6611,4.1531,5.0);
      farmercheck[playerid]=1;
      GameTextForPlayer(playerid,"~r~plow ~w~the field and finish it!",3000,3);
      combinetext[playerid]=0;
	}

	if(newstate == PLAYER_STATE_DRIVER && p_vehicle >= 170 && p_vehicle <= 172 && PlayerInfo[playerid][pInstructor]<= 0) // Instructor Vehicles Palomino
	{
      RemovePlayerFromVehicle(playerid);
	}
	
	if(newstate == PLAYER_STATE_DRIVER && p_vehicle >= 85 && p_vehicle <= 88 && PlayerInfo[playerid][pInstructor]<= 0)// Instructor Vehicles BlueBerry
	{
      RemovePlayerFromVehicle(playerid);
	}
	
	if(newstate == PLAYER_STATE_DRIVER && p_vehicle >= 62 && p_vehicle <= 63 && PlayerInfo[playerid][pInstructor]<= 0) // Instructor Vehicles BlueBerry
	{
      RemovePlayerFromVehicle(playerid);
	}
	
	if (newstate == PLAYER_STATE_DRIVER && p_vehicle >= 199 && p_vehicle <= 201 && PlayerInfo[playerid][pJob] != 6)
	{
      RemovePlayerFromVehicle(playerid);
	}

	if (newstate == PLAYER_STATE_DRIVER && p_vehicle >= 17 && p_vehicle <= 22 && PlayerInfo[playerid][pJob]!= 5)
	{
      RemovePlayerFromVehicle(playerid);
	}

	if (newstate == PLAYER_STATE_DRIVER && p_vehicle >= 227 && p_vehicle <= 232 && PlayerInfo[playerid][pAci] == 0 || newstate == PLAYER_STATE_DRIVER && p_vehicle >= 227 && p_vehicle <= 232 && PlayerInfo[playerid][pPolice] == 0)
	{
 	new message[256];
	new playername[128];
	  
	RemovePlayerFromVehicle(playerid);
	SendClientMessage(playerid,COLOR_ORANGE,"** You were caught commiting a crime: entered into a ACI vehicle");
 	SendClientMessage(playerid,COLOR_ORANGE,"** Reporter: Unknown, this information has been wroten to your criminal record.");
  	GetPlayerName(playerid,playername,sizeof(playername));
  	format(message,sizeof(playername),"*** %s tried to steal an aci vehicle",playername);
   	SetPlayerWantedLevel(playerid,GetPlayerWantedLevel(playerid)+1);
      
   	for(new i=0; i<MAX_PLAYERS; i++)
   	{
		if(PlayerInfo[playerid][pPolice] >= 1 || PlayerInfo[playerid][pAci] >= 1)
	  	{
		SendClientMessage(i,COLOR_POLICE,message);
		}
  	}
	}
	
	if (newstate == PLAYER_STATE_DRIVER && IsACopCar(p_vehicle) && PlayerInfo[playerid][pPolice] == 0)
	{
 	new message[256];
	new playername[128];

	RemovePlayerFromVehicle(playerid);
	SendClientMessage(playerid,COLOR_ORANGE,"** You were caught commiting a crime: entered into a police vehicle");
 	SendClientMessage(playerid,COLOR_ORANGE,"** Reporter: Unknown, this information has been wroten to your criminal record.");
  	GetPlayerName(playerid,playername,sizeof(playername));
  	format(message,sizeof(playername),"*** %s tried to steal a police vehicle",playername);
   	SetPlayerWantedLevel(playerid,GetPlayerWantedLevel(playerid)+1);

   	for(new i=0; i<MAX_PLAYERS; i++)
   	{
		if(PlayerInfo[playerid][pPolice] >= 1)
	  	{
		SendClientMessage(i,COLOR_POLICE,message);
		}
  	}
	}

	if (newstate == PLAYER_STATE_DRIVER && p_vehicle >= 7 && p_vehicle <= 10 && PlayerInfo[playerid][pJob] != 3)
	{
      RemovePlayerFromVehicle(playerid);
	}


	if (newstate == PLAYER_STATE_DRIVER && p_vehicle == 2 && dragblock[playerid] == 1)
	{
      GameTextForPlayer(playerid,"~w~Get to the end of the road under~n~~r~20sec~w~,if you'll succees you'll ~n~earn ~r~700$",3500,3);
      SetPlayerCheckpoint(playerid,246.7362,49.7644,2.2782,5.0);
      SetPlayerWantedLevel(playerid,GetPlayerWantedLevel(playerid)+1);
      dragrace[playerid]=1;
	}


	if (newstate == PLAYER_STATE_DRIVER && p_vehicle == 2 && dragblock[playerid] == 0)
	{
      RemovePlayerFromVehicle(playerid);
      SendClientMessage(playerid,COLOR_GREY,"ERROR: You'r not register to the drag race.");
	}


	if (newstate == PLAYER_STATE_DRIVER && p_vehicle == 1 && raceblock[playerid] == 1)
	{
      GameTextForPlayer(playerid,"~w~Get from checkpoint ~r~A ~w~to checkpoint ~r~B~w~~n~under 35sec,if you'll~n~succees you'll earn ~r~1,100$~w~",3500,3);
      SetPlayerCheckpoint(playerid,208.8423,-212.2507,1.4292,5.0);
      SetPlayerWantedLevel(playerid,GetPlayerWantedLevel(playerid)+1);
      streetrace[playerid]=1;
	}


	if (newstate == PLAYER_STATE_DRIVER && p_vehicle == 1 && raceblock[playerid] == 0)
	{
      RemovePlayerFromVehicle(playerid);
      SendClientMessage(playerid,COLOR_GREY,"ERROR: You'r not register to the sprint race.");
	}


	if (newstate == PLAYER_STATE_DRIVER && p_vehicle >= 3 && p_vehicle <= 6 && PlayerInfo[playerid][pJob] != 4)
	{
      RemovePlayerFromVehicle(playerid);
	}


	if (newstate == PLAYER_STATE_DRIVER && p_vehicle >= 3 && p_vehicle <= 6 && PlayerInfo[playerid][pJob] == 4 && PlayerInfo[playerid][pDelivery] == 4)
	{
	  if(pizzatext[playerid] == 0)
	  {
	  pizzatext[playerid]=1;
  	  SetPlayerCheckpoint(playerid,251.9063,-121.2716,3.5354,1.0);
      pizzacheck[playerid]=1;
      GameTextForPlayer(playerid,"~w~you have start the job~n~you have ~r~half hour ~w~to work~n~you'll get the money in ~r~paycheck",4000,3);
      }
	}


	if (newstate == PLAYER_STATE_DRIVER && p_vehicle == 7 && PlayerInfo[playerid][pJob] == 3)
	{
      GameTextForPlayer(playerid,"~w~Go to the checkpoint are and fill gas",3000,3);
      SendClientMessage(playerid,COLOR_WHITE,"Job Station: attach the trailer to your truck and follow the red checkpint!");
      DisablePlayerCheckpoint(playerid);
      SetVehicleParamsForPlayer(11,playerid,1,0);
	  SetPlayerCheckpoint(playerid,-1030.2373,-685.8577,32.0078,7.0);
	  SendClientMessage(playerid,COLOR_WHITE,"Drive with your trailer to the checkpoint and fill the gas Cargo!");
	}


	if (newstate == PLAYER_STATE_DRIVER && p_vehicle == 8 && PlayerInfo[playerid][pJob] == 3)
	{
      GameTextForPlayer(playerid,"~w~Go to the checkpoint are and fill gas",3000,3);
      SendClientMessage(playerid,COLOR_WHITE,"Job Station: attach the trailer to your truck and follow the red checkpint!");
      DisablePlayerCheckpoint(playerid);
      SetVehicleParamsForPlayer(12,playerid,1,0);
	  SetPlayerCheckpoint(playerid,-1030.2373,-685.8577,32.0078,7.0);
	  SendClientMessage(playerid,COLOR_WHITE,"Drive with your trailer to the checkpoint and fill the gas Cargo!");
	}


	if (newstate == PLAYER_STATE_DRIVER && p_vehicle == 9 && PlayerInfo[playerid][pJob] == 3)
	{
      GameTextForPlayer(playerid,"~w~Go to the checkpoint are and fill gas",3000,3);
      SendClientMessage(playerid,COLOR_WHITE,"Job Station: attach the trailer to your truck and follow the red checkpint!");
      DisablePlayerCheckpoint(playerid);
      SetVehicleParamsForPlayer(13,playerid,1,0);
	  SetPlayerCheckpoint(playerid,-1030.2373,-685.8577,32.0078,7.0);
	  SendClientMessage(playerid,COLOR_WHITE,"Drive with your trailer to the checkpoint and fill the gas Cargo!");
	}


	if (newstate == PLAYER_STATE_DRIVER && p_vehicle == 10 && PlayerInfo[playerid][pJob] == 3)
	{
      GameTextForPlayer(playerid,"~w~Go to the checkpoint are and fill gas",3000,3);
      SendClientMessage(playerid,COLOR_WHITE,"Job Station: attach the trailer to your truck and follow the red checkpint!");
      DisablePlayerCheckpoint(playerid);
      SetVehicleParamsForPlayer(14,playerid,1,0);
	  SetPlayerCheckpoint(playerid,-1030.2373,-685.8577,32.0078,7.0);
	  SendClientMessage(playerid,COLOR_WHITE,"Drive with your trailer to the checkpoint and fill the gas Cargo!");
	}

	if (newstate == PLAYER_STATE_DRIVER && p_vehicle <= 14 && p_vehicle >= 7 && PlayerInfo[playerid][pJob] != 3)
	{
      RemovePlayerFromVehicle(playerid);
	}

	if(newstate == PLAYER_STATE_DRIVER && PlayerInfo[playerid][pPolice] != 1 && PlayerInfo[playerid][pPolice] != 2 && PlayerInfo[playerid][pInstructor] != 1 && PlayerInfo[playerid][pCarLic] == 0 && !IsABikeCar(p_vehicle))
	{
	RemovePlayerFromVehicle(playerid);
	SendClientMessage(playerid,COLOR_GREY,"SERVER: You must have license before you can drive a car.");
	}


	return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{

    new p_vehicle = GetPlayerVehicleID(playerid);
   	new file[128];

	file = id2file(playerid);
    DisablePlayerCheckpoint(playerid);
    
    switch(bustrack[playerid]) {
    case 1: { bustrack[playerid] = 1; DisablePlayerCheckpoint(playerid);SetPlayerCheckpoint(playerid,1256.6321,163.5838,19.6622,5.0);bustrack[playerid]=2;}
    case 2: { bustrack[playerid] = 2; SetPlayerCheckpoint(playerid,1359.6909,400.7283,19.5396,5.0);bustrack[playerid]=3;}
    case 3: { bustrack[playerid] = 3; SetPlayerCheckpoint(playerid,2348.4907,211.1294,26.5377,5.0);bustrack[playerid]=4;}
    case 4: { bustrack[playerid] = 4; SetPlayerCheckpoint(playerid,2206.1375,45.0621,26.4698,5.0);bustrack[playerid]=5;}
    case 5: { bustrack[playerid] = 5; SetPlayerCheckpoint(playerid,645.7291,-471.3023,16.3639,5.0);bustrack[playerid]=6;}
    case 6: { bustrack[playerid] = 6; SetPlayerCheckpoint(playerid,213.3388,-312.3710,1.8099,5.0);bustrack[playerid]=7;}
    case 7: { bustrack[playerid] = 7; SetPlayerCheckpoint(playerid,237.4858,23.9133,2.6346,5.0);bustrack[playerid]=8;}
    case 8: { bustrack[playerid] = 8; SetPlayerCheckpoint(playerid,-186.7874,1001.3085,19.7521,5.0);bustrack[playerid]=9;}
    case 9: { bustrack[playerid] = 9; SetPlayerCheckpoint(playerid,-271.7557,1081.0087,19.7824,5.0);bustrack[playerid]=10;}
    case 10: { bustrack[playerid] = 10; SetPlayerCheckpoint(playerid,-149.1030,1194.1355,19.7997,5.0);bustrack[playerid]=11;}
    case 11: { bustrack[playerid] = 11; SetPlayerCheckpoint(playerid,341.2809,718.4985,9.288,5.0);bustrack[playerid]=12;}
    case 12: { bustrack[playerid] = 12; SetPlayerCheckpoint(playerid,1213.4016,330.4316,19.5399,5.0);bustrack[playerid]=1;}
    }
    
    switch(farmercheck[playerid]) {
    case 1: { farmercheck[playerid] = 1; DisablePlayerCheckpoint(playerid);SetPlayerCheckpoint(playerid,-127.8055,60.9355,3.1172,15.0);farmercheck[playerid]=2;}
    case 2: { farmercheck[playerid] = 2; SetPlayerCheckpoint(playerid,-157.0927,-14.2445,3.1172,10.0);farmercheck[playerid]=3;}
    case 3: { farmercheck[playerid] = 3; SetPlayerCheckpoint(playerid,-194.4185,-82.3655,3.1172,15.0);farmercheck[playerid]=4;}
    case 4: { farmercheck[playerid] = 4; SetPlayerCheckpoint(playerid,-205.3983,-21.4188,3.1172,15.0);farmercheck[playerid]=5;}
    case 5: { farmercheck[playerid] = 5; SetPlayerCheckpoint(playerid,-184.5072,72.7228,3.1172,15.0);farmercheck[playerid]=6;}
    case 6: { farmercheck[playerid] = 6; SetPlayerCheckpoint(playerid,-238.2152,71.8389,2.1237,15.0);farmercheck[playerid]=7;}
    case 7: { farmercheck[playerid] = 7; SetPlayerCheckpoint(playerid,-247.1006,29.7863,2.3496,15.0);farmercheck[playerid]=8;}
    case 8: { farmercheck[playerid] = 8; SetPlayerCheckpoint(playerid,-186.2618,42.1511,3.1172,15.0);farmercheck[playerid]=9;}
    case 9: { farmercheck[playerid] = 9; SetPlayerCheckpoint(playerid,-200.0078,-9.9953,3.1094,15.0);farmercheck[playerid]=10;}
    case 10: { farmercheck[playerid] = 10; SetPlayerCheckpoint(playerid,-248.5710,-39.6417,3.1172,15.0);farmercheck[playerid]=11;}
    case 11: { farmercheck[playerid] = 11; SetPlayerCheckpoint(playerid,-254.9822,-71.2041,3.1172,15.0);farmercheck[playerid]=12;}
    case 12: { farmercheck[playerid] = 12; SetPlayerCheckpoint(playerid,-250.1161,49.9696,1.9914,15.0);farmercheck[playerid]=13;}
    case 13: { farmercheck[playerid] = 13; SetPlayerCheckpoint(playerid,-212.9166,143.3809,3.6913,15.0);farmercheck[playerid]=14;}
    case 14: { farmercheck[playerid] = 14; SetPlayerCheckpoint(playerid,-189.4067,174.6115,8.6345,15.0);farmercheck[playerid]=15;}
    case 15: { farmercheck[playerid] = 15; SetPlayerCheckpoint(playerid,-167.3222,136.6180,4.1277,15.0);farmercheck[playerid]=16;}
    case 16: { farmercheck[playerid] = 16; SetPlayerCheckpoint(playerid,-110.4114,148.5296,3.2647,15.0);farmercheck[playerid]=17;}
    case 17: { farmercheck[playerid] = 17; SetPlayerCheckpoint(playerid,-122.4326,100.2942,3.1172,15.0);farmercheck[playerid]=18;}
    case 18: { farmercheck[playerid] = 18; SetPlayerCheckpoint(playerid,-205.9314,164.0779,6.1997,15.0);farmercheck[playerid]=19;}
    case 19: { farmercheck[playerid] = 19; SetPlayerCheckpoint(playerid,-193.1906,-13.6338,3.1172,15.0);farmercheck[playerid]=20;}
    case 20: { farmercheck[playerid] = 20; SetPlayerCheckpoint(playerid,-233.3873,38.7301,2.7168,15.0);farmercheck[playerid]=21;}
    case 21: { farmercheck[playerid] = 21; SetPlayerCheckpoint(playerid,-214.8972,95.8260,2.5567,15.0);farmercheck[playerid]=22;}
    case 22: { farmercheck[playerid] = 22; SetPlayerCheckpoint(playerid,-193.7751,74.8787,3.1172,15.0);farmercheck[playerid]=23;}
    case 23: { farmercheck[playerid] = 23; SetPlayerCheckpoint(playerid,-179.3255,19.9410,3.1094,15.0);farmercheck[playerid]=24;}
    case 24: { farmercheck[playerid] = 24; SetPlayerCheckpoint(playerid,-167.6872,-30.2297,3.1172,15.0);farmercheck[playerid]=25;}
    case 25: { farmercheck[playerid] = 25; SetPlayerCheckpoint(playerid,-202.1042,-84.5430,3.1172,15.0);farmercheck[playerid]=26;}
    case 26: { farmercheck[playerid] = 26; SetPlayerCheckpoint(playerid,-223.1202,-22.0743,3.1172,15.0);farmercheck[playerid]=27;}
    case 27: { farmercheck[playerid] = 27; SetPlayerCheckpoint(playerid,-229.0233,42.7612,2.8193,15.0);farmercheck[playerid]=28;}
    case 28: { farmercheck[playerid] = 28; SetPlayerCheckpoint(playerid,-230.3634,98.5918,1.9680,15.0);farmercheck[playerid]=29; }
    case 29: { farmercheck[playerid] = 29; SetPlayerCheckpoint(playerid,-212.2590,145.0056,3.8809,15.0);farmercheck[playerid]=30;}
    case 30: { farmercheck[playerid] = 30; SetPlayerCheckpoint(playerid,-156.2923,166.6729,6.6279,15.0);farmercheck[playerid]=31;}
    case 31: { farmercheck[playerid] = 31; SetPlayerCheckpoint(playerid,-190.9100,-9.1848,3.1094,15.0);farmercheck[playerid]=32;}
    case 32: { farmercheck[playerid] = 32; SetPlayerCheckpoint(playerid,-172.1643,-43.0075,3.1172,15.0);farmercheck[playerid]=33;}
    case 33: { farmercheck[playerid] = 33; SetPlayerCheckpoint(playerid,-254.2626,-32.5550,3.1172,15.0);farmercheck[playerid]=34;}
    case 34: { farmercheck[playerid] = 34; SetPlayerCheckpoint(playerid,-209.9143,0.5104,3.1094,15.0);farmercheck[playerid]=35;}
    case 35: { farmercheck[playerid] = 35; SetPlayerCheckpoint(playerid,-245.1340,69.6928,1.9148,15.0);farmercheck[playerid]=36;}
    case 36: { farmercheck[playerid] = 36; SetPlayerCheckpoint(playerid,-171.2433,74.3660,3.1172,15.0);farmercheck[playerid]=37;}
    case 37: { farmercheck[playerid] = 37; SetPlayerCheckpoint(playerid,-134.2128,40.6766,3.1172,15.0);farmercheck[playerid]=38;}
    case 38: { farmercheck[playerid] = 38; SetPlayerCheckpoint(playerid,-218.4196,38.7270,3.1172,15.0);farmercheck[playerid]=39;}
    case 39: { farmercheck[playerid] = 39; SetPlayerCheckpoint(playerid,-230.4450,103.4566,1.8815,15.0);farmercheck[playerid]=40;}
    case 40: { farmercheck[playerid] = 40; SetPlayerCheckpoint(playerid,-211.7279,148.7247,4.2929,15.0);farmercheck[playerid]=41;}
    case 41: { farmercheck[playerid] = 41; SetPlayerCheckpoint(playerid,-166.4951,168.7731,7.5414,15.0);farmercheck[playerid]=42;}
    case 42: { farmercheck[playerid] = 42; SetPlayerCheckpoint(playerid,-114.0208,139.5396,3.1133,15.0);farmercheck[playerid]=43;}
    case 43: { farmercheck[playerid] = 43; SetPlayerCheckpoint(playerid,-146.4076,151.9230,4.5803,15.0);farmercheck[playerid]=44;}
    case 44: { farmercheck[playerid] = 44; SetPlayerCheckpoint(playerid,-153.2438,33.5129,3.1172,15.0);farmercheck[playerid]=45;}
    case 45: { farmercheck[playerid] = 45; SetPlayerCheckpoint(playerid,-183.0257,66.2562,3.1172,15.0);farmercheck[playerid]=46;}
    case 46: { farmercheck[playerid] = 46; SetPlayerCheckpoint(playerid,-216.0010,38.6276,3.1172,15.0);farmercheck[playerid]=47;}
    case 47: { farmercheck[playerid] = 47; SetPlayerCheckpoint(playerid,-268.7200,-33.1547,2.3123,15.0);farmercheck[playerid]=48;}
    case 48: { farmercheck[playerid] = 48; SetPlayerCheckpoint(playerid,-273.9372,-55.2331,3.1172,15.0);farmercheck[playerid]=49;}
    case 49: { farmercheck[playerid] = 49; SetPlayerCheckpoint(playerid,-237.2549,-78.3533,3.1172,15.0);farmercheck[playerid]=50;}
    case 50: { farmercheck[playerid] = 50; SetPlayerCheckpoint(playerid,-157.0927,-14.2445,3.1172,10.0);farmercheck[playerid]=51;}
    case 51: { farmercheck[playerid] = 51; SetPlayerCheckpoint(playerid,-194.4185,-82.3655,3.1172,15.0);farmercheck[playerid]=52;}
    case 52: { farmercheck[playerid] = 52; SetPlayerCheckpoint(playerid,-205.3983,-21.4188,3.1172,15.0);farmercheck[playerid]=53;}
    case 53: { farmercheck[playerid] = 53; SetPlayerCheckpoint(playerid,-184.5072,72.7228,3.1172,15.0);farmercheck[playerid]=54;}
    case 54: { farmercheck[playerid] = 54; SetPlayerCheckpoint(playerid,-238.2152,71.8389,2.1237,15.0);farmercheck[playerid]=55;}
    case 55: { farmercheck[playerid] = 55; SetPlayerCheckpoint(playerid,-247.1006,29.7863,2.3496,15.0);farmercheck[playerid]=56;}
    case 56: { farmercheck[playerid] = 56; SetPlayerCheckpoint(playerid,-186.2618,42.1511,3.1172,15.0);farmercheck[playerid]=57;}
    case 57: { farmercheck[playerid] = 57; SetPlayerCheckpoint(playerid,-200.0078,-9.9953,3.1094,15.0);farmercheck[playerid]=58;}
    case 58: { farmercheck[playerid] = 58; SetPlayerCheckpoint(playerid,-248.5710,-39.6417,3.1172,15.0);farmercheck[playerid]=59;}
    case 59: { farmercheck[playerid] = 59; SetPlayerCheckpoint(playerid,-254.9822,-71.2041,3.1172,15.0);farmercheck[playerid]=1;}
    }
    
    if(farmercheck[playerid] >= 1 && PlayerInfo[playerid][pJob] == 5)
    {
	new numcomb[10];
    
	format(numcomb,sizeof(numcomb),"~w~%d",vf_check[playerid]);
    
	vf_check[playerid] = vf_check[playerid] + 1;
	GameTextForPlayer(playerid,numcomb,1500,4);
	GivePlayerMoney(playerid,1);
    }
    
	if(vf_check[playerid] == 500 && PlayerInfo[playerid][pContractTime] <= 10)
	{
	GameTextForPlayer(playerid,"~w~you have ~r~pass ~w~the target~n~~r~keep ~w~working untill half hour~n~will be pass",6000,3);
	GivePlayerMoney(playerid,750);
	}
	

	switch(farmercheck_p[playerid]) {
    case 1: { farmercheck_p[playerid] = 1; DisablePlayerCheckpoint(playerid);SetPlayerCheckpoint(playerid,1937.8185,208.4198,30.9799,10.0);farmercheck_p[playerid]=2;}
    case 2: { farmercheck_p[playerid] = 2; SetPlayerCheckpoint(playerid,1970.5358,206.8518,29.3573,10.0);farmercheck_p[playerid]=3;}
    case 3: { farmercheck_p[playerid] = 3; SetPlayerCheckpoint(playerid,1996.0271,203.5236,27.7260,10.0);farmercheck_p[playerid]=4;}
	case 4: { farmercheck_p[playerid] = 4; SetPlayerCheckpoint(playerid,2001.2141,224.0751,27.0462,10.0);farmercheck_p[playerid]=5;}
    case 5: { farmercheck_p[playerid] = 5; SetPlayerCheckpoint(playerid,1976.6199,227.9454,28.0352,10.0);farmercheck_p[playerid]=6;}
	case 6: { farmercheck_p[playerid] = 6; SetPlayerCheckpoint(playerid,1948.4553,231.6953,28.6932,10.0);farmercheck_p[playerid]=7;}
	case 7: { farmercheck_p[playerid] = 7; SetPlayerCheckpoint(playerid,1930.1212,234.1362,28.8397,10.0);farmercheck_p[playerid]=8;}
	case 8: { farmercheck_p[playerid] = 8; SetPlayerCheckpoint(playerid,1922.3245,211.6576,30.8735,10.0);farmercheck_p[playerid]=9;}
	case 9: { farmercheck_p[playerid] = 9; SetPlayerCheckpoint(playerid,1924.6665,190.5824,34.8554,10.0);farmercheck_p[playerid]=10;}
	case 10: { farmercheck_p[playerid] = 10; SetPlayerCheckpoint(playerid,1948.1859,184.9989,34.7120,10.0);farmercheck_p[playerid]=11;}
	case 11: { farmercheck_p[playerid] = 11; SetPlayerCheckpoint(playerid,1974.9332,179.8752,32.8827,10.0);farmercheck_p[playerid]=12;}
	case 12: { farmercheck_p[playerid] = 12; SetPlayerCheckpoint(playerid,1999.5504,174.9404,30.0854,10.0);farmercheck_p[playerid]=13;}
	case 13: { farmercheck_p[playerid] = 13; SetPlayerCheckpoint(playerid,2000.6898,199.5322,27.9642,10.0);farmercheck_p[playerid]=14;}
	case 14: { farmercheck_p[playerid] = 14; SetPlayerCheckpoint(playerid,2001.7979,229.7309,27.2696,10.0);farmercheck_p[playerid]=15;}
	case 15: { farmercheck_p[playerid] = 15; SetPlayerCheckpoint(playerid,1988.2975,233.1064,27.5054,10.0);farmercheck_p[playerid]=16;}
	case 16: { farmercheck_p[playerid] = 16; SetPlayerCheckpoint(playerid,1985.9049,211.1806,27.4447,10.0);farmercheck_p[playerid]=17;}
	case 17: { farmercheck_p[playerid] = 17; SetPlayerCheckpoint(playerid,1979.4604,180.5991,32.2500,10.0);farmercheck_p[playerid]=18;}
	case 18: { farmercheck_p[playerid] = 18; SetPlayerCheckpoint(playerid,1958.6803,181.7421,34.3568,10.0);farmercheck_p[playerid]=19;}
	case 19: { farmercheck_p[playerid] = 19; SetPlayerCheckpoint(playerid,1961.4175,204.6068,30.4859,10.0);farmercheck_p[playerid]=20;}
	case 20: { farmercheck_p[playerid] = 20; SetPlayerCheckpoint(playerid,1962.1940,233.5778,28.2251,10.0);farmercheck_p[playerid]=21;}
	case 21: { farmercheck_p[playerid] = 21; SetPlayerCheckpoint(playerid,1945.0916,238.9018,28.5156,10.0);farmercheck_p[playerid]=1;}

	}
	
 	if(farmercheck_p[playerid] >= 1 && PlayerInfo[playerid][pJob] == 6)
    {
	new combnum[10];

	format(combnum,sizeof(combnum),"~w~%d",vf1_check[playerid]);

	vf1_check[playerid] = vf1_check[playerid] + 1;
	GameTextForPlayer(playerid,combnum,1500,4);
    }

	if(vf1_check[playerid] == 450)
	{
	GameTextForPlayer(playerid,"~w~you have ~r~pass ~w~the target~n~~r~keep ~w~working untill half hour~n~will be pass",6000,3);
	GivePlayerMoney(playerid,750);
	}
	

    if(PlayerInfo[playerid][pJob] == 3 && p_vehicle == 10)
    {
        SendClientMessage(playerid,COLOR_GREY,"You got the the point you should have to, now use the next Command");
        SendClientMessage(playerid,COLOR_GREY,"/Gas load and wait where you are 2 minutes and wait till the cargo will be Full!");
        SetPlayerCheckpoint(playerid,1381.0818,477.6746,20.0106,5.0);
    }

	if(PlayerInfo[playerid][pJob] == 3 && p_vehicle == 9)
 	{
        SendClientMessage(playerid,COLOR_GREY,"You got the the point you should have to, now use the next Command");
        SendClientMessage(playerid,COLOR_GREY,"/Gas load and wait where you are 2 minutes and wait till the cargo will be Full!");
        SetPlayerCheckpoint(playerid,1381.0818,477.6746,20.0106,5.0);
  	}
  	
	if(PlayerInfo[playerid][pJob] == 3 && p_vehicle == 8)
 	{
        SendClientMessage(playerid,COLOR_GREY,"You got the the point you should have to, now use the next Command");
        SendClientMessage(playerid,COLOR_GREY,"/Gas load and wait where you are 2 minutes and wait till the cargo will be Full!");
        SetPlayerCheckpoint(playerid,1381.0818,477.6746,20.0106,5.0);
  	}

	if(PlayerInfo[playerid][pJob] == 3 && p_vehicle == 7)
 	{
        SendClientMessage(playerid,COLOR_GREY,"You got the the point you should have to, now use the next Command");
        SendClientMessage(playerid,COLOR_GREY,"/Gas load and wait where you are 2 minutes and wait till the cargo will be Full!");
        SetPlayerCheckpoint(playerid,1381.0818,477.6746,20.0106,5.0);
    }

	if(p_vehicle < 6 && p_vehicle > 11 && PlayerInfo[playerid][pJob] == 3)
    {
		SendClientMessage(playerid,COLOR_MEDBLUE,"Job Station: Now you got 2,000$ because you finished your job");
   		GivePlayerMoney(playerid,2000);
	}

	if (streetrace[playerid] == 2 && countdown[playerid]>0)
    {
    	GameTextForPlayer(playerid,"~w~You~g~ Won ~w~The Race",2000,4);
    	countdown[playerid]=0;
    	DisablePlayerCheckpoint(playerid);
    	SendClientMessage(playerid,COLOR_MEDBLUE,"SERVER: get back with the car to the racing garage !");
    	SendClientMessage(playerid,COLOR_WHITE,"SERVER: when the car will be back to the garage you'll get your money !");
    	raceblock[playerid]=2;
    }

    switch(streetrace[playerid]) {
    case 1: { streetrace[playerid] = 1; SetPlayerCheckpoint(playerid,-822.5609,1492.7379,19.1862,5.0);streetrace[playerid]=2;countdown[playerid]=35;countblock[playerid]=0;}
    case 2: { streetrace[playerid] = 3; SetPlayerCheckpoint(playerid,219.2276,-232.2660,1.6416,5.0);} // When Player End Race
    case 3: { streetrace[playerid] = 4; DisablePlayerCheckpoint(playerid);SetVehicleParamsForPlayer(1,playerid,0,1);SetVehicleToRespawn(1);raceblock[playerid]=0;GivePlayerMoney(playerid,1100);SetPlayerWantedLevel(playerid,0);} // When Player Get The Car Back

   }


	if (dragrace[playerid] == 2 && countdown[playerid]>0)
	{
    	GameTextForPlayer(playerid,"~w~You~g~ Won ~w~The Race",2000,4);
    	countdown[playerid]=0;
    	DisablePlayerCheckpoint(playerid);
    	SendClientMessage(playerid,COLOR_MEDBLUE,"SERVER: get back with the car to the racing garage !");
    	SendClientMessage(playerid,COLOR_WHITE,"SERVER: when the car will be back to the garage you'll get your money !");
    	dragblock[playerid]=2;
    }

    switch(dragrace[playerid]) {
    case 1: { dragrace[playerid] = 1; SetPlayerCheckpoint(playerid,1101.5875,574.6481,19.8828,5.0);dragrace[playerid]=2;countdown[playerid]=20;countblock[playerid]=0;}
    case 2: { dragrace[playerid] = 3; SetPlayerCheckpoint(playerid,215.2276,-232.2660,0.8416,5.0);} // When Player End Race
    case 3: { dragrace[playerid] = 4; DisablePlayerCheckpoint(playerid);SetVehicleParamsForPlayer(2,playerid,0,1);SetVehicleToRespawn(2);dragblock[playerid]=0;GivePlayerMoney(playerid,700);SetPlayerWantedLevel(playerid,0);} // When Player Get The Car Back

	}

    switch(pizzacheck[playerid]) {
    case 1: { pizzacheck[playerid] = 1; SetPlayerCheckpoint(playerid,252.8777,-92.4440,3.5354,1.0);pizzacheck[playerid]=2;}
    case 2: { pizzacheck[playerid] = 2; SetPlayerCheckpoint(playerid,295.0689,-54.5436,2.7772,1.0);pizzacheck[playerid]=3;}
    case 3: { pizzacheck[playerid] = 3; SetPlayerCheckpoint(playerid,743.6230,-509.7624,18.0129,1.0);pizzacheck[playerid]=4;}
    case 4: { pizzacheck[playerid] = 4; SetPlayerCheckpoint(playerid,744.9824,-556.6764,18.0129,1.0);pizzacheck[playerid]=5;}
    case 5: { pizzacheck[playerid] = 5; SetPlayerCheckpoint(playerid,768.1390,-503.4817,18.0129,1.0);pizzacheck[playerid]=6;}
    case 6: { pizzacheck[playerid] = 6; SetPlayerCheckpoint(playerid,766.6172,-556.7809,18.0129,1.0);pizzacheck[playerid]=7;}
    case 7: { pizzacheck[playerid] = 7; SetPlayerCheckpoint(playerid,791.6833,-506.2606,18.0129,1.0);pizzacheck[playerid]=8;}
    case 8: { pizzacheck[playerid] = 8; SetPlayerCheckpoint(playerid,818.2542,-509.3211,18.0129,1.0);pizzacheck[playerid]=9;}
    case 9: { pizzacheck[playerid] = 9; SetPlayerCheckpoint(playerid,745.6652,-591.0933,18.0129,1.0);pizzacheck[playerid]=10;}
    case 10: { pizzacheck[playerid] = 10; SetPlayerCheckpoint(playerid,746.4117,304.9869,20.2344,1.0);pizzacheck[playerid]=11;}
    case 11: { pizzacheck[playerid] = 11; SetPlayerCheckpoint(playerid,719.0798,300.5452,20.3766,1.0);pizzacheck[playerid]=12;}
    case 12: { pizzacheck[playerid] = 12; SetPlayerCheckpoint(playerid,201.5264,-96.9913,4.8965,1.0);pizzacheck[playerid]=13;}
    case 13: { pizzacheck[playerid] = 13; SetPlayerCheckpoint(playerid,160.6354,-112.7019,4.8965,1.0);pizzacheck[playerid]=14;}
    case 14: { pizzacheck[playerid] = 14; SetPlayerCheckpoint(playerid,2204.2766,62.4104,28.4416,1.0);pizzacheck[playerid]=15;}
    case 15: { pizzacheck[playerid] = 15; SetPlayerCheckpoint(playerid,2204.7593,106.1940,28.4416,1.0);pizzacheck[playerid]=16;}
    case 16: { pizzacheck[playerid] = 16; SetPlayerCheckpoint(playerid,2258.0474,167.5523,28.1536,1.0);pizzacheck[playerid]=17;}
    case 17: { pizzacheck[playerid] = 17; SetPlayerCheckpoint(playerid,2285.9099,161.1395,28.4416,1.0);pizzacheck[playerid]=18;}
    case 18: { pizzacheck[playerid] = 18; SetPlayerCheckpoint(playerid,2269.4846,111.2177,28.4416,1.0);pizzacheck[playerid]=19;}
    case 19: { pizzacheck[playerid] = 19; SetPlayerCheckpoint(playerid,2249.2925,111.3998,28.4416,1.0);pizzacheck[playerid]=20;}
    case 20: { pizzacheck[playerid] = 20; SetPlayerCheckpoint(playerid,2270.5596,-7.8291,28.1535,1.0);pizzacheck[playerid]=21;}
    case 21: { pizzacheck[playerid] = 21; SetPlayerCheckpoint(playerid,2253.7229,-1.9509,28.1536,1.0);pizzacheck[playerid]=22;}
    case 22: { pizzacheck[playerid] = 22; SetPlayerCheckpoint(playerid,2200.1372,-37.0914,28.1535,1.0);pizzacheck[playerid]=23;}
    case 23: { pizzacheck[playerid] = 23; SetPlayerCheckpoint(playerid,2197.6196,-60.5298,28.1535,1.0);pizzacheck[playerid]=24;}
    case 24: { pizzacheck[playerid] = 24; SetPlayerCheckpoint(playerid,2203.3215,-89.2738,28.1535,1.0);pizzacheck[playerid]=25;}
    case 25: { pizzacheck[playerid] = 25; SetPlayerCheckpoint(playerid,2245.4019,-121.9733,28.1535,1.0);pizzacheck[playerid]=26;}
    case 26: { pizzacheck[playerid] = 26; SetPlayerCheckpoint(playerid,2272.9583,-132.7989,28.1535,1.0);pizzacheck[playerid]=27;}
    case 27: { pizzacheck[playerid] = 27; SetPlayerCheckpoint(playerid,2293.7517,-124.5054,28.1535,1.0);pizzacheck[playerid]=28;}
    case 28: { pizzacheck[playerid] = 28; SetPlayerCheckpoint(playerid,2313.8955,-124.5490,28.1536,1.0);pizzacheck[playerid]=29;}
    case 29: { pizzacheck[playerid] = 29; SetPlayerCheckpoint(playerid,2368.1377,-62.6682,28.1535,1.0);pizzacheck[playerid]=30;}
    case 30: { pizzacheck[playerid] = 30; SetPlayerCheckpoint(playerid,2392.3184,-54.4207,28.1536,1.0);pizzacheck[playerid]=31;}
    case 31: { pizzacheck[playerid] = 31; SetPlayerCheckpoint(playerid,2373.9199,-8.7172,28.4416,1.0);pizzacheck[playerid]=32;}
    case 32: { pizzacheck[playerid] = 32; SetPlayerCheckpoint(playerid,2374.1316,22.0860,28.4416,1.0);pizzacheck[playerid]=33;}
    case 33: { pizzacheck[playerid] = 33; SetPlayerCheckpoint(playerid,2411.2205,-5.4391,27.6835,1.0);pizzacheck[playerid]=34;}
    case 34: { pizzacheck[playerid] = 34; SetPlayerCheckpoint(playerid,2416.6731,17.8839,27.6835,1.0);pizzacheck[playerid]=35;}
    case 35: { pizzacheck[playerid] = 35; SetPlayerCheckpoint(playerid,2374.7888,22.0979,28.4416,1.0);pizzacheck[playerid]=36;}
    case 36: { pizzacheck[playerid] = 36; SetPlayerCheckpoint(playerid,2374.1689,42.2692,28.4416,1.0);pizzacheck[playerid]=37;}
    case 37: { pizzacheck[playerid] = 37; SetPlayerCheckpoint(playerid,2398.3318,111.1301,28.4416,1.0);pizzacheck[playerid]=38;}
    case 38: { pizzacheck[playerid] = 38; SetPlayerCheckpoint(playerid,2458.7654,128.5634,27.6756,1.0);pizzacheck[playerid]=39;}
    case 39: { pizzacheck[playerid] = 39; SetPlayerCheckpoint(playerid,2480.9146,126.5651,27.6756,1.0);pizzacheck[playerid]=40;}
    case 40: { pizzacheck[playerid] = 40; SetPlayerCheckpoint(playerid,2518.2178,128.5134,27.6756,1.0);pizzacheck[playerid]=41;}
    case 41: { pizzacheck[playerid] = 41; SetPlayerCheckpoint(playerid,2536.3091,128.8714,27.6835,1.0);pizzacheck[playerid]=42;}
    case 42: { pizzacheck[playerid] = 42; SetPlayerCheckpoint(playerid,2514.3940,95.0959,27.6835,1.0);pizzacheck[playerid]=43;}
    case 43: { pizzacheck[playerid] = 43; SetPlayerCheckpoint(playerid,2556.4697,87.9458,27.6756,1.0);pizzacheck[playerid]=44;}
    case 44: { pizzacheck[playerid] = 44; SetPlayerCheckpoint(playerid,2558.2751,63.1789,27.6756,1.0);pizzacheck[playerid]=45;}
    case 45: { pizzacheck[playerid] = 45; SetPlayerCheckpoint(playerid,2548.5527,25.1359,27.6756,1.0);pizzacheck[playerid]=46;}
    case 46: { pizzacheck[playerid] = 46; SetPlayerCheckpoint(playerid,2551.2202,-5.6545,27.6756,1.0);pizzacheck[playerid]=47;}
    case 47: { pizzacheck[playerid] = 47; SetPlayerCheckpoint(playerid,2513.5117,-27.7590,28.4416,1.0);pizzacheck[playerid]=48;}
    case 48: { pizzacheck[playerid] = 48; SetPlayerCheckpoint(playerid,2484.6067,-27.9941,28.4416,1.0);pizzacheck[playerid]=49;}
    case 49: { pizzacheck[playerid] = 49; SetPlayerCheckpoint(playerid,2439.3833,-68.4647,28.1540,1.0);pizzacheck[playerid]=1;}

   }
   
  	if(pizzacheck[playerid] >= 1 && PlayerInfo[playerid][pJob] == 4 && PlayerInfo[playerid][pDelivery] == 4)
    {
	new pizzanum[10];

	format(pizzanum,sizeof(pizzanum),"~w~%d",pizza_check[playerid]);

	pizza_check[playerid] = pizza_check[playerid] + 1;
	GameTextForPlayer(playerid,pizzanum,1500,4);
	GivePlayerMoney(playerid,2);
    }

	return 1;
}

public OnPlayerLeaveCheckpoint(playerid)
{
	printf("OnPlayerLeaveCheckpoint(%d)", playerid);
	return 1;
}

public OnPlayerEnterRaceCheckpoint(playerid)
{
	return 1;
}

public OnPlayerLeaveRaceCheckpoint(playerid)
{
	return 1;
}

public OnRconCommand(cmd[])
{
	return 1;
}

public OnObjectMoved(objectid)
{
	return 1;
}

public OnPlayerObjectMoved(playerid, objectid)
{
	return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
	return 1;
}

public OnPlayerSelectedMenuRow(playerid, row)
{

	new Menu:Main1 = GetPlayerMenu(playerid);
	new vid;
	vid = GetPlayerVehicleID(playerid);



	if (Main1 == menu[playerid])
	{
		{
		switch (row)
		{
			case 0:
			{
				if(GetPlayerMoney(playerid) >= 1250)
				{
				GivePlayerMoney(playerid,-1250);
				AddVehicleComponent(vid,1010);
				SendClientMessage(playerid,COLOR_GREY,"* You have bought 10x Nitros!");
				TogglePlayerControllable(playerid, 1);
				PlayerPlaySound(playerid,1149,0.0,0.0,0.0);
				ShowMenuForPlayer(menu[playerid], playerid);
				TogglePlayerControllable(playerid, 0);
				}
				else
				{
				PlayerPlaySound(playerid,1085,0.0,0.0,0.0);
				ShowMenuForPlayer(menu[playerid], playerid);
				TogglePlayerControllable(playerid, 0);
				}
			}

			case 1:
			{
				if(GetPlayerMoney(playerid) >= 2480)
				{
				GivePlayerMoney(playerid,-2480);
				AddVehicleComponent(vid,1087);
				SendClientMessage(playerid,COLOR_GREY,"* You have bought Hydralics!");
				TogglePlayerControllable(playerid, 1);
				PlayerPlaySound(playerid,1149,0.0,0.0,0.0);
				ShowMenuForPlayer(menu[playerid], playerid);
				TogglePlayerControllable(playerid, 0);
				}
				else
				{
				PlayerPlaySound(playerid,1085,0.0,0.0,0.0);
				ShowMenuForPlayer(menu[playerid], playerid);
				TogglePlayerControllable(playerid, 0);
				}
			}
			
			case 2:
			{
				if(GetPlayerMoney(playerid) >= 1720)
				{
				GivePlayerMoney(playerid,-1720);
				AddVehicleComponent(vid,1025);
				SendClientMessage(playerid,COLOR_GREY,"* You have bought an off road Tires!");
				TogglePlayerControllable(playerid, 1);
				PlayerPlaySound(playerid,1149,0.0,0.0,0.0);
				ShowMenuForPlayer(menu[playerid], playerid);
				TogglePlayerControllable(playerid, 0);
				}
				else
				{
				PlayerPlaySound(playerid,1085,0.0,0.0,0.0);
				ShowMenuForPlayer(menu[playerid], playerid);
				TogglePlayerControllable(playerid, 0);
				}
			}
			
			case 3:
			{
				if(GetPlayerMoney(playerid) >= 2100)
				{
				GivePlayerMoney(playerid,-900);
				AddVehicleComponent(vid,1085);
				SendClientMessage(playerid,COLOR_GREY,"* You have bought a magnesium Wheels!");
				TogglePlayerControllable(playerid, 1);
				PlayerPlaySound(playerid,1149,0.0,0.0,0.0);
				ShowMenuForPlayer(menu[playerid], playerid);
				TogglePlayerControllable(playerid, 0);
				}
				else
				{
				PlayerPlaySound(playerid,1085,0.0,0.0,0.0);
				ShowMenuForPlayer(menu[playerid], playerid);
				TogglePlayerControllable(playerid, 0);
				}
			}
			
			case 4:
			{
				if(GetPlayerMoney(playerid) >= 770)
				{
				GivePlayerMoney(playerid,-770);
				AddVehicleComponent(vid,1018);
				SendClientMessage(playerid,COLOR_GREY,"* You have bought a twin Exhaust!");
				TogglePlayerControllable(playerid, 1);
				PlayerPlaySound(playerid,1149,0.0,0.0,0.0);
				ShowMenuForPlayer(menu[playerid], playerid);
				TogglePlayerControllable(playerid, 0);
				}
				else
				{
				PlayerPlaySound(playerid,1085,0.0,0.0,0.0);
				ShowMenuForPlayer(menu[playerid], playerid);
				TogglePlayerControllable(playerid, 0);
				}
			}
			
			case 5:
			{
				if(GetPlayerMoney(playerid) >= 170)
				{
				GivePlayerMoney(playerid,-170);
				SetVehicleHealth(vid,1000);
				
				SendClientMessage(playerid,COLOR_GREY,"* Your car has been Fixed!");
				TogglePlayerControllable(playerid, 1);
				PlayerPlaySound(playerid,1149,0.0,0.0,0.0);
				ChangeVehicleColor(vid,-1,-1);
				
				ShowMenuForPlayer(menu[playerid], playerid);
				TogglePlayerControllable(playerid, 0);
				}
				else
				{
				PlayerPlaySound(playerid,1085,0.0,0.0,0.0);
				ShowMenuForPlayer(menu[playerid], playerid);
				TogglePlayerControllable(playerid, 0);
				}
			}
			case 6:
			{
				if(GetPlayerMoney(playerid) >= 25000)
				{
					if(GetVehicleModel(vid) == 562) // Elegy
					{
						AddVehicleComponent(vid,1171);
						AddVehicleComponent(vid,1034);
						AddVehicleComponent(vid,1035);
						AddVehicleComponent(vid,1040);
						AddVehicleComponent(vid,1041);
						AddVehicleComponent(vid,1147);
						AddVehicleComponent(vid,1148);
						AddVehicleComponent(vid,1087);
						AddVehicleComponent(vid,1073);
						AddVehicleComponent(vid,1010);
						GivePlayerMoney(playerid,-25000);
						ShowMenuForPlayer(menu[playerid], playerid);
						TogglePlayerControllable(playerid, 0);
					}
					else if(GetVehicleModel(vid) == 560) // Sultan
					{
						AddVehicleComponent(vid,1028);
						AddVehicleComponent(vid,1030);
						AddVehicleComponent(vid,1031);
						AddVehicleComponent(vid,1032);
						AddVehicleComponent(vid,1140);
						AddVehicleComponent(vid,1139);
						AddVehicleComponent(vid,1085);
						AddVehicleComponent(vid,1010);
						GivePlayerMoney(playerid,-25000);
						ShowMenuForPlayer(menu[playerid], playerid);
						TogglePlayerControllable(playerid, 0);
					}
					else if(GetVehicleModel(vid) == 565) // Flash
					{
						AddVehicleComponent(vid,1045);
						AddVehicleComponent(vid,1047);
						AddVehicleComponent(vid,1050);
						AddVehicleComponent(vid,1052);
						AddVehicleComponent(vid,1152);
						AddVehicleComponent(vid,1085);
						AddVehicleComponent(vid,1010);
						GivePlayerMoney(playerid,-25000);
						ShowMenuForPlayer(menu[playerid], playerid);
						TogglePlayerControllable(playerid, 0);
					}
					else if(GetVehicleModel(vid) == 536) // Blade
					{
						AddVehicleComponent(vid,1182);
                        AddVehicleComponent(vid,1184);
						AddVehicleComponent(vid,1085);
						AddVehicleComponent(vid,1128);
						AddVehicleComponent(vid,1108);
						AddVehicleComponent(vid,1104);
						AddVehicleComponent(vid,1010);
						GivePlayerMoney(playerid,-25000);
						ShowMenuForPlayer(menu[playerid], playerid);
						TogglePlayerControllable(playerid, 0);
					}
					else { SendClientMessage(playerid,COLOR_GREY,"* You can't put upgrade kit to this vehicle!"); return 1; }
				}
				else
				{
				PlayerPlaySound(playerid,1085,0.0,0.0,0.0);
				ShowMenuForPlayer(menu[playerid], playerid);
				TogglePlayerControllable(playerid, 0);
				}
			}
			
			
        }
		}
	}

	return 1;
}


public OnPlayerExitedMenu(playerid)
{

    TogglePlayerControllable(playerid, 1);
	return 1;
}


//------------------------------------------------

IsKeyJustDown(key, newkeys, oldkeys)
{
	if((newkeys & key) && !(oldkeys & key)) return 1;
	return 0;
}

//------------------------------------------------

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{

// Enter Spots






	if(spot[playerid] == SPOT_JOB_BLUEBERRY) // Job Station Blue Berry Enter
	{
		if(IsKeyJustDown(KEY_CROUCH,newkeys,oldkeys))
		{
		SetPlayerPos(playerid,384.9390,173.9473,1008.3828);
		SetPlayerInterior(playerid,3);
		SetPlayerFacingAngle(playerid,88.7467);
    	}
	}


 	return 1;
}

public OnPlayerPrivmsg(playerid, recieverid, text[])
{

	return 1;
}


public CheckInfo()
{

  new i;
  new Float:health;
  new Float:x;
  new Float:y;
  new Float:z;

  spot[i]=SPOT_NONE;
  
  for(i=0;i<MAX_PLAYERS;i++)
  {
   	if( IsPlayerConnected(i))
   	{

     GetPlayerPos(i,x,y,z);


// DANGER AREAS


     if(IsPlayerInSphere(i,1271.6560,295.0623,20.6563,5)) // Gas Hole In Montogomery
     {
	 GetPlayerHealth(i,health);
	 SetPlayerHealth(i, health - 3);
	 GameTextForPlayer(i,"~y~ DANGER GAS HOLE~n~STAY AWAY",1200,6);
	 }

// SPOTS


     else if(
	 IsPlayerInSphere(i,2785.6238,-2410.8291,13.6342,3)
	 ||IsPlayerInSphere(i,2785.5095,-2425.2878,13.6342,3)
	 ||IsPlayerInSphere(i,2793.6167,-2426.0466,13.6322,3)
	 ||IsPlayerInSphere(i,2793.5530,-2409.6770,13.6323,3)
	 ) // Parts For Mechanics
	 {
     GameTextForPlayer(i,"~w~in order to take packages for mechanic~n~tuning type ~y~/~w~take metals",1200,3);
	 }
	 
     else if(IsPlayerInSphere(i,-179.7120,1133.1661,19.7422,2)) // BANK
	 {
     GameTextForPlayer(i,"~p~Fort Carson~y~:~w~Bank~n~use ~y~/~w~enter ~y~/~w~exit",1200,3);
	 }

     else if(IsPlayerInSphere(i,493.4291,-23.7157,1000.6797,3)) // Dancing Club [Dillimore] Exit Block
	 {
     SetPlayerPos(i,814.4175,-563.9013,16.3359);
     SetPlayerInterior(i,0);
     SetPlayerFacingAngle(i,270.7226);
     playerinclub = playerinclub - 1;
	 }
	 
	 else if(IsPlayerInSphere(i,2507.4404,1245.2101,10.8203,4)) // Dancing Club [Dillimore] Exit Block
	 {
     SetPlayerPos(i,814.4175,-563.9013,16.3359);
     SetPlayerInterior(i,0);
     SetPlayerFacingAngle(i,270.7226);
     playerinclub = playerinclub - 1;
	 }

	 else if(IsPlayerInSphere(i,390.2871,172.3881,1008.3828,4) || IsPlayerInSphere(i,2415.6001,1123.7100,10.8203,4)) // Mayor Statino [BlueBerry] Exit BlocK
	 {
	 SetPlayerPos(i,207.7392,-64.7814,1.5781);
     SetPlayerInterior(i,0);
     SetPlayerFacingAngle(i,182.4343);
	 }

     else if(IsPlayerInSphere(i,503.3813,-11.5668,1000.6797,2)) // Dancing Club [Dillimore] VIP DOOR
	 {
     GameTextForPlayer(i,"~w~type ~y~/~b~enter~w~ to enter~n~enter for club staff only",1200,3);
	 }

     else if(IsPlayerInSphere(i,1204.7139,6.2501,1000.9219,2)) // Dancing Club [Dillimore]
	 {
     GameTextForPlayer(i,"~w~type ~y~/~b~exit~w~ to exit",1200,3);
	 }

     else if(IsPlayerInSphere(i,811.8522,-564.4258,16.3359,2)) // Dancing Club [Dillimore]
	 {
     GameTextForPlayer(i,"~b~Dancing Club~y~:~w~dillimore~n~type ~y~/~b~enter~w~ to enter~n~and ~y~/~b~exit~w~ to exit",1200,3);
	 spot[i] = SPOT_CLUB;
	 }

     else if(IsPlayerInSphere(i,2313.9375,56.4570,26.4806,2)) // Arms Dealer Job [PALOMINO CREEK]
	 {
     GameTextForPlayer(i,"~w~You can become an ~g~arms dealer~n~~w~here, ~w~type ~y~/~g~armsdealer ~w~if you wish to become one",1200,3);
	 spot[i] = SPOT_JOB_ARMS;
	 }
	 
     else if(IsPlayerInSphere(i,-168.2362,1032.0129,19.7344,2)) // Arms Dealer get [PALOMINO CREEK]
	 {
     GameTextForPlayer(i,"~w~in order to get materials type~n~~y~/~g~materials get",1200,3);
	 spot[i] = SPOT_JOB_ARMS_GET;
	 }
	 
     else if(IsPlayerInSphere(i,2326.4529,63.1036,26.4922,2)) // Arms Dealer drop [PALOMINO CREEK]
     {
     GameTextForPlayer(i,"~w~in order to drop materials type~n~~y~/~g~materials drop",1200,3);
     spot[i] = SPOT_JOB_ARMS_DROP;
     }

     else if(IsPlayerInSphere(i,221.1587,118.2101,1010.2188,2)) // Demedici Back Enter
     {
     GameTextForPlayer(i,"~w~type~y~/~p~exit~w~ to exit",1200,3);
     spot[i] = SPOT_ICECREAMGET;
	 }

	 else if(IsPlayerInSphere(i,1324.3359,286.5356,20.0452,2)) // Demedici Back Enter
	 {
     GameTextForPlayer(i,"~w~in order to get 5 icecreams type~n~~y~/~p~take icecream",1200,3);
	 spot[i] = SPOT_ICECREAMGET;
	 }

	 else if(IsPlayerInSphere(i,2407.0066,84.0189,26.4735,2)) // Demedici Back Enter
	 {
     GameTextForPlayer(i,"~w~You can become a ~g~icecream seller~n~~w~here, ~w~type ~y~/~g~icecream ~w~if you wish to become one",1200,3);
	 spot[i] = SPOT_ICECREAM;
	 }

	 else if(IsPlayerInSphere(i,2088.6072,-114.4732,1.8195,2)) // Demedici Back Enter
	 {
     GameTextForPlayer(i,"~g~demedici house~y~:~w~palomino~n~type ~y~/~w~enter to enter and~n~~y~/~w~exit to exit",1200,3);
	 spot[i] = SPOT_DEMEDICIBACKENTER;
	 }
	 
	 else if(IsPlayerInSphere(i,1298.8462,-793.2491,1084.0078,4)) // Demedici Back Exit
	 {
	 spot[i] = SPOT_DEMEDICIBACKEXIT;
	 }

	 else if(IsPlayerInSphere(i,2106.3577,-101.7386,2.0264,2)) // Demedici Main Enter
	 {
     GameTextForPlayer(i,"~g~demedici house~y~:~w~palomino~n~type ~y~/~w~enter to enter and~n~~y~/~w~exit to exit",1200,3);
	 spot[i] = SPOT_DEMEDICIMAINENTER;
	 }
	 
	 else if(IsPlayerInSphere(i,1264.7218,-781.9965,1091.9063,4)) // Demedici Main Exit
	 {
	 spot[i] = SPOT_DEMEDICIMAINEXIT;
	 }
	 
	 else if(IsPlayerInSphere(i,203.2578,-183.0827,1.5781,2)) // TAKE PIZZA
	 {
     GameTextForPlayer(i,"~w~in order to take pizza~w~~n~type ~y~/~r~take pizza",1200,3);
	 spot[i] = SPOT_TAKEPIZZA;
	 }

	 else if(IsPlayerInSphere(i,1373.3511,405.3483,19.9555,2)) // BUS JOB
	 {
     GameTextForPlayer(i,"~p~montogomery~y~:~w~ school~n~type ~y~/~w~enter to enter~n~and ~y~/~w~exit to exit",1200,3);
	 spot[i] = SPOT_SCHOOLSTUDY;
	 }
	 
	 else if(IsPlayerInSphere(i,1227.0087,311.6913,19.7578,2)) // BUS JOB
	 {
     GameTextForPlayer(i,"~w~You can become a ~p~bus driver~n~~w~here, ~w~type ~y~/~p~bus ~w~if you wish to become one",1200,3);
	 spot[i] = SPOT_BUS;
	 }
	 
	 else if(IsPlayerInSphere(i,1918.2163,172.8078,37.2595,2)) // FARME PALOMINO JOB
	 {
     GameTextForPlayer(i,"~w~You can become a ~g~farmer~n~~w~here, ~w~type ~y~/~g~farmer palomino ~w~if you wish to become one",1200,3);
	 spot[i] = SPOT_FARMEBLUEBERRY;
	 }
	 
	 else if(IsPlayerInSphere(i,206.3718,-225.6544,1.7786,2)) // MECHANIC JOB
	 {
     GameTextForPlayer(i,"~w~You can become a ~b~mechanic~n~~w~here, ~w~type ~y~/~b~mechanic ~w~if you wish to become one",1200,3);
	 spot[i] = SPOT_MECHANIC;
	 }

	 else if(IsPlayerInSphere(i,301.8627,-75.0630,1001.5156,1)) // Exit range from enter
	 {
     GameTextForPlayer(i,"~b~Ammonation~y~:~w~ Local~n~~w~use ~y~/~w~exit",1200, 3);
	 spot[i] = SPOT_RANGE_EXIT;
	 }

	 else if(IsPlayerInSphere(i,304.4310,-57.6886,1001.5156,1)) // Exit range from ins enter
	 {
	 GameTextForPlayer(i,"~b~Ammonation~y~:~w~ Local~n~~w~use ~y~/~w~exit",1200, 3);
	 spot[i] = SPOT_RANGE_EINS;
  	 }

      else if(IsPlayerInSphere(i,302.5721,-57.7382,1001.5156,1)) // Ammo Nation Range Enter
      {
      GameTextForPlayer(i,"~b~Ammonation~y~:~w~ Local~n~~w~use ~y~/~w~enter~n~~w~- ~b~instructors only~w~ -",1200, 3);
      spot[i] = SPOT_RANGE_INS;
      }

      else if(IsPlayerInSphere(i,301.7877,-77.1030,1001.5156,1)) // Ammo Nation Range
  	   {
      GameTextForPlayer(i,"~b~Ammonation~y~:~w~ Local~n~~w~use ~y~/~w~enter",1200, 3);
      spot[i] = SPOT_RANGE;
      }

      else if(IsPlayerInSphere(i,295.7410,-80.4790,1001.5156,2) && PlayerInfo[i][pGunLic] != 1) // Ammo Nation Buy Block
      {
	  SetPlayerWantedLevel(i,GetPlayerWantedLevel(i)+1);
	  GameTextForPlayer(i,"~b~your ~w~not allowed~b~ to buy here.~n~~b~you dont have a weapon ~w~license~n~",5300,3);
 	  SetPlayerPos(i,294.3015,-80.8025,1001.5156);
	  SetPlayerFacingAngle(i,201.6202);
	  SetPlayerInterior(i,4);
      }

      else if(IsPlayerInSphere(i,-219.5037,1403.8104,27.7734,2)) // Bar In Dillimore [JOB]
      {
      GameTextForPlayer(i,"~w~You can become a ~b~Barman~n~~w~here, ~w~type ~y~/~b~barman ~w~if you wish to become one",1200,3);
      spot[i] = SPOT_JOB_BARMAN;
      }

      else if(IsPlayerInSphere(i,681.6143,-473.8615,16.5363,2)) // Bar In Dillimore
      {
      GameTextForPlayer(i,"~b~drinking bar~y~:~w~ dillimore~n~~w~use ~y~/~w~enter ~y~/~w~exit",1200, 3);
      spot[i] = SPOT_BAR;
      }

      else if(IsPlayerInSphere(i,2273.8552,82.5335,26.4844,2)) // Driving School [PALOMINO CREEK]
      {
      GameTextForPlayer(i,"~g~driving school~y~:~w~ PALOMINO~n~~w~use ~y~/~w~enter ~y~/~w~exit",1200, 3);
      spot[i] = SPOT_SCHOOL_CREEK;
      }

      else if(IsPlayerInSphere(i,215.8799,14.4829,2.5708,2)) // Driving School [BLUEBERRY]
      {
      GameTextForPlayer(i,"~r~driving school~y~:~w~ BLUEBERRY~n~~w~use ~y~/~w~enter ~y~/~w~exit",1200, 3);
      spot[i] = SPOT_SCHOOL;
      }

      else if(IsPlayerInSphere(i,209.7379,-226.5186,1.7786,2)) // Racing Garage [BLUEBERRY]
      {
      GameTextForPlayer(i,"~r~racing garage~y~:~w~ BLUEBERRY~n~~w~Type ~y~/~r~sprint-race ~w~to start race~n~~w~Type ~y~/~r~drag-race ~w~to start race",1200, 3);
      spot[i] = SPOT_Garage;
      }

      else if(IsPlayerInSphere(i,-331.2393,1050.8628,19.7392,2)) // HOSPITAL JOB [DILLIMORE]
      {
      GameTextForPlayer(i,"~w~You can become a ~b~paramedic~n~~w~here, ~w~type ~y~/~b~medic ~w~if you wish to become one",1200,3);
      spot[i] = SPOT_HOSPITAL;
      }

      else if(IsPlayerInSphere(i,691.5836,-546.8424,16.3359,2)) // General Store [DILLIMORE]
      {
      GameTextForPlayer(i,"~b~General Store~y~:~w~ dillimore~n~~w~use ~y~/~w~enter ~y~/~w~exit",1200, 3);
      spot[i] = SPOT_GS_DILLIMORE;
      }
      
      else if(IsPlayerInSphere(i,1374.4208,300.2069,19.7392,2)) // TAXI JOB [DILLIMORE]
      {
      GameTextForPlayer(i,"~p~General Store~y~:~w~ montogomery~n~~w~use ~y~/~w~enter ~y~/~w~exit",1200, 3);
      spot[i] = SPOT_GS_MONTOGOMERY;
      }
      
      else if(IsPlayerInSphere(i,204.1196,-231.0773,1.7786,4) && IsATunnedCar(i)) // Garage Text
      {
      GameTextForPlayer(i,"~w~type ~y~/~r~Garage ~w~to upgrade your car",1200,5);
      }

      else if(IsPlayerInSphere(i,213.2069,-182.8633,1.5781,2)) // PIZZA JOB [BLUEBERRY]
      {
      GameTextForPlayer(i,"~w~You can become a ~r~pizza boy~n~~w~here, ~w~type ~y~/~r~pizza ~w~if you wish to become one",1200,3);
      spot[i] = SPOT_PIZZA;
      }

      else if(IsPlayerInSphere(i,252.9260,-62.7560,1.5781,2)) // ALCOHOL JOB [BLUEBERRY]
      {
      GameTextForPlayer(i,"~w~You can become a ~n~~r~alcoholic smuggler ~w~here,~n~~w~type ~y~/~r~alcohol ~w~if you wish to become one",1200,3);
      spot[i] = SPOT_ALCOHOL;
      }

      else if(IsPlayerInSphere(i,-49.8395,-269.7327,6.6332,2)) // TRUCK JOB [BLUEBERRY]
      {
      GameTextForPlayer(i,"~w~You can become a ~r~trucker~n~~w~here, ~w~type ~y~/~r~truck ~w~if you wish to become one",1200,3);
      spot[i] = SPOT_TRUCK;
      }

      else if(IsPlayerInSphere(i,-79.0716,90.7620,3.1172,2)) // FARMER JOB [BLUEBERRY]
      {
      GameTextForPlayer(i,"~w~You can become a ~r~farmer~n~~w~here, ~w~type ~y~/~r~farmer blueberry ~w~if you wish to become one",1200,3);
      spot[i] = SPOT_FARMER;
      }

      else if(IsPlayerInSphere(i,207.8452,-62.9924,1.5781,2)) // Job Station [BLUEBERRY]
      {
      GameTextForPlayer(i,"~r~job station~y~:~w~BlueBerry~n~~w~use ~y~/~w~enter ~y~/~w~exit",1200, 3);
      spot[i] = SPOT_JOB_BLUEBERRY;
      }

      else if(IsPlayerInSphere(i,197.0348,-232.5537,1.7786,2)) // [Store]  Racing Garage
      {
      spot[i] = SPOT_GarageSTORE;
      }

      else if(IsPlayerInSphere(i,201.2415,-203.5590,1.5781,2)) // [Store]  Pizza
      {
      spot[i] = SPOT_PIZZASTORE;
      }
      
      else if(IsPlayerInSphere(i,418.2950,-80.1018,1001.8047,2)) // [Store]  Barber
      {
      spot[i] = SPOT_BARBERSTORE;
      }

      else if(IsPlayerInSphere(i,701.8361,-519.7315,16.3340,2)) // [Store]  Bikes Shop
      {

      spot[i] = SPOT_BIKESSTORE;
      }
      else
      {
	  spot[i] = SPOT_NONE;
      }
   	}
  }
  return 1;

}



public DoCountDown()
{
	new i;
	new output[10];

    for (i=0;i<MAX_PLAYERS;i++)
    {
        if( IsPlayerConnected(i) )
        {
			if(countdown[i] > 0)
			{
                format(output, sizeof(output), "~w~%d", countdown[i]);
     			GameTextForPlayer(i,output, 1000, 4);
     			countdown[i] = countdown[i] - 1;
			}
			else
			{
			    if(countblock[i] == 0)
       			{
			        countblock[i]++;
     				GameTextForPlayer(i,"~r~Failed", 2500, 4);
					RemovePlayerFromVehicle(i);
					DisablePlayerCheckpoint(i);

                	if(raceblock[i] == 1 && streetrace[i] == 1)
                	{
					streetrace[i]=0;
					raceblock[i]=0;
					race = race - 1;
					}
					
                 	else if(dragblock[i] == 1 && dragrace[i] == 1)
                 	{
					dragblock[i]=0;
    				dragrace[i]=0;
    				drag = drag - 1;
    				}
				}
			}
		}
	}
}

public PayDay()
{
	new h;
	new m;
	new s;
	new i;
	new string[128];
	new account;

  	for(i=0;i<MAX_PLAYERS;i++)
	{
		if( IsPlayerConnected(i) )
    	{
	      	gettime(h,m,s);

			if(m == 0)
			{
			    if(PlayerInfo[i][pLevel] > 0)
			    {
				    new checks = PlayerInfo[i][pPayCheck]/43;
				    account = PlayerInfo[i][pAccount];
				    GivePlayerMoney(i, checks);
					GameTextForPlayer(i,"~y~payday ~n~~w~paycheck",500,1);
					SendClientMessage(i,COLOR_WHITE,"|-----  PayDay Statment  -----|");
					format(string, sizeof(string), "  Employment Office: $%d", checks);
					SendClientMessage(i, COLOR_GREY, string);
					format(string, sizeof(string), "  New pocket money: $%d", GetPlayerMoney(i));
					SendClientMessage(i, COLOR_GREY, string);
					format(string, sizeof(string), "  Current Balance: $%d", account);
					SendClientMessage(i, COLOR_GREY, string);
					format(string, sizeof(string), "  New Balance: $%d", PlayerInfo[i][pAccount]);
					SendClientMessage(i, COLOR_GREY, string);
					SendClientMessage(i,COLOR_GREY,"|----------------------------------|");
					PlayerInfo[i][pConnectTime] += 1;
					PlayerInfo[i][pExp]++;
				}
			}
    	}
	}
	return 1;
}



public JobPay()
{

  	new i, money;

  	for(i=0;i<MAX_PLAYERS;i++)
  	{
  	 	if( IsPlayerConnected(i) )
    	{
			money = 0;
	 		if (owner[i] == 1)
	 	  {
      		money = money + 2570;
	  		}
			if (owner[i] == 2)
	  		{
      		money = money + 670;
	  		}
	  		if (owner[i] == 3)
	  		{
      		money = money + 700;
	  		}
	  		if (owner[i] == 4)
	  		{
     	 	money = money + 430;
    		}
		}
    	GivePlayerMoney(i,money);
	}
  	return 1;
}

stock ini_GetKey( line[] )
{
	new keyRes[256];
	keyRes[0] = 0;
    if ( strfind( line , "=" , true ) == -1 ) return keyRes;
    strmid( keyRes , line , 0 , strfind( line , "=" , true ) , sizeof( keyRes) );
    return keyRes;
}

stock ini_GetValue( line[] )
{
	new valRes[256];
	valRes[0]=0;
	if ( strfind( line , "=" , true ) == -1 ) return valRes;
	strmid( valRes , line , strfind( line , "=" , true )+1 , strlen( line ) , sizeof( valRes ) );
	return valRes;
}

stock GetIdFromName(const name[])
{
	new i;
	new playerName[256];

	for(i=0; i<MAX_PLAYERS; i++)
	{
	    if( IsPlayerConnected(i) )
	    {
	        GetPlayerName(i,playerName,sizeof(playerName));

	        if(compare(playerName,name))
	        {
	            return i;
	        }
	    }
	}

	return -1;
}

public ResetWanted()
{
	new i;

	for(i=0; i<MAX_PLAYERS; i++)
	{
        if( IsPlayerConnected(i) )
	    {
   			if(GetPlayerWantedLevel(i) == 0)
    		{
       			SetPlayerWantedLevel(i,0);
			}

    		if(GetPlayerWantedLevel(i) == 1)
    		{
       			SetPlayerWantedLevel(i,0);
			}

 		    if(GetPlayerWantedLevel(i) == 2)
    		{
    			SetPlayerWantedLevel(i,1);
			}

   			if(GetPlayerWantedLevel(i) == 3)
    		{
    			SetPlayerWantedLevel(i,2);
			}

            if(GetPlayerWantedLevel(i) == 4)
    		{
    			SetPlayerWantedLevel(i,3);
			}

   			if(GetPlayerWantedLevel(i) == 5)
    		{
    			SetPlayerWantedLevel(i,4);
			}

			if(GetPlayerWantedLevel(i) == 6)
    		{
    			SetPlayerWantedLevel(i,5);
			}
 		}
	}

	return 1;
}


stock SystemMsg(playerid,msg[])
{
   if ((IsPlayerConnected(playerid))&&(strlen(msg)>0))
   {
   SendClientMessage(playerid,COLOR_WHITE,msg);
   }
   return 1;
}

stock PlayerName(playerid)
{
  new name[255];
  GetPlayerName(playerid, name, 255);
  
  return name;
}

public JobTimeCounter()
{

	new i;
	

	for(i=0; i<MAX_PLAYERS; i++)
	{
 		if( IsPlayerConnected(i) )
		{
			if(PlayerInfo[i][pJob] == 5)
			{
			 	if(jobtimer[i] == 1)
		 		{
		 		jobcounter[i] = jobcounter[i] + 1;
		 		}

				if(jobcounter[i] == 2)
	 			{
			 	SendClientMessage(i,COLOR_WHITE,"Congratulations, you have done you'r job for today you're free to work any job!");
			 	}
			}
		}
	}


	return 1;
}

public ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5)
{
	if(IsPlayerConnected(playerid))
	{
		new Float:posx, Float:posy, Float:posz;
		new Float:oldposx, Float:oldposy, Float:oldposz;
		new Float:tempposx, Float:tempposy, Float:tempposz;
		GetPlayerPos(playerid, oldposx, oldposy, oldposz);
		//radi = 2.0; //Trigger Radius
		for(new i = 0; i < MAX_PLAYERS; i++)
		{
			if(IsPlayerConnected(i))
			{
				if(!BigEar[i])
				{
					GetPlayerPos(i, posx, posy, posz);
					tempposx = (oldposx -posx);
					tempposy = (oldposy -posy);
					tempposz = (oldposz -posz);
					//printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz);
					if (((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16)))
					{
						SendClientMessage(i, col1, string);
					}
					else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8)))
					{
						SendClientMessage(i, col2, string);
					}
					else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4)))
					{
						SendClientMessage(i, col3, string);
					}
					else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2)))
					{
						SendClientMessage(i, col4, string);
					}
					else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
					{
						SendClientMessage(i, col5, string);
					}
				}
				else
				{
					SendClientMessage(i, col1, string);
				}
			}
		}
	}
	return 1;
}

public ClearCrime(playerid)
{
	if(IsPlayerConnected(playerid))
	{
		new string[MAX_PLAYER_NAME];
		format(string, sizeof(string), "********");
		strmid(PlayerCrime[playerid][pBplayer], string, 0, strlen(string), 255);
		strmid(PlayerCrime[playerid][pVictim], string, 0, strlen(string), 255);
		strmid(PlayerCrime[playerid][pAccusing], string, 0, strlen(string), 255);
		strmid(PlayerCrime[playerid][pAccusedof], string, 0, strlen(string), 255);
	}
	return 1;
}

public ShowStats(playerid,targetid)
{
    if(IsPlayerConnected(playerid)&&IsPlayerConnected(targetid))
	{
		new cash =  GetPlayerMoney(targetid);
  		new otext[20];
		if(PlayerInfo[targetid][pLivingArea] == 1) { otext = "North"; }
		else if(PlayerInfo[targetid][pLivingArea] == 2) { otext = "East"; }
		else if(PlayerInfo[targetid][pLivingArea] == 3) { otext = "West"; }
		else if(PlayerInfo[targetid][pLivingArea] == 4) { otext = "South"; }
		
        new jtext[64];
        if(PlayerInfo[targetid][pJob] == 1) { jtext = "Barman"; }
        else if(PlayerInfo[targetid][pJob] == 2) { jtext = "Medic"; }
        else if(PlayerInfo[targetid][pJob] == 3) { jtext = "Trucker"; }
        else if(PlayerInfo[targetid][pJob] == 4) { jtext = "Pizza Delivery"; }
        else if(PlayerInfo[targetid][pJob] == 5) { jtext = "Farmer BlueBerry"; }
        else if(PlayerInfo[targetid][pJob] == 6) { jtext = "Farmer Palomino"; }
        else if(PlayerInfo[targetid][pJob] == 7) { jtext = "IceCream Seller"; }
        else if(PlayerInfo[targetid][pJob] == 8) { jtext = "Arms Dealer"; }
        else if(PlayerInfo[targetid][pJob] == 9) { jtext = "Car Mechanic"; }
        else if(PlayerInfo[targetid][pJob] == 10) { jtext = "Bus Driver"; }
        else if(PlayerInfo[targetid][pPolice] == 1) { jtext = "Police Officer"; }
        else if(PlayerInfo[targetid][pPolice] == 2) { jtext = "Police Chief"; }
        else if(PlayerInfo[targetid][pInstructor] >= 1) { jtext = "License Faction"; }
        else if(PlayerInfo[targetid][pPolice] >= 1) { jtext = "Police Force"; }
        else { jtext = "None"; }
        
        new rtext[64];
		if(PlayerInfo[targetid][pPolice] >= 1)
		{
		    if(PlayerInfo[targetid][pPolice] == 1) { rtext = "Cadet"; }
		    else if(PlayerInfo[targetid][pPolice] == 2) { rtext = "Officer"; }
	        else if(PlayerInfo[targetid][pPolice] == 3) { rtext = "Chief"; }
		}
		else if(PlayerInfo[playerid][pFMember] >= 1)
		{
  			if(PlayerInfo[targetid][pFMember] == 1) { rtext = "Boss"; }
		    else if(PlayerInfo[targetid][pFMember] == 2) { rtext = "Under Boss"; }
	        else if(PlayerInfo[targetid][pFMember] == 3) { rtext = "Capo"; }
	        else if(PlayerInfo[targetid][pFMember] == 4) { rtext = "Soldier"; }
	        else if(PlayerInfo[targetid][pFMember] == 5) { rtext = "Associate"; }
	        else if(PlayerInfo[targetid][pFMember] == 6) { rtext = "Outsider"; }
		}
		else { rtext = "None"; }
        
        new lictext[20];
        if(PlayerInfo[targetid][pCarLic] == 1) { lictext = "Yes"; } else { lictext = "No"; }
        new gunlictext[20];
        if(PlayerInfo[targetid][pGunLic] == 1) { gunlictext = "Yes"; } else { gunlictext = "No"; }
        new saillictext[20];
        if(PlayerInfo[targetid][pSailLic] == 1) { saillictext = "Yes"; } else { saillictext = "No"; }

		new ptime = PlayerInfo[targetid][pConnectTime];
		new deaths = PlayerInfo[targetid][pDeaths];
		new arrests = PlayerInfo[targetid][pArrested];
		new metals = MetalsHolding[targetid];
		new mats = PlayerInfo[targetid][pMaterials];
		new wanted = GetPlayerWantedLevel(targetid);
		new level = PlayerInfo[targetid][pLevel];
		new exp = PlayerInfo[targetid][pExp];
		new kills = PlayerInfo[targetid][pKills];
		new pnumber = PlayerInfo[targetid][pPhonenumber];
		new account = PlayerInfo[targetid][pAccount];
		new nxtlevel = PlayerInfo[targetid][pLevel]+1;
		new pks = PlayerInfo[targetid][pPainKillers];
		new expamount = nxtlevel*levelexp;
		new costlevel = nxtlevel*levelcost;//10k for testing purposes
        new j2text[64];
        if(PlayerInfo[targetid][pFMember] >= 1) { j2text = "De'Medici"; }
        else { j2text = "None"; }
        
        new rope[64];
        if(Rope[playerid]) { rope = "Yes"; } else { rope = "None"; }
        
        new chain[64];
        if(Chain[playerid]) { chain = "Yes"; } else { chain = "None"; }
        
        new cockies = PlayerInfo[playerid][pCockie];

        new cutter[64];
        if(PlayerInfo[playerid][pCutter] == 1) { cutter = "Yes"; } else { cutter = "None"; }
        
        new Pbook[64];
        if(PlayerInfo[targetid][pPhoneBook] == 1) { Pbook = "Yes"; } else { Pbook = "None"; }

		new name[MAX_PLAYER_NAME];
		GetPlayerName(targetid, name, sizeof(name));
		new Float:px,Float:py,Float:pz;
		GetPlayerPos(targetid, px, py, pz);
		new coordsstring[256];
		format(coordsstring, sizeof(coordsstring),"Stats of: %s",name);
		SendClientMessage(playerid, COLOR_WHITE,coordsstring);
		format(coordsstring, sizeof(coordsstring), "Level:[%d] Side:[%s] Cash:[$%d] Bank:[$%d] Phone:[%d] Time Connected:[%d]", level ,otext, cash, account, pnumber,ptime);
		SendClientMessage(playerid, COLOR_GREY,coordsstring);
		format(coordsstring, sizeof(coordsstring), "Job:[%s] TimesArrested:[%d] Car License:[%s] Gun License:[%s] Sailing License:[%s]",jtext,arrests,lictext,gunlictext,saillictext);
		SendClientMessage(playerid, COLOR_GREY,coordsstring);
		format(coordsstring, sizeof(coordsstring), "Kills:[%d] Deaths:[%d] NextLevel:[$%d] Respect:[%d/%d] WantedLevel:[%d] Rope:[%s] Chain:[%s]",kills,deaths,costlevel,exp,expamount,wanted,rope,chain);
		SendClientMessage(playerid, COLOR_GREY,coordsstring);
		format(coordsstring, sizeof(coordsstring), "Metals:[%d] Materials:[%d] Organisation:[%s] Rank:[%s] PainKillers:[%d] Cockies[%d] Cutter:[%s]",metals,mats,j2text,rtext,pks,cockies,cutter);
		SendClientMessage(playerid, COLOR_GREY,coordsstring);
		format(coordsstring, sizeof(coordsstring), "Phone Book:[%s]",Pbook);
		SendClientMessage(playerid, COLOR_GREY,coordsstring);
	}
}


public SetPlayerFree(playerid,declare,reason[])
{
	if(IsPlayerConnected(playerid))
	{
		ClearCrime(playerid);
		new turned[MAX_PLAYER_NAME];
		new turner[MAX_PLAYER_NAME];
		new crbjstore[128];
		if (declare == 255)
		{
			format(turner, sizeof(turner), "911");
		}
		else
		{
		    if(IsPlayerConnected(declare))
		    {
				GetPlayerName(declare, turner, sizeof(turner));
			}
		}
		GetPlayerName(playerid, turned, sizeof(turned));
		for(new i = 0; i < MAX_PLAYERS; i++)
		{
			if(IsPlayerConnected(i))
			{
			    if(PlayerInfo[i][pPolice] == 2)
			    {
					format(crbjstore, sizeof(crbjstore), "HQ: All Units Officer %s Has Completed Assignment",turner);
					SendClientMessage(i, COLOR_DBLUE, crbjstore);
					format(crbjstore, sizeof(crbjstore), "HQ: %s Has Been Processed, %s",turned,reason);
					SendClientMessage(i, COLOR_DBLUE, crbjstore);
				}
			}
		}
	}
}


public ProxDetectorS(Float:radi, playerid, targetid)
{
    if(IsPlayerConnected(playerid)&&IsPlayerConnected(targetid))
	{
		new Float:posx, Float:posy, Float:posz;
		new Float:oldposx, Float:oldposy, Float:oldposz;
		new Float:tempposx, Float:tempposy, Float:tempposz;
		GetPlayerPos(playerid, oldposx, oldposy, oldposz);
		//radi = 2.0; //Trigger Radius
		GetPlayerPos(targetid, posx, posy, posz);
		tempposx = (oldposx -posx);
		tempposy = (oldposy -posy);
		tempposz = (oldposz -posz);
		//printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz);
		if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
		{
			return 1;
		}
	}
	return 0;
}

public ABroadCast(color,const string[],level)
{
	for(new i = 0; i < MAX_PLAYERS; i++)
	{
		if(IsPlayerConnected(i))
		{
			if (PlayerInfo[i][pAdmin] >= 1)
			{
				SendClientMessage(i, color, string);
				printf("%s", string);
			}
		}
	}
	return 1;
}

public BroadCast(color,const string[])
{
	SendClientMessageToAll(color, string);
	return 1;
}

public PayList(string[])
{
	new entry[256];
	format(entry, sizeof(entry), "%s\n",string);
	new File:hFile;
	hFile = fopen("paylist.log", io_append);
	fwrite(hFile, entry);
	fclose(hFile);
}

public KickLog(string[])
{
	new entry[256];
	format(entry, sizeof(entry), "%s\n",string);
	new File:hFile;
	hFile = fopen("kicklist.log", io_append);
	fwrite(hFile, entry);
	fclose(hFile);
}

public BanList(string[])
{
	new entry[256];
	format(entry, sizeof(entry), "%s\n",string);
	new File:hFile;
	hFile = fopen("banlist.log", io_append);
	fwrite(hFile, entry);
	fclose(hFile);
}

public AdvList(string[])
{
	new entry[256];
	format(entry, sizeof(entry), "%s\n",string);
	new File:hFile;
	hFile = fopen("adverlist.log", io_append);
	fwrite(hFile, entry);
	fclose(hFile);
}

public SyncVirtualTime()
{
    new h,m;
    CalculateVirtualTime(h,m);
    for(new i = 0; i < MAX_PLAYERS; i++) {
        if(IsPlayerConnected(i)) {
            SetPlayerTime(i,h,m);
        }
    }
}

CalculateVirtualTime(&hour,&minute)
{
    new h,i,s;
    gettime(h,i,s);
    new time = (h * 24 * 60) + i * 60 + s;
    time = time % (24 * 60);
    minute = time % 60;
    hour = (time - minute) / 60;
}

public IsACopCar(carid)
{
	if((carid >= 23) && (carid <= 31) || carid == 206)
	{
		return 1;
	}
	return 0;
}

public IsABikeCar(carid)
{
	if((carid >= 265))
	{
		return 1;
	}
	return 0;
}

public IsAInsCar(carid)
{
	if((carid >= 85) && (carid <= 88))
	{
		return 1;
	}
	return 0;
}

public IsAAmbCar(carid)
{
	if(carid==15||carid==16||carid==182)
	{
		return 1;
	}
	return 0;
}

public IsATunnedCar(carid)
{
	if((carid >= 40) && (carid <= 61)||carid==73||carid==74||carid==75||carid==76||carid==77||carid==78||carid==79||carid==80||carid==81||carid==82||carid==83||carid==84||carid==85||carid==86||carid==87||carid==88||carid==89||carid==90||carid==91||carid==91||carid==93
	||carid==109||carid==110||carid==111||carid==112||carid==113||carid==114||carid==117||carid==118||carid==119||carid==120||carid==121||carid==122||carid==123||carid==124||carid==125||carid==126||carid==127||carid==128||carid==129||carid==130||carid==92
	||carid==131||carid==132||carid==133||carid==134||carid==135||carid==136||carid==137||carid==138||carid==139||carid==140||carid==141||carid==142||carid==143||carid==144||carid==145||carid==146||carid==147||carid==148||carid==149||carid==150||carid==151||carid==152
	||carid==153||carid==154||carid==155||carid==156||carid==157||carid==162||carid==163||carid==164||carid==165||carid==166||carid==167||carid==168||carid==169||carid==170||carid==171||carid==172||carid==173||carid==174||carid==175||carid==176||carid==177||carid==178
	||carid==179||carid==180||carid==181||carid==183||carid==184||carid==185||carid==186||carid==187||carid==188||carid==189||carid==190||carid==191||carid==192||carid==193||carid==195||carid==207||carid==208||carid==209||carid==210||carid==211||carid==211||carid==249
	||carid==212||carid==213||carid==214||carid==215||carid==216||carid==217||carid==218||carid==219||carid==220||carid==221||carid==222||carid==223||carid==224||carid==225||carid==226||carid==241||carid==242||carid==244||carid==45||carid==246||carid==247||carid==248
    ||carid==250||carid==251||carid==252||carid==253||carid==254||carid==255||carid==256||carid==257||carid==258||carid==259||carid==260||carid==261||carid==262||carid==263)
 	{
  		return 1;
	}
	return 0;
}

public IsAtBank(playerid)
{
    if(IsPlayerConnected(playerid))
	{
		if(PlayerToPoint(5.0,playerid,2316.6184,-15.4696,26.7422) || PlayerToPoint(5.0,playerid,2316.6184,-12.6112,26.7422) || PlayerToPoint(5.0,playerid,2316.6213,-10.0222,26.7422))
		{
		    return 1;
		}
	}
	return 0;
}

public IsAt247(playerid)
{
    if(IsPlayerConnected(playerid))
	{
		if(PlayerToPoint(5.0,playerid,2316.6199,-7.4714,26.7422) || PlayerToPoint(5.0,playerid,-22.2108,-138.6263,1003.5469) || PlayerToPoint(5.0,playerid,-23.2589,-55.6321,1003.5469) || PlayerToPoint(5.0,playerid,-29.3373,-138.6470,1003.5469))
		{
		    return 1;
		}
	}
	return 0;
}

public IsAtPoliceComp(playerid)
{
    if(IsPlayerConnected(playerid))
	{
		if(
		PlayerToPoint(2.0,playerid,237.9907,71.3590,1005.0391)
		|| PlayerToPoint(2.0,playerid,230.5805,71.3617,1005.0391)
		|| PlayerToPoint(2.0,playerid,231.2050,76.4139,1005.0391)
		|| PlayerToPoint(2.0,playerid,235.4297,74.3358,1005.0391)
		|| PlayerToPoint(2.0,playerid,239.8481,78.7731,1005.0391)
		|| PlayerToPoint(2.0,playerid,234.9190,79.5299,1005.0391)
		|| PlayerToPoint(2.0,playerid,231.4667,80.3974,1005.0391)
		|| PlayerToPoint(2.0,playerid,256.4697,69.4273,1003.6406)
		)
		{
		    return 1;
		}
	}
	return 0;
}

public IsAtGasStation(playerid)
{
    if(IsPlayerConnected(playerid))
	{
		if(PlayerToPoint(6.0,playerid,656.4432,-565.4294,16.3359) || PlayerToPoint(6.0,playerid,1381.7280,460.1547,20.3452))
		{//Dillimore
		    return 1;
		}
	}
	return 0;
}

public Fillup()
{
	for(new i=0; i<MAX_PLAYERS; i++)
   	{
	   	if(IsPlayerConnected(i))
	   	{
		    new VID;
		    new FillUp;
		    new string[256];
		    VID = GetPlayerVehicleID(i);
		    FillUp = GasMax - Gas[VID];
			if(Refueling[i] == 1)
		    {
				if(GetPlayerMoney(i) >= FillUp+4)
				{
					Gas[VID] += FillUp;
				    format(string,sizeof(string),"* Vehicle filled up, for: $%d.",FillUp);
				    SendClientMessage(i,COLOR_WHITE,string);
					GivePlayerMoney(i, - FillUp);
					Refueling[i] = 0;
				}
			   	else
			   	{
			   	    format(string,sizeof(string),"* Not enough Money to refill, it costs $%d to fill your Vehicle.",FillUp);
				    SendClientMessage(i,COLOR_LIGHTBLUE,string);
			   	}
		 	}
		}
	}
	return 1;
}


public CheckGas()
{
	new string[256];
	for(new i=0;i<MAX_PLAYERS;i++)
	{
    	if(IsPlayerConnected(i))
       	{
       	    if(GetPlayerState(i) == PLAYER_STATE_DRIVER)
       	    {
	       		new vehicle = GetPlayerVehicleID(i);
	        	if(Gas[vehicle] >= 1)
		   		{
		   		    if(Gas[vehicle] <= 10) { PlayerPlaySound(i, 1085, 0.0, 0.0, 0.0); }
		   		    if(gGas[i] == 1) {
		      		format(string, sizeof(string), "~r~~n~~n~~n~~n~~n~~n~~n~~n~~n~Fuel~y~:~w~ %d%",Gas[vehicle]);
		      		GameTextForPlayer(i,string,15500,3); }
	              	Gas[vehicle]--;
		   		}
	   			else
	           	{
	              	NoFuel[i] = true;
	              	RemovePlayerFromVehicle(i);
		        	GameTextForPlayer(i,"~w~~n~~n~~n~~n~~n~~n~~n~~n~No fuel in Vehicle",1500,3);
				}
			}
    	}
	}
	return 1;
}


public OOCOff(color,const string[])
{
	for(new i = 0; i < MAX_PLAYERS; i++)
	{
		if(IsPlayerConnected(i))
		{
		    if(!gOoc[i])
		    {
				SendClientMessage(i, color, string);
			}
		}
	}
}

public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
{
    if(IsPlayerConnected(playerid))
	{
		new Float:oldposx, Float:oldposy, Float:oldposz;
		new Float:tempposx, Float:tempposy, Float:tempposz;
		GetPlayerPos(playerid, oldposx, oldposy, oldposz);
		tempposx = (oldposx -x);
		tempposy = (oldposy -y);
		tempposz = (oldposz -z);
		if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
		{
			return 1;
		}
	}
	return 0;
}

public SaveAccounts()
{
    for(new i = 0; i < MAX_PLAYERS; i++)
	{
		if(IsPlayerConnected(i))
		{
			OnPlayerUpdate(i);
			if(PlayerInfo[i][pJob] > 0)
	    	{
	    	    if(PlayerInfo[i][pContractTime] < 25)
	    	    {
					PlayerInfo[i][pContractTime] ++;
				}
	    	}
		}
	}
}

public DollahScoreUpdate()
{
	new LevScore;
	for(new i=0; i<MAX_PLAYERS; i++)
	{
		if(IsPlayerConnected(i))
		{
   			LevScore = PlayerInfo[i][pLevel];
			SetPlayerScore(i, LevScore);
		}
	}
	return 1;
}

public SyncUp()
{
	DollahScoreUpdate();
}

public Encrypt(string[])
{
	for(new b=0; b < strlen(string); b++)
	  {
		  string[b] += (3^b) * (b % 15);
		  if(string[b] > (0xff))
		  {
			  string[b] -= 256;
		  }
	  }
	return 1;
}

public OnPlayerRegister(playerid, password[])
{
	if(IsPlayerConnected(playerid))
	{
			new string3[32];
			new playername3[MAX_PLAYER_NAME];
			GetPlayerName(playerid, playername3, sizeof(playername3));
			format(string3, sizeof(string3), "%s.user", playername3);
			new File: hFile = fopen(string3, io_write);
			if (hFile)
			{
			
			    strmid(PlayerInfo[playerid][pKey], password, 0, strlen(password), 255);
			    new var[32];
			    format(var, 32, "Key=%s\n", PlayerInfo[playerid][pKey]);fwrite(hFile, var);
                format(var, 32, "Level=%d\n",PlayerInfo[playerid][pLevel]);fwrite(hFile, var);
				format(var, 32, "RegQuestionWas=%d\n", RegQuestionWas[playerid]);fwrite(hFile, var);
				format(var, 32, "LivingArea=%d\n",PlayerInfo[playerid][pLivingArea]);fwrite(hFile, var);
			    format(var, 32, "Civilian=%d\n", PlayerInfo[playerid][pCivilian]);fwrite(hFile, var);
			    format(var, 32, "Instructor=%d\n", PlayerInfo[playerid][pInstructor]);fwrite(hFile, var);
			    format(var, 32, "Police=%d\n", PlayerInfo[playerid][pPolice]);fwrite(hFile, var);
			    format(var, 32, "Aci=%d\n", PlayerInfo[playerid][pAci]);fwrite(hFile, var);
			    format(var, 32, "FLeader=%d\n", PlayerInfo[playerid][pFLeader]);fwrite(hFile, var);
			    format(var, 32, "FMember=%d\n", PlayerInfo[playerid][pFMember]);fwrite(hFile, var);
			    format(var, 32, "Kills=%d\n",PlayerInfo[playerid][pKills]);fwrite(hFile, var);
			    format(var, 32, "Deaths=%d\n",PlayerInfo[playerid][pDeaths]);fwrite(hFile, var);
			    format(var, 32, "Bank=%d\n",PlayerInfo[playerid][pAccount]);fwrite(hFile, var);
			    format(var, 32, "Model=%d\n",PlayerInfo[playerid][pModel]);fwrite(hFile, var);
			    format(var, 32, "Paycheck=%d\n",PlayerInfo[playerid][pPayCheck]);fwrite(hFile, var);
			    format(var, 32, "Char=%d\n",PlayerInfo[playerid][pChar]);fwrite(hFile, var);
			    format(var, 32, "AdminLevel=%d\n",PlayerInfo[playerid][pAdmin]);fwrite(hFile, var);
			    format(var, 32, "ConnectedTime=%d\n",PlayerInfo[playerid][pConnectTime]);fwrite(hFile, var);
			    format(var, 32, "Respect=%d\n",PlayerInfo[playerid][pExp]);fwrite(hFile, var);
			    format(var, 32, "Rank=%d\n",PlayerInfo[playerid][pRank]);fwrite(hFile, var);
			    format(var, 32, "Registered=%d\n",PlayerInfo[playerid][pRegistered]);fwrite(hFile, var);
				PlayerInfo[playerid][pMoney] = GetPlayerMoney(playerid);
				format(var, 32, "ContractTime=%d\n",PlayerInfo[playerid][pContractTime]);fwrite(hFile, var);
				format(var, 32, "PhoneNr=%d\n",PlayerInfo[playerid][pPhonenumber]);fwrite(hFile, var);
				format(var, 32, "Phonebook=%d\n",PlayerInfo[playerid][pPhoneBook]);fwrite(hFile, var);
				format(var, 32, "Cutter=%d\n",PlayerInfo[playerid][pCutter]);fwrite(hFile, var);
				format(var, 32, "Money=%d\n",PlayerInfo[playerid][pMoney]);fwrite(hFile, var);
				format(var, 32, "Job=%d\n",PlayerInfo[playerid][pJob]);fwrite(hFile, var);
				format(var, 32, "Materials=%d\n",PlayerInfo[playerid][pMaterials]);fwrite(hFile, var);
				format(var, 32, "Jailed=%d\n",PlayerInfo[playerid][pJailed]);fwrite(hFile, var);
				format(var, 32, "JailTime=%d\n",PlayerInfo[playerid][pJailTime]);fwrite(hFile, var);
				format(var, 32, "CarLic=%d\n",PlayerInfo[playerid][pCarLic]);fwrite(hFile, var);
				format(var, 32, "SailLic=%d\n",PlayerInfo[playerid][pSailLic]);fwrite(hFile, var);
				format(var, 32, "GunLic=%d\n",PlayerInfo[playerid][pGunLic]);fwrite(hFile, var);
				format(var, 32, "Warnings=%d\n",PlayerInfo[playerid][pWarns]);fwrite(hFile, var);
				format(var, 32, "PainKillers=%d\n",PlayerInfo[playerid][pPainKillers]);fwrite(hFile, var);
				format(var, 32, "ArmsDealerSkill=%d\n",PlayerInfo[playerid][pArmsDealerSkill]);fwrite(hFile, var);
				format(var, 32, "MechanicSkill=%d\n",PlayerInfo[playerid][pMechanicSkill]);fwrite(hFile, var);
				format(var, 32, "MetalsHolding=%d\n",MetalsHolding[playerid]);fwrite(hFile, var);
				format(var, 32, "FarmerCheck1=%d\n",vf_check[playerid]);fwrite(hFile, var);
				format(var, 32, "FarmerCheck2=%d\n",vf1_check[playerid]);fwrite(hFile, var);
				format(var, 32, "Clock=%d\n",Clock[playerid]);fwrite(hFile, var);
				format(var, 32, "House=%d\n",PlayerHouse[playerid][pInfoHouse]);fwrite(hFile, var);
				fclose(hFile);
				SendClientMessage(playerid, COLOR_YELLOW, "Congratulations!, Your account has been successfully created.");
				SendClientMessage(playerid, COLOR_YELLOW, "Now use the commands, /login [password] in order to login!");
				PlayerInfo[playerid][pRegistered]=0;
				RegistrationStep[playerid]=1;
				PlayerInfo[playerid][pCivilian]=1;
			}
	}
	return 1;
}

public OnPlayerUpdate(playerid)
{
	if(IsPlayerConnected(playerid))
	{
		if(PLAYERLIST_authed[playerid])
		{
			new string3[32];
			new playername3[MAX_PLAYER_NAME];
			GetPlayerName(playerid, playername3, sizeof(playername3));
			format(string3, sizeof(string3), "%s.user", playername3);
			new File: hFile = fopen(string3, io_write);
			if (hFile)
			{
				new var[32];
                format(var, 32, "Key=%s\n", PlayerInfo[playerid][pKey]);fwrite(hFile, var);
                format(var, 32, "Level=%d\n",PlayerInfo[playerid][pLevel]);fwrite(hFile, var);
				format(var, 32, "RegQuestionWas=%d\n", RegQuestionWas[playerid]);fwrite(hFile, var);
				format(var, 32, "LivingArea=%d\n",PlayerInfo[playerid][pLivingArea]);fwrite(hFile, var);
			    format(var, 32, "Civilian=%d\n", PlayerInfo[playerid][pCivilian]);fwrite(hFile, var);
			    format(var, 32, "Instructor=%d\n", PlayerInfo[playerid][pInstructor]);fwrite(hFile, var);
			    format(var, 32, "Police=%d\n", PlayerInfo[playerid][pPolice]);fwrite(hFile, var);
			    format(var, 32, "Aci=%d\n", PlayerInfo[playerid][pAci]);fwrite(hFile, var);
			    format(var, 32, "FLeader=%d\n", PlayerInfo[playerid][pFLeader]);fwrite(hFile, var);
			    format(var, 32, "FMember=%d\n", PlayerInfo[playerid][pFMember]);fwrite(hFile, var);
			    format(var, 32, "Kills=%d\n",PlayerInfo[playerid][pKills]);fwrite(hFile, var);
			    format(var, 32, "Deaths=%d\n",PlayerInfo[playerid][pDeaths]);fwrite(hFile, var);
			    format(var, 32, "Bank=%d\n",PlayerInfo[playerid][pAccount]);fwrite(hFile, var);
			    format(var, 32, "Model=%d\n",PlayerInfo[playerid][pModel]);fwrite(hFile, var);
			    format(var, 32, "Paycheck=%d\n",PlayerInfo[playerid][pPayCheck]);fwrite(hFile, var);
			    format(var, 32, "Char=%d\n",PlayerInfo[playerid][pChar]);fwrite(hFile, var);
			    format(var, 32, "AdminLevel=%d\n",PlayerInfo[playerid][pAdmin]);fwrite(hFile, var);
			    format(var, 32, "ConnectedTime=%d\n",PlayerInfo[playerid][pConnectTime]);fwrite(hFile, var);
			    format(var, 32, "Respect=%d\n",PlayerInfo[playerid][pExp]);fwrite(hFile, var);
			    format(var, 32, "Rank=%d\n",PlayerInfo[playerid][pRank]);fwrite(hFile, var);
			    format(var, 32, "Registered=%d\n",PlayerInfo[playerid][pRegistered]);fwrite(hFile, var);
				PlayerInfo[playerid][pMoney] = GetPlayerMoney(playerid);
				format(var, 32, "ContractTime=%d\n",PlayerInfo[playerid][pContractTime]);fwrite(hFile, var);
				format(var, 32, "PhoneNr=%d\n",PlayerInfo[playerid][pPhonenumber]);fwrite(hFile, var);
				format(var, 32, "Phonebook=%d\n",PlayerInfo[playerid][pPhoneBook]);fwrite(hFile, var);
				format(var, 32, "Cutter=%d\n",PlayerInfo[playerid][pCutter]);fwrite(hFile, var);
				format(var, 32, "Money=%d\n",PlayerInfo[playerid][pMoney]);fwrite(hFile, var);
				format(var, 32, "Job=%d\n",PlayerInfo[playerid][pJob]);fwrite(hFile, var);
				format(var, 32, "Materials=%d\n",PlayerInfo[playerid][pMaterials]);fwrite(hFile, var);
				format(var, 32, "Jailed=%d\n",PlayerInfo[playerid][pJailed]);fwrite(hFile, var);
				format(var, 32, "JailTime=%d\n",PlayerInfo[playerid][pJailTime]);fwrite(hFile, var);
				format(var, 32, "CarLic=%d\n",PlayerInfo[playerid][pCarLic]);fwrite(hFile, var);
				format(var, 32, "SailLic=%d\n",PlayerInfo[playerid][pSailLic]);fwrite(hFile, var);
				format(var, 32, "GunLic=%d\n",PlayerInfo[playerid][pGunLic]);fwrite(hFile, var);
				format(var, 32, "Warnings=%d\n",PlayerInfo[playerid][pWarns]);fwrite(hFile, var);
				format(var, 32, "PainKillers=%d\n",PlayerInfo[playerid][pPainKillers]);fwrite(hFile, var);
				format(var, 32, "ArmsDealerSkill=%d\n",PlayerInfo[playerid][pArmsDealerSkill]);fwrite(hFile, var);
				format(var, 32, "MechanicSkill=%d\n",PlayerInfo[playerid][pMechanicSkill]);fwrite(hFile, var);
                format(var, 32, "MetalsHolding=%d\n",MetalsHolding[playerid]);fwrite(hFile, var);
				format(var, 32, "FarmerCheck1=%d\n",vf_check[playerid]);fwrite(hFile, var);
				format(var, 32, "FarmerCheck2=%d\n",vf1_check[playerid]);fwrite(hFile, var);
				format(var, 32, "Clock=%d\n",Clock[playerid]);fwrite(hFile, var);
				format(var, 32, "House=%d\n",PlayerHouse[playerid][pInfoHouse]);fwrite(hFile, var);
				fclose(hFile);
				

			}
		}
	}
	return 1;
}


public OnPlayerLogin(playerid,password[])
{
	new tmp[256];
    new string[64];
	new playername[256];
    GetPlayerName(playerid, playername, sizeof(playername));
	format(string, sizeof(string), "%s.user", playername);
	new File: UserFile = fopen(string, io_read);
	if ( UserFile )
	{
	    new PassData[256];
	    new keytmp[256], valtmp[256];
	    fread( UserFile , PassData , sizeof( PassData ) );
	    keytmp = ini_GetKey( PassData );
	    if( strcmp( keytmp , "Key" , true ) == 0 )
		{
			valtmp = ini_GetValue( PassData );
			strmid(PlayerInfo[playerid][pKey], valtmp, 0, strlen(valtmp)-1, 255);
		}
		if(strcmp(PlayerInfo[playerid][pKey],password, true ) == 0 )
		{
			    new key[ 256 ] , val[ 256 ];
			    new Data[ 256 ];
			    while ( fread( UserFile , Data , sizeof( Data ) ) )
				{
					key = ini_GetKey( Data );
                    if( strcmp( key , "Level" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLevel] = strval( val ); }
					if( strcmp( key , "RegQuestionWas" , true ) == 0 ) { val = ini_GetValue( Data ); RegQuestionWas[playerid] = strval( val ); }
					if( strcmp( key , "LivingArea" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLivingArea] = strval( val ); }
					if( strcmp( key , "Civilian" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCivilian] = strval( val ); }
					if( strcmp( key , "Instructor" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pInstructor] = strval( val ); }
					if( strcmp( key , "Police" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPolice] = strval( val ); }
					if( strcmp( key , "Aci" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAci] = strval( val ); }
					if( strcmp( key , "FLeader" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pFLeader] = strval( val ); }
					if( strcmp( key , "FMember" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pFMember] = strval( val ); }
					if( strcmp( key , "Kills" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pKills] = strval( val ); }
                    if( strcmp( key , "Deaths" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDeaths] = strval( val ); }
                    if( strcmp( key , "Bank" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAccount] = strval( val ); }
                    if( strcmp( key , "Model" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pModel] = strval( val ); }
                    if( strcmp( key , "Paycheck" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPayCheck] = strval( val ); }
					if( strcmp( key , "Char" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pChar] = strval( val ); }
					if( strcmp( key , "AdminLevel" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAdmin] = strval( val ); }
                    if( strcmp( key , "ConnectedTime" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pConnectTime] = strval( val ); }
                    if( strcmp( key , "Respect" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pExp] = strval( val ); }
                    if( strcmp( key , "Rank" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pRank] = strval( val ); }
					if( strcmp( key , "Registered" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pRegistered] = strval( val ); }
                    if( strcmp( key , "PhoneNr" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPhonenumber] = strval( val ); }
					if( strcmp( key , "Phonebook" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPhoneBook] = strval( val ); }
                    if( strcmp( key , "Cutter" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCutter] = strval( val ); }
					if( strcmp( key , "ContractTime" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pContractTime] = strval( val ); }
	        		if( strcmp( key , "Money" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMoney] = strval( val ); }
	        		if( strcmp( key , "Arrested" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pArrested] = strval( val ); }
	        		if( strcmp( key , "Job" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pJob] = strval( val ); }
	        		if( strcmp( key , "Materials" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMaterials] = strval( val ); }
	        		if( strcmp( key , "Jailed" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pJailed] = strval( val ); }
	        		if( strcmp( key , "JailTime" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pJailTime] = strval( val ); }
	        		if( strcmp( key , "CarLic" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCarLic] = strval( val ); }
					if( strcmp( key , "SailLic" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSailLic] = strval( val ); }
					if( strcmp( key , "GunLic" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGunLic] = strval( val ); }
                    if( strcmp( key , "Warnings" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWarns] = strval( val ); }
					if( strcmp( key , "PainKillers" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPainKillers] = strval( val ); }
					if( strcmp( key , "ArmsDealerSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pArmsDealerSkill] = strval( val ); }
					if( strcmp( key , "MechanicSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMechanicSkill] = strval( val ); }
					if( strcmp( key , "MetalsHolding" , true ) == 0 ) { val = ini_GetValue( Data ); MetalsHolding[playerid] = strval( val ); }
					if( strcmp( key , "FarmerCheck1" , true ) == 0 ) { val = ini_GetValue( Data ); vf_check[playerid] = strval( val ); }
					if( strcmp( key , "FarmerCheck2" , true ) == 0 ) { val = ini_GetValue( Data ); vf1_check[playerid] = strval( val ); }
					if( strcmp( key , "House" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerHouse[playerid][pInfoHouse] = strval( val ); }
                }
                fclose(UserFile);
		}
		else
		{
			SendClientMessage(playerid, COLOR_WHITE, "SERVER: Password does not match your name.");
	        fclose(UserFile);
	        PlayerInfo[playerid][pLoggedTries] += 1;
	        if(PlayerInfo[playerid][pLoggedTries] == 4) { SendClientMessage(playerid,COLOR_WHITE,"You have been kicked,Reason:(too many login tries)"); Kick(playerid); }
	        return 1;
		}
		ResetPlayerMoney(playerid);
		ConsumingMoney[playerid] = 1;
		GivePlayerMoney(playerid,PlayerInfo[playerid][pMoney]);
		CurrentMoney[playerid] = PlayerInfo[playerid][pMoney];
		PlayerInfo[playerid][pCivilian]=1;
		if(PlayerInfo[playerid][pRegistered] == 0)
		{
			PlayerInfo[playerid][pRegistered]=1;
			PlayerInfo[playerid][pCivilian]=1;
			new randphone = 1000 + random(98999);
			PlayerInfo[playerid][pPhonenumber] = randphone;
			PlayerInfo[playerid][pAccount] = 2000;
			PlayerInfo[playerid][pLevel] = 1;
			GivePlayerMoney(playerid,350);
		}
		if (PlayerInfo[playerid][pAdmin] > 0)
		{
			format(tmp, sizeof(tmp), "You're logged in as admin(level:%d).",PlayerInfo[playerid][pAdmin]);
			SendClientMessage(playerid, COLOR_WHITE,tmp);
		}
		if(RegQuestionWas[playerid] == 0)
	    {
	    RegistrationStep[playerid]=1;
	    TogglePlayerControllable(playerid, false);
	    }
	    
   		if(PlayerInfo[playerid][pLevel] == -999) //autoban
		{
			Ban(playerid);
		}
		
  		if(RegistrationStep[playerid] == 1)
	    {
		RegistrationStep[playerid] = 1;
		SendClientMessage(playerid, COLOR_WHITE, "Welcome to Vgames Role-Play, in order to continue answer the question.");
		SendClientMessage(playerid, COLOR_YELLOW, "Where do you live in you country area ? (Type: North,East,West,South)");
		TogglePlayerControllable(playerid, false);
	    }
		if(PlayerInfo[playerid][pLevel] == 0)//levelfix
		{
		PlayerInfo[playerid][pLevel] = 1;
		}
		
		if(PlayerInfo[playerid][pAccount] == 0 && GetPlayerMoney(playerid) == 0)//moneybugfix
		{
		ResetPlayerMoney(playerid);
		GivePlayerMoney(playerid,350);
		PlayerInfo[playerid][pAccount]=0;
		PlayerInfo[playerid][pAccount]=2000;
		}

		PLAYERLIST_authed[playerid]=true;
		GetPlayerName(playerid,playername,sizeof(playername));
	    format(string,sizeof(playername),"~w~welcome ~n~~y~%s",playername);
	    GameTextForPlayer(playerid,string,999,1);
		SendClientMessage(playerid,COLOR_WHITE,"You have been successfully authed to the server, now spawn!");
	}
	PlayerInfo[playerid][pCivilian]=1;
	OnPlayerUpdate(playerid);
	return 1;
}


public GetClosestPlayer(p1)
{
	new x,Float:dis,Float:dis2,player;
	player = -1;
	dis = 99999.99;
	for (x=0;x<MAX_PLAYERS;x++)
	{
		if(IsPlayerConnected(x))
		{
			if(x != p1)
			{
				dis2 = GetDistanceBetweenPlayers(x,p1);
				if(dis2 < dis && dis2 != -1.00)
				{
					dis = dis2;
					player = x;
				}
			}
		}
	}
	return player;
}

public Float:GetDistanceBetweenPlayers(p1,p2)
{
	new Float:x1,Float:y1,Float:z1,Float:x2,Float:y2,Float:z2;
	if(!IsPlayerConnected(p1) || !IsPlayerConnected(p2))
	{
		return -1.00;
	}
	GetPlayerPos(p1,x1,y1,z1);
	GetPlayerPos(p2,x2,y2,z2);
	return floatsqroot(floatpower(floatabs(floatsub(x2,x1)),2)+floatpower(floatabs(floatsub(y2,y1)),2)+floatpower(floatabs(floatsub(z2,z1)),2));
}

public AddsOn()
{
	adds=1;
	return 1;
}

public SendAdminMessage(color, string[])
{
	for(new i = 0; i < MAX_PLAYERS; i++)
	{
		if(IsPlayerConnected(i))
		{
		    if(PlayerInfo[i][pAdmin] >= 1)
		    {
				SendClientMessage(i, color, string);
			}
		}
	}
}

public SendPoliceMessage(color, string[])
{
	for(new i = 0; i < MAX_PLAYERS; i++)
	{
		if(IsPlayerConnected(i))
		{
		    if(PlayerInfo[i][pPolice] >= 1)
		    {
		        if(OnDuty[i] == 1)
		        {
				SendClientMessage(i, color, string);
				}
			}
		}
	}
}

public SendFMemberMessage(color, string[])
{
	for(new i = 0; i < MAX_PLAYERS; i++)
	{
		if(IsPlayerConnected(i))
		{
		    if(PlayerInfo[i][pFMember] >= 1)
		    {
				SendClientMessage(i, color, string);
			}
		}
	}
}

public SendAciMessage(color, string[])
{
	for(new i = 0; i < MAX_PLAYERS; i++)
	{
		if(IsPlayerConnected(i))
		{
		    if(PlayerInfo[i][pAci] >= 1)
		    {
				SendClientMessage(i, color, string);
			}
		}
	}
}

public HourFix(hour)
{
	hour = timeshift+hour;
	if (hour < 0)
	{
		hour = hour+24;
	}
	else if (hour > 23)
	{
		hour = hour-24;
	}
	shour = hour;
	return 1;
}

public PlayerUpdate()
{
	for(new i = 0; i < MAX_PLAYERS; i++)
	{
		if(IsPlayerConnected(i))
		{
		    if(PLAYERLIST_authed[i])
		    {
		    OnPlayerUpdate(i);
			}
		}
	}
	return 1;
}

public PlayerUnjailTimer()
{
	new string[256];
	for(new i = 0; i < MAX_PLAYERS; i++)
	{
	    if(IsPlayerConnected(i))
	    {
  			new level = PlayerInfo[i][pLevel];
			if(level >= 0 && level <= 2) { PlayerInfo[i][pPayCheck] += 1; }
			else if(level >= 3 && level <= 4) { PlayerInfo[i][pPayCheck] += 2; }
			else if(level >= 5 && level <= 6) { PlayerInfo[i][pPayCheck] += 3; }
			else if(level >= 7 && level <= 8) { PlayerInfo[i][pPayCheck] += 4; }
			else if(level >= 9 && level <= 10) { PlayerInfo[i][pPayCheck] += 5; }
			else if(level >= 11 && level <= 12) { PlayerInfo[i][pPayCheck] += 6; }
			else if(level >= 13 && level <= 14) { PlayerInfo[i][pPayCheck] += 7; }
			else if(level >= 15 && level <= 16) { PlayerInfo[i][pPayCheck] += 8; }
			else if(level >= 17 && level <= 18) { PlayerInfo[i][pPayCheck] += 9; }
			else if(level >= 19 && level <= 20) { PlayerInfo[i][pPayCheck] += 10; }
			else if(level >= 21) { PlayerInfo[i][pPayCheck] += 11; }
	    	if(PlayerInfo[i][pJailed] > 0)
		    {
				if(PlayerInfo[i][pJailTime] > 0)
				{
					PlayerInfo[i][pJailTime]--;
				}
				if(PlayerInfo[i][pJailTime] <= 0)
				{
				    PlayerInfo[i][pJailTime] = 0;
					if(PlayerInfo[i][pJailed] == 1)
					{
						SetPlayerInterior(i, 6);
						SetPlayerPos(i,268.0903,77.6489,1001.0391);
					}
					else if(PlayerInfo[i][pJailed] == 2)
					{
					    SetPlayerWorldBounds(i,20000.0000,-20000.0000,20000.0000,-20000.0000); //Reset world to player
					    SetPlayerInterior(i, 0);
					}
					PlayerInfo[i][pJailed] = 0;
					format(string, sizeof(string), "~w~You are free now ~n~~r~be better next time");
					GameTextForPlayer(i, string, 5000, 1);
				}
			}
		}
	}
	return 1;
}

public SecondTimer()
{
	new string[256];
    for(new i = 0; i < MAX_PLAYERS; i++)
	{
	    if(IsPlayerConnected(i))
	    {
		    if(CellTime[i] > 0)
			{
				if (CellTime[i] == cchargetime)
				{
					CellTime[i] = 1;
					if(Mobile[Mobile[i]] == i)
					{
						CallCost[i] = CallCost[i]+callcost;
					}
				}
				CellTime[i] = CellTime[i] +1;
				if (Mobile[Mobile[i]] == 255 && CellTime[i] == 5)
				{
				    if(IsPlayerConnected(Mobile[i]))
				    {
						new called[MAX_PLAYER_NAME];
						GetPlayerName(Mobile[i], called, sizeof(called));
						format(string, sizeof(string), "* %s's phone rings.", called);
						RingTone[Mobile[i]] = 10;
						ProxDetector(30.0, Mobile[i], string, COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM,COLOR_SYSTEM);
					}
				}
			}
			if(CellTime[i] == 0 && CallCost[i] > 0)
			{
				format(string, sizeof(string), "~The call cost $%d",CallCost[i]);
				GivePlayerMoney(i, -CallCost[i]);
				SendClientMessage(i, COLOR_YELLOW,string);
				CallCost[i] = 0;
			}
			
			if(MedicCallTime[i] > 0)
			{
			    if(MedicCallTime[i] == 30) { MedicCallTime[i] = 0; DisablePlayerCheckpoint(i); PlayerPlaySound(i, 1056, 0.0, 0.0, 0.0); GameTextForPlayer(i, "~r~RedMarker gone", 2500, 1); }
			    else
				{
				    format(string, sizeof(string), "%d", 30 - MedicCallTime[i]);
					GameTextForPlayer(i, string, 1500, 6);
					MedicCallTime[i] += 1;
				}
			}
		}
	}
	return 1;
}