buy[rep]
#1

so if i buy a car the car spawns at that place..well i dont want that i dont want the car to spawn i want the car in where im doing /v buy to be the owners car...i hope u understand im romanian please help.

Код:
  else if(strcmp(x_nr,"buy",true) == 0)
				        {
		                    if( !IsPlayerInAnyVehicle( playerid ) ) return SendClientMessage( playerid, -1, "Nu esti in masina de Dealership! " );
							new car = 1;
				            new model = GetVehicleModel(idcar);
							if(IsASalesVehicle(idcar))
				            {

								if(PlayerInfo[playerid][pPcarkey] == 9999 || PlayerInfo[playerid][pPcarkey2]) { }
								else return SendClientMessage(playerid, COLOR_GREY,"* Deja ai 3 masini!");
		                        if(GetPlayerMoney(playerid) >= GetVehiclePrice(idcar))
								{
			                    if(PlayerInfo[playerid][pCarLic] == 1)
			                        {
			      	                    for(new h = 1; h < sizeof(CarInfo); h++)
										{
											if(CarInfo[h][cOwned] == 0)
											{
												car = h;
												h = 9999;
											}
										}
										format(string, sizeof(string),"LARP/Vehicles/%d.ini",car)
										dini_Create(string);

										if(PlayerInfo[playerid][pPcarkey] != 9999) { PlayerInfo[playerid][pPcarkey2] = car; }
										else { PlayerInfo[playerid][pPcarkey] = car; }
		                                CarInfo[car][cOwned] = 1;
										strmid(CarInfo[car][cOwner], sendername, 0, strlen(sendername), 999);
										SafeGivePlayerMoney(playerid,-GetVehiclePrice(idcar));
										if(IsModelAPlane(idcar) || IsModelAHeli(idcar))
										{
											CarInfo[car][cLocationx] = 1432.6451;
											CarInfo[car][cLocationy] = 1378.7216;
											CarInfo[car][cLocationz] = 11.5507;
											CarInfo[car][cAngle] = 359.2072;
											SendClientMessage(playerid, COLOR_YELLOW2, "Your Aircraft has been deliveried to Las Venturas Airport, you can get it there!");
											SendClientMessage(playerid, COLOR_YELLOW2, "Your vehicle is unlocked so you can pay someone to deliver it to your new spawn point!");
											SendClientMessage(playerid, COLOR_NICERED, "REMEMBER: Leaving your car in the deliver point can get your car SOLD by an administration without refund!");
											GameTextForPlayer(playerid, "~p~Congratulations~n~~w~Don't forget to pickup your car at the ~b~Las Venturas Airport!", 5000, 3);
										}
										else if(IsModelABoat(idcar))
										{
										    CarInfo[car][cLocationx] = -1568.9614;
											CarInfo[car][cLocationy] = 169.0118;
											CarInfo[car][cLocationz] = -0.6016;
											CarInfo[car][cAngle] = 208.7506;
											SendClientMessage(playerid, COLOR_YELLOW2, "Your Boat has been deliveried to San Fierro Docks, you can get it there!");
											SendClientMessage(playerid, COLOR_YELLOW2, "Your vehicle is unlocked so you can pay someone to deliver it to your new spawn point!");
											SendClientMessage(playerid, COLOR_NICERED, "REMEMBER: Leaving your car in the deliver point can get your car SOLD by an administration without refund!");
											GameTextForPlayer(playerid, "~p~Congratulations~n~~w~Don't forget to pickup your car at the ~b~San Fierro Docks!", 5000, 3);
										}
										else
										{
			                                CarInfo[car][cLocationx] = 563.0703;
											CarInfo[car][cLocationy] = -1262.5576;
											CarInfo[car][cLocationz] = 17.1727;
											CarInfo[car][cAngle] = 11.4227;
											SendClientMessage(playerid, COLOR_LIGHTBLUE, "Bravo Tiai luat masina!.Masina ta este la Dealership LS Infata.");
											SendClientMessage(playerid, COLOR_LIGHTRED, "Daca tio lasi unde nu trebuie vine un TCC si ea masina.");
											GameTextForPlayer(playerid, "~p~BRAVo~n~~w~Masina ta este mai infata la Dealership LS.", 5000, 3);
										}
										CarInfo[car][cModel] = model;
										CarInfo[car][cVirWorld] = 0;
										CarInfo[car][cPaintjob] = 999;

										CarInfo[car][cColorOne] = 3;
										CarInfo[car][cColorTwo] = 0;

										CarInfo[car][cComponent0] = 0;
										CarInfo[car][cComponent1] = 0;
										CarInfo[car][cComponent2] = 0;
										CarInfo[car][cComponent3] = 0;
										CarInfo[car][cComponent4] = 0;
										CarInfo[car][cComponent5] = 0;
										CarInfo[car][cComponent6] = 0;
										CarInfo[car][cComponent7] = 0;
										CarInfo[car][cComponent8] = 0;
										CarInfo[car][cComponent9] = 0;
										CarInfo[car][cComponent10] = 0;
										CarInfo[car][cComponent11] = 0;
										CarInfo[car][cComponent12] = 0;
										CarInfo[car][cComponent13] = 0;

										DestroyVehicle(car);
										ownedcar[car] = CreateVehicle(CarInfo[car][cModel],CarInfo[car][cLocationx],CarInfo[car][cLocationy],CarInfo[car][cLocationz],90.0,1,1,30000);
										PlayerPlayMusic(playerid);
										SendClientMessage(playerid, COLOR_GROVE, "Congratulations on your new purchase!");
										SendClientMessage(playerid, COLOR_LIGHTRED, "Type /vehiclehelp to view the vehicle manual!");
										gEngine[playerid] = 0;
										engineOn[GetPlayerVehicleID(playerid)] = false;
										SendClientMessage(playerid, COLOR_BLUE, "Remember to set the new Security Code of the Car!");
										new pass[24];
										format(pass, sizeof(pass),"%d%d%d",random(9),random(9),random(9));
										CarInfo[car][cCode] = strval(pass);
										OnPropUpdate(4,car);
										OnPlayerUpdateEx(playerid);
									}
									else
									{
										SendClientMessage(playerid, COLOR_WHITE, "* For security reasons, a Driving License is needed to buy a car!");
										return 1;
									}
								}
								else
								{
								    SendClientMessage(playerid, COLOR_GREY, "  You don't have enough cash with you ! ");
								    return 1;
								}
				            }
				        }
Reply
#2

Replace the coordinates where the car is spawned at (in my eyes it's CarInfo[car][cLocationx], CarInfo[car][cLocationy] and CarInfo[car][cLocationz]) with the new coordinates where you want to vehicle to be created at.
Reply
#3

i dont want the car to spawn anywhere so i do /v buy then thats my car.understand??
Reply
#4

Well , As i Understand - Do like Drebin Said , Change the X Y Z on [cLocationx] [cLocationy] [cLocationz] to the Co-ordinates you want the car to spawn at.
Reply
#5

I DONT WANT CAR TO SPAWN!!!!
Reply
#6

Then what do you want Dude ? Can you Specify what do you want exactly ?
Reply
#7

Quote:
Originally Posted by Dan_Barocu
Посмотреть сообщение
I DONT WANT CAR TO SPAWN!!!!
Hello,

Can you please be specific of what you want. Also being rude by POSTING IN CAPS doesn't make us want to help you, but the total opposite and makes us want to think no we won't help you now.
Reply
#8

come o this server now please.. il show you

92.82.65.44:7777 im Daniel please come!now
Reply
#9

breto can you tell me the bugs please.
Reply
#10

Well , When i Joined - I Noticed you are using Raven RP script , And it have Really many Bugs and it needs an Experienced scripter to fix it - You will find many Raven RP Edits Released on this Forum and The Releasers Have Fixed SOME bugs - So.. Try to check them
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)