Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // dealership undeva la inceputul Gamemodu-lui!!!!!!!
- ////Totul este facut de mine dupa tutorial-ul lui Maurice!!!!!!!
- /* ________________________________
- __,__ ( )
- .--. .-" "-. .--. ( Script By Ricardo
- / .. \/ .-. .-. \/ .. \ (
- | | '| / Y \ |' | | / (
- | \ \ \ 0 | 0 / / / | / (______________________________)
- \ '- ,\.-"`` ``"-./, -' / /
- `'-' /_ ^ ^ _\ '-'` /
- .--'| \._ _ _./ |'--.
- /` \ \.-. / / `\
- / '._/ |-' _.' \ /
- / ; /--~' | \ / v1.0
- / .'\|.-\--. \ \ \ --------------
- / .'-. /.-.;\ |\|'~'-.|\ \ \
- \ `-./`|_\_/ ` `\'. \
- '. ; ___) '.`; /
- '-.,_ ; ___) \/
- \ ``'------'\ \ ` /
- '. \ '. | ;/_
- ___> '. \_ _ _/ , '--.
- .' '. .-~~~~~-. / |--'`~~-. \
- // / .---'/ .-~~-._/ / / /---..__.' /
- ((_(_/ / / (_(_(_(---.__ .'
- | | _ `~~`
- | | \'.
- \ '....' |
- '.,___.' */
- new masinii;
- new Text:DsPrice;
- new Text:DsModel;
- new Text:DsInapoi;
- new Text:DsInainte;
- new Text:DsTest;
- new Text:DsHeli;
- new Text:DsBuy;
- new Text:DsBoat;
- new Text:DsBike;
- new Text:DsExit;
- new IDDS[MAX_PLAYERS];
- new IDMasina[MAX_PLAYERS];
- new vehName[][] = { "Landstalker", "Bravura", "Buffalo", "Linerunner", "Perrenial", "Sentinel", "Dumper", "Firetruck", "Trashmaster", "Stretch", "Manana", "Infernus", "Voodoo", "Pony", "Mule", "Cheetah", "Ambulance", "Leviathan", "Moonbeam", "Esperanto", "Taxi", "Washington", "Bobcat", "Whoopee", "BF Injection", "Hunter", "Premier",
- "Enforcer", "Securicar", "Banshee", "Predator", "Bus", "Rhino", "Barracks", "Hotknife", "Trailer", "Previon", "Coach", "Cabbie", "Stallion", "Rumpo", "RC Bandit", "Romero", "Packer", "Monster", "Admiral", "Squalo", "Seasparrow", "Pizzaboy", "Tram", "Trailer", "Turismo", "Speeder", "Reefer", "Tropic", "Flatbed", "Yankee", "Caddy",
- "Solair", "Berkley's RC Van", "Skimmer", "PCJ-600", "Faggio", "Freeway", "RC Baron", "RC Raider", "Glendale", "Oceanic", "Sanchez", "Sparrow", "Patriot", "Quad", "Coastguard", "Dinghy", "Hermes", "Sabre", "Rustler", "ZR-350", "Walton", "Regina", "Comet", "BMX", "Burrito", "Camper", "Marquis", "Baggage", "Dozer", "Maverick",
- "News Chopper", "Rancher", "FBI Rancher", "Virgo", "Greenwood", "Jetmax", "Hotring", "Sandking", "Blista Compact", "Police Maverick", "Boxvillde", "Benson", "Mesa", "RC Goblin", "Hotring Racer A", "Hotring Racer B", "Bloodring Banger", "Rancher", "Super GT", "Elegant", "Journey", "Bike", "Mountain Bike", "Beagle", "Cropduster",
- "Stunt", "Tanker", "Roadtrain", "Nebula", "Majestic", "Buccaneer", "Shamal", "Hydra", "FCR-900", "NRG-500", "HPV1000", "Cement Truck", "Tow Truck", "Fortune", "Cadrona", "FBI Truck", "Willard", "Forklift", "Tractor", "Combine", "Feltzer", "Remington", "Slamvan", "Blade", "Freight", "Streak", "Vortex", "Vincent", "Bullet", "Clover",
- "Sadler", "Firetruck", "Hustler", "Intruder", "Primo", "Cargobob", "Tampa", "Sunrise", "Merit", "Utility", "Nevada", "Yosemite", "Windsor", "Monster", "Monster", "Uranus", "Jester", "Sultan", "Stratum", "Elegy", "Raindance", "RC Tiger", "Flash", "Tahoma", "Savanna", "Bandito", "Freight Flat", "Streak Carriage", "Kart", "Mower", "Dune",
- "Sweeper", "Broadway", "Tornado", "AT-400", "DFT-30", "Huntley", "Stafford", "BF-400", "News Van", "Tug", "Trailer", "Emperor", "Wayfarer", "Euros", "Hotdog", "Club", "Freight Box", "Trailer", "Andromada", "Dodo", "RC Cam", "Launch", "Police Car", "Police Car", "Police Car", "Police Ranger", "Picador", "S.W.A.T", "Alpha", "Phoenix",
- "Glendale", "Sadler", "Luggage", "Luggage", "Stairs", "Boxville", "Tiller", "Utility Trailer" };
- // dealership
- new DSModele[4][3] = {
- {1,411,45000000}, // 1 = id 411 id masinii(411 fiind infernus) 45000000-pret-ul
- {2,560,10000000},
- {3,522,45000000},
- {4,541,60000000}
- };
- // textdraw
- ///onplayerdisconect
- TextDrawDestroy(DsPrice);
- TextDrawDestroy(DsModel);
- TextDrawDestroy(DsInapoi);
- TextDrawDestroy(DsInainte);
- TextDrawDestroy(DsTest);
- TextDrawDestroy(DsHeli);
- TextDrawDestroy(DsBuy);
- TextDrawDestroy(DsBoat);
- TextDrawDestroy(DsBike);
- TextDrawDestroy(DsExit);
- // dealership
- DsPrice = TextDrawCreate(478.399993, 276.266662, "Price:999,999,999$");
- TextDrawLetterSize(DsPrice, 0.449999, 1.600000);
- TextDrawAlignment(DsPrice, 1);
- TextDrawColor(DsPrice, -1);
- TextDrawSetShadow(DsPrice, 0);
- TextDrawSetOutline(DsPrice, 1);
- TextDrawBackgroundColor(DsPrice, 51);
- TextDrawFont(DsPrice, 1);
- TextDrawSetProportional(DsPrice, 1);
- DsModel = TextDrawCreate(477.599975, 259.839965, "Model:Infernusss");
- TextDrawLetterSize(DsModel, 0.449999, 1.600000);
- TextDrawAlignment(DsModel, 1);
- TextDrawColor(DsModel, -1);
- TextDrawSetShadow(DsModel, 0);
- TextDrawSetOutline(DsModel, 1);
- TextDrawBackgroundColor(DsModel, 51);
- TextDrawFont(DsModel, 1);
- TextDrawSetProportional(DsModel, 1);
- DsInainte = TextDrawCreate(583.999511, 340.479461, "Next");
- TextDrawLetterSize(DsInainte, 0.639599, 2.421329);
- TextDrawAlignment(DsInainte, 1);
- TextDrawColor(DsInainte, -1);
- TextDrawSetShadow(DsInainte, 0);
- TextDrawSetOutline(DsInainte, 1);
- TextDrawBackgroundColor(DsInainte, 51);
- TextDrawFont(DsInainte, 1);
- TextDrawSetProportional(DsInainte, 1);
- TextDrawSetSelectable(DsInainte, 1);
- DsTest = TextDrawCreate(5.599947, 371.840118, "Test");
- TextDrawLetterSize(DsTest, 0.716399, 2.174932);
- TextDrawAlignment(DsTest, 1);
- TextDrawColor(DsTest, -1);
- TextDrawSetShadow(DsTest, 0);
- TextDrawSetOutline(DsTest, 1);
- TextDrawBackgroundColor(DsTest, 51);
- TextDrawFont(DsTest, 1);
- TextDrawSetProportional(DsTest, 1);
- TextDrawSetSelectable(DsTest, 1);
- DsInapoi = TextDrawCreate(3.999969, 341.226470, "Back");
- TextDrawLetterSize(DsInapoi, 0.702000, 2.271996);
- TextDrawAlignment(DsInapoi, 1);
- TextDrawColor(DsInapoi, -1);
- TextDrawSetShadow(DsInapoi, 0);
- TextDrawSetOutline(DsInapoi, 1);
- TextDrawBackgroundColor(DsInapoi, 51);
- TextDrawFont(DsInapoi, 1);
- TextDrawSetProportional(DsInapoi, 1);
- TextDrawSetSelectable(DsInapoi, 1);
- DsBuy = TextDrawCreate(283.999725, 338.239715, "Buy");
- TextDrawLetterSize(DsBuy, 1.031599, 3.182931);
- TextDrawAlignment(DsBuy, 1);
- TextDrawColor(DsBuy, -1);
- TextDrawSetShadow(DsBuy, 0);
- TextDrawSetOutline(DsBuy, 1);
- TextDrawBackgroundColor(DsBuy, 51);
- TextDrawFont(DsBuy, 1);
- TextDrawSetProportional(DsBuy, 1);
- TextDrawSetSelectable(DsBuy, 1);
- DsExit = TextDrawCreate(586.399902, 377.812957, "Exit");
- TextDrawLetterSize(DsExit, 0.689997, 2.458666);
- TextDrawAlignment(DsExit, 1);
- TextDrawColor(DsExit, -1);
- TextDrawSetShadow(DsExit, 0);
- TextDrawSetOutline(DsExit, 1);
- TextDrawBackgroundColor(DsExit, 51);
- TextDrawFont(DsExit, 1);
- TextDrawSetProportional(DsExit, 1);
- TextDrawSetSelectable(DsExit, 1);
- DsHeli = TextDrawCreate(4.800015, 253.120101, "Heli");
- TextDrawLetterSize(DsHeli, 0.449999, 1.600000);
- TextDrawAlignment(DsHeli, 1);
- TextDrawColor(DsHeli, -1);
- TextDrawSetShadow(DsHeli, 0);
- TextDrawSetOutline(DsHeli, 1);
- TextDrawBackgroundColor(DsHeli, 51);
- TextDrawFont(DsHeli, 1);
- TextDrawSetProportional(DsHeli, 1);
- DsBoat = TextDrawCreate(5.600035, 271.039855, "Boat");
- TextDrawLetterSize(DsBoat, 0.449999, 1.600000);
- TextDrawAlignment(DsBoat, 1);
- TextDrawColor(DsBoat, -1);
- TextDrawSetShadow(DsBoat, 0);
- TextDrawSetOutline(DsBoat, 1);
- TextDrawBackgroundColor(DsBoat, 51);
- TextDrawFont(DsBoat, 1);
- TextDrawSetProportional(DsBoat, 1);
- DsBike = TextDrawCreate(4.799994, 289.706665, "Bike");
- TextDrawLetterSize(DsBike, 0.449999, 1.600000);
- TextDrawAlignment(DsBike, 1);
- TextDrawColor(DsBike, -1);
- TextDrawSetShadow(DsBike, 0);
- TextDrawSetOutline(DsBike, 1);
- TextDrawBackgroundColor(DsBike, 51);
- TextDrawFont(DsBike, 1);
- TextDrawSetProportional(DsBike, 1);
- Create3DTextLabel("DealerShip\nType /buyvehicle pentru a cumpara o masina",0xFFFFFFFF,328.2337,-1512.6307,36.0325,20.0, 0, 1);
- forward TimpScurs(playerid);
- public TimpScurs(playerid)
- {
- DestroyVehicle(IDMasina[playerid]);
- SetPlayerPos(playerid,332.0504,-1519.2844,35.8672);
- return 1;
- }
- public OnPlayerClickTextDraw(playerid, Text:clickedid)
- {
- new string[126];
- if(clickedid == DsInapoi)
- {
- if(IDDS[playerid] == 0) IDDS[playerid] = 4;
- IDDS[playerid] -=1;
- DestroyVehicle(IDMasina[playerid]);
- IDMasina[playerid] = CreateVehicle(DSModele[IDDS[playerid]][1],-1659.9817,1213.8199,6.9751,300.4067,3,3,-1);
- SetVehicleVirtualWorld(IDMasina[playerid],playerid+1);
- // nume dealership
- format(string,sizeof(string),"Model: %s",vehName[DSModele[IDDS[playerid]][1]-400]);
- TextDrawSetString(DsModel,string);
- TextDrawShowForPlayer(playerid,DsModel);
- // pret
- format(string,sizeof(string),"Price: %d",DSModele[IDDS[playerid]][2]);
- TextDrawSetString(DsPrice,string);
- TextDrawShowForPlayer(playerid,DsPrice);
- }
- if(clickedid == DsInainte)
- {
- if(IDDS[playerid] == 3) IDDS[playerid] = -1;
- IDDS[playerid] +=1;
- DestroyVehicle(IDMasina[playerid]);
- IDMasina[playerid] = CreateVehicle(DSModele[IDDS[playerid]][1],-1659.9817,1213.8199,6.9751,300.4067,3,3,-1);
- SetVehicleVirtualWorld(IDMasina[playerid],playerid+1);
- // nume dealership
- format(string,sizeof(string),"Model: %s",vehName[DSModele[IDDS[playerid]][1]-400]);
- TextDrawSetString(DsModel,string);
- TextDrawShowForPlayer(playerid,DsModel);
- // pret
- format(string,sizeof(string),"Price: %d",DSModele[IDDS[playerid]][2]);
- TextDrawSetString(DsPrice,string);
- TextDrawShowForPlayer(playerid,DsPrice);
- }
- if(clickedid == DsExit)
- {
- SetPlayerPos(playerid,332.0504,-1519.2844,35.8672);
- DestroyVehicle(IDMasina[playerid]);
- SetPlayerVirtualWorld(playerid, 0);
- TogglePlayerControllable(playerid, 1);
- SetCameraBehindPlayer(playerid);
- TextDrawHideForPlayer(playerid,DsInapoi);
- TextDrawHideForPlayer(playerid,DsInainte);
- TextDrawHideForPlayer(playerid,DsTest);
- TextDrawHideForPlayer(playerid,DsHeli);
- TextDrawHideForPlayer(playerid,DsBuy);
- TextDrawHideForPlayer(playerid,DsBoat);
- TextDrawHideForPlayer(playerid,DsBike);
- TextDrawHideForPlayer(playerid,DsExit);
- TextDrawHideForPlayer(playerid,DsModel);
- TextDrawHideForPlayer(playerid,DsPrice);
- CancelSelectTextDraw(playerid);
- }
- if(clickedid == DsTest)
- {
- PutPlayerInVehicle(playerid,IDMasina[playerid],0);
- SetTimerEx("TimpScurs",30 * 1000,0,"d",playerid);
- SetVehicleVirtualWorld(IDMasina[playerid],0);
- SetPlayerVirtualWorld(playerid, 0);
- TogglePlayerControllable(playerid, 1);
- SetCameraBehindPlayer(playerid);
- TextDrawHideForPlayer(playerid,DsInapoi);
- TextDrawHideForPlayer(playerid,DsInainte);
- TextDrawHideForPlayer(playerid,DsTest);
- TextDrawHideForPlayer(playerid,DsHeli);
- TextDrawHideForPlayer(playerid,DsBuy);
- TextDrawHideForPlayer(playerid,DsBoat);
- TextDrawHideForPlayer(playerid,DsBike);
- TextDrawHideForPlayer(playerid,DsExit);
- TextDrawHideForPlayer(playerid,DsModel);
- TextDrawHideForPlayer(playerid,DsPrice);
- CancelSelectTextDraw(playerid);
- }
- if(clickedid == DsBuy)
- {
- SetPlayerPos(playerid,332.0504,-1519.2844,35.8672);
- InsertCar(playerid);
- GivePlayerCash(playerid, -DSModele[IDDS[playerid]][2]);
- DestroyVehicle(IDMasina[playerid]);
- SetPlayerVirtualWorld(playerid, 0);
- TogglePlayerControllable(playerid, 1);
- SetCameraBehindPlayer(playerid);
- TextDrawHideForPlayer(playerid,DsInapoi);
- TextDrawHideForPlayer(playerid,DsInainte);
- TextDrawHideForPlayer(playerid,DsTest);
- TextDrawHideForPlayer(playerid,DsHeli);
- TextDrawHideForPlayer(playerid,DsBuy);
- TextDrawHideForPlayer(playerid,DsBoat);
- TextDrawHideForPlayer(playerid,DsBike);
- TextDrawHideForPlayer(playerid,DsExit);
- TextDrawHideForPlayer(playerid,DsModel);
- TextDrawHideForPlayer(playerid,DsPrice);
- CancelSelectTextDraw(playerid);
- format(string,sizeof(string),"Ai cumparat un %s pentru %d.",vehName[DSModele[IDDS[playerid]][1]-400],DSModele[IDDS[playerid]][2]);
- SendClientMessage(playerid,COLOR_WHITE,string);
- }
- return 1;
- }
- CMD:buyvehicle(playerid, params[])
- {
- new string[128];
- if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "Trebuie sa te loghezi mai intai.");
- if(IsPlayerInAnyVehicle(playerid)) return SCM(playerid,COLOR_WHITE,"{FFB870}Please get out of the car.");
- if(IsPlayerInRangeOfPoint(playerid, 7.0, 328.2337,-1512.6307,36.0325))
- {
- if(PlayerInfo[playerid][pLevel] < 3) return SendClientMessage(playerid, COLOR_WHITE, "{FFB870}You need to be level 3 to buy a vehicle.");
- }
- else return SCM(playerid,COLOR_WHITE,"{FFB870}You are not the place where you can buy a car.");
- SetPlayerPos(playerid,-1558.0000,1153.1772,1.5000);
- TogglePlayerControllable(playerid, 0);
- SelectTextDraw(playerid,0x15EABFC8FF);
- TextDrawShowForPlayer(playerid,DsInapoi);
- TextDrawShowForPlayer(playerid,DsInainte);
- TextDrawShowForPlayer(playerid,DsTest);
- TextDrawShowForPlayer(playerid,DsHeli);
- TextDrawShowForPlayer(playerid,DsBuy);
- TextDrawShowForPlayer(playerid,DsBoat);
- TextDrawShowForPlayer(playerid,DsBike);
- TextDrawShowForPlayer(playerid,DsExit);
- TextDrawShowForPlayer(playerid,DsModel);
- TextDrawShowForPlayer(playerid,DsPrice);
- SetPlayerCameraPos(playerid,-1650.8524,1210.4797,9.4186);
- SetPlayerCameraLookAt(playerid,-1660.0663,1213.8904,8.5841);
- SetPlayerVirtualWorld(playerid,playerid+1);
- IDDS[playerid] = 0;
- IDMasina[playerid] = CreateVehicle(DSModele[IDDS[playerid]][1],-1659.9817,1213.8199,6.9751,300.4067,3,3,-1);
- SetVehicleVirtualWorld(IDMasina[playerid],playerid+1);
- // nume dealership
- format(string,sizeof(string),"Model: %s",vehName[DSModele[IDDS[playerid]][1]-400]);
- TextDrawSetString(DsModel,string);
- TextDrawShowForPlayer(playerid,DsModel);
- // pret
- format(string,sizeof(string),"Price: %d",DSModele[IDDS[playerid]][2]);
- TextDrawSetString(DsPrice,string);
- TextDrawShowForPlayer(playerid,DsPrice);
- return 1;
- }
- forward LoadCar();
- LoadCar();
- public LoadCar()
- {
- new vehs =0;
- mysql_query(SQL,"SELECT MAX(ID) FROM cars");
- mysql_store_result();
- masinii = mysql_fetch_int();
- for(new idx = 1; idx <= masinii; idx++)
- {
- new query[256];
- format(SQL,query,sizeof(SQL,query),SQL,"SELECT * FROM cars WHERE ID = %d",idx);
- mysql_query(SQL,query);
- mysql_store_result();
- if mysql_num_rows()
- {
- if (CarInfo[idx][cID] =2;
- }
- else
- {
- if(mysql_fetch_field_row_format(SQL,query,"|"))
- {
- sscanf(SQL,query,"p<|>e< iiffffiis[25]is[14]iiiiiiiiiiiiiiiiiiiii>",CarInfo[idx]);
- vehs++:
- }
- }
- }
- mysql_free_result();
- printf("-Cars: %d,vehs");
- return 1;
- }
- enum cInfo
- {
- cID,
- cModel,
- Float:cLocationx,
- Float:cLocationy,
- Float:cLocationz,
- Float:cAngle,
- cColorOne,
- cColorTwo,
- cOwner[MAX_PLAYER_NAME],
- cValue,
- cLicense[14],
- cAlarm,
- cLock,
- mod0,
- mod1,
- mod2,
- mod3,
- mod4,
- mod5,
- mod6,
- mod7,
- mod8,
- mod9,
- mod10,
- mod11,
- mod12,
- mod13,
- paintjob,
- KM,
- Userid,
- Spawned,
- };
- stock GasesteID()
- {
- new i;
- for(i = 1; i <= masinii; i++)
- {
- if (CarInfo[i][cID] == -2)
- {
- return i;
- }
- }
- return 0;
- }
- public InsertCar(playerid)
- {
- new string[128],sendername[25];
- new idd = GasesteID();
- GetPlayerName(playerid,sendername,sizeof(sendername));
- if(idd != 0)
- {
- PlayerInfo[playerid][pPcarkey] = idd;
- format(string, sizeof(string), "UPDATE users SET Car='%d' WHERE Name='%s'", PlayerInfo[playerid][pPcarkey], sendername);
- mysql_query(SQL,string);
- CarInfo[idd][cID] = idd;
- CarInfo[idd][cModel] = DSModele[IDDS[playerid]][1];
- CarInfo[idd][cLocationx] = -1631.0164; CarInfo[idd][cLocationy] = 1289.4585; CarInfo[idd][cLocationz] = 6.7459;
- CarInfo[idd][cAngle] = 133.8292;
- CarInfo[idd][cColorOne] = 1; CarInfo[idd][cColorOne] = 1;
- strmid(CarInfo[idd][cOwner], sendername, 0, strlen(sendername), 255);
- CarInfo[idd][cValue] = DSModele[IDDS[playerid]][2];
- strmid(CarInfo[idd][cLicense], "NewCar", 0, 6, 255);
- CarInfo[idd][cAlarm] = 0; CarInfo[idd][cLock] = 0;
- CarInfo[idd][mod0] = 0; CarInfo[idd][mod1] = 0; CarInfo[idd][mod2] = 0; CarInfo[idd][mod3] = 0;
- CarInfo[idd][mod4] = 0; CarInfo[idd][mod5] = 0; CarInfo[idd][mod6] = 0; CarInfo[idd][mod7] = 0;
- CarInfo[idd][mod8] = 0; CarInfo[idd][mod9] = 0; CarInfo[idd][mod10] = 0; CarInfo[idd][mod11] = 0;
- CarInfo[idd][mod12] = 0; CarInfo[idd][mod13] = 0; CarInfo[idd][paintjob] = 0; CarInfo[idd][KM] = 0;
- format(string, sizeof(string),"INSERT INTO cars (ID, Model) VALUES (%d, %d)", idd, CarInfo[idd][cModel]);
- mysql_query(SQL,string);
- format(string, sizeof(string), "UPDATE cars SET Locationx='%f' WHERE ID=%d", CarInfo[idd][cLocationx], idd);
- mysql_query(SQL,string);
- format(string, sizeof(string), "UPDATE cars SET Locationy='%f' WHERE ID=%d", CarInfo[idd][cLocationy], idd);
- mysql_query(SQL,string);
- format(string, sizeof(string), "UPDATE cars SET Locationz='%f' WHERE ID=%d", CarInfo[idd][cLocationz], idd);
- mysql_query(SQL,string);
- format(string, sizeof(string), "UPDATE cars SET Angle='%f' WHERE ID=%d", CarInfo[idd][cAngle], idd);
- mysql_query(SQL,string);
- format(string, sizeof(string), "UPDATE cars SET ColorOne='%d' WHERE ID=%d", CarInfo[idd][cColorOne], idd);
- mysql_query(SQL,string);
- format(string, sizeof(string), "UPDATE cars SET ColorTwo='%d' WHERE ID=%d", CarInfo[idd][cColorTwo], idd);
- mysql_query(SQL,string);
- format(string, sizeof(string), "UPDATE cars SET Owner='%s' WHERE ID=%d", CarInfo[idd][cOwner], idd);
- mysql_query(SQL,string);
- format(string, sizeof(string), "UPDATE cars SET Value='%d' WHERE ID=%d", CarInfo[idd][cValue], idd);
- mysql_query(SQL,string);
- format(string, sizeof(string), "UPDATE cars SET License='%s' WHERE ID=%d", CarInfo[idd][cLicense], idd);
- mysql_query(SQL,string);
- format(string, sizeof(string), "UPDATE cars SET Alarm='%d' WHERE ID=%d", CarInfo[idd][cAlarm], idd);
- mysql_query(SQL,string);
- format(string, sizeof(string), "UPDATE cars SET Lockk='%d' WHERE ID=%d", CarInfo[idd][cLock], idd);
- mysql_query(SQL,string);
- CarInfo[idd][Spawned] = CreateVehicle(CarInfo[idd][cModel],CarInfo[idd][cLocationx],CarInfo[idd][cLocationy],CarInfo[idd][cLocationz],CarInfo[idd][cAngle],1,1,-1);
- SetVehicleNumberPlate(idd,CarInfo[idd][cLicense]);
- format(string, sizeof(string), "UPDATE cars SET Spawned='%d' WHERE ID=%d", CarInfo[idd][Spawned], idd);
- mysql_query(SQL,string);
- }
- if(idd == 0)
- {
- masinii += 1;
- idd = masinii;
- PlayerInfo[playerid][pPcarkey] = idd;
- format(string, sizeof(string), "UPDATE users SET Car='%d' WHERE Name='%s'", PlayerInfo[playerid][pPcarkey], sendername);
- mysql_query(SQL,string);
- CarInfo[idd][cID] = idd;
- CarInfo[idd][cModel] = DSModele[IDDS[playerid]][1];
- CarInfo[idd][cLocationx] = -1631.0164; CarInfo[idd][cLocationy] = 1289.4585; CarInfo[idd][cLocationz] = 6.7459;
- CarInfo[idd][cAngle] = 133.8292;
- CarInfo[idd][cColorOne] = 1; CarInfo[idd][cColorOne] = 1;
- strmid(CarInfo[idd][cOwner], sendername, 0, strlen(sendername), 255);
- CarInfo[idd][cValue] = DSModele[IDDS[playerid]][2];
- strmid(CarInfo[idd][cLicense], "NewCar", 0, 6, 255);
- CarInfo[idd][cAlarm] = 0; CarInfo[idd][cLock] = 0;
- CarInfo[idd][mod0] = 0; CarInfo[idd][mod1] = 0; CarInfo[idd][mod2] = 0; CarInfo[idd][mod3] = 0;
- CarInfo[idd][mod4] = 0; CarInfo[idd][mod5] = 0; CarInfo[idd][mod6] = 0; CarInfo[idd][mod7] = 0;
- CarInfo[idd][mod8] = 0; CarInfo[idd][mod9] = 0; CarInfo[idd][mod10] = 0; CarInfo[idd][mod11] = 0;
- CarInfo[idd][mod12] = 0; CarInfo[idd][mod13] = 0; CarInfo[idd][paintjob] = 0; CarInfo[idd][KM] = 0;
- format(string, sizeof(string),"INSERT INTO cars (ID, Model) VALUES (%d, %d)", idd, CarInfo[idd][cModel]);
- mysql_query(SQL,string);
- format(string, sizeof(string), "UPDATE cars SET Locationx='%f' WHERE ID=%d", CarInfo[idd][cLocationx], idd);
- mysql_query(SQL,string);
- format(string, sizeof(string), "UPDATE cars SET Locationy='%f' WHERE ID=%d", CarInfo[idd][cLocationy], idd);
- mysql_query(SQL,string);
- format(string, sizeof(string), "UPDATE cars SET Locationz='%f' WHERE ID=%d", CarInfo[idd][cLocationz], idd);
- mysql_query(SQL,string);
- format(string, sizeof(string), "UPDATE cars SET Angle='%f' WHERE ID=%d", CarInfo[idd][cAngle], idd);
- mysql_query(SQL,string);
- format(string, sizeof(string), "UPDATE cars SET ColorOne='%d' WHERE ID=%d", CarInfo[idd][cColorOne], idd);
- mysql_query(SQL,string);
- format(string, sizeof(string), "UPDATE cars SET ColorTwo='%d' WHERE ID=%d", CarInfo[idd][cColorTwo], idd);
- mysql_query(SQL,string);
- format(string, sizeof(string), "UPDATE cars SET Owner='%s' WHERE ID=%d", CarInfo[idd][cOwner], idd);
- mysql_query(SQL,string);
- format(string, sizeof(string), "UPDATE cars SET Value='%d' WHERE ID=%d", CarInfo[idd][cValue], idd);
- mysql_query(SQL,string);
- format(string, sizeof(string), "UPDATE cars SET License='%s' WHERE ID=%d", CarInfo[idd][cLicense], idd);
- mysql_query(SQL,string);
- format(string, sizeof(string), "UPDATE cars SET Alarm='%d' WHERE ID=%d", CarInfo[idd][cAlarm], idd);
- mysql_query(SQL,string);
- format(string, sizeof(string), "UPDATE cars SET Lockk='%d' WHERE ID=%d", CarInfo[idd][cLock], idd);
- mysql_query(SQL,string);
- CarInfo[idd][Spawned] = CreateVehicle(CarInfo[idd][cModel],CarInfo[idd][cLocationx],CarInfo[idd][cLocationy],CarInfo[idd][cLocationz],CarInfo[idd][cAngle],1,1,-1);
- SetVehicleNumberPlate(idd,CarInfo[idd][cLicense]);
- format(string, sizeof(string), "UPDATE cars SET Spawned='%d' WHERE ID=%d", CarInfo[idd][Spawned], idd);
- mysql_query(SQL,string);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement