Bug "AddstaticVehicle" on my mode
#1

Hello, When I try to add cars to my server, using the command "AddstaticVehicle".
Vehicles were added, but collide in Vehicle ID other, already programmed on the server before adding new vehicles. What do you mean? ScriptsFile folder I created a folder called "cars" in which Ida's vehicles have been programmed on the server, as you enter the car the carplate see its true. And when I try to add new vehicles are simply collide in ID of the existing vehicles.
How to add new vehicles and it's a txt file automatically cars directory, and see the real carplate his banshee for example, and not other types of vehicles as Torismo or infernous when I entered the car itself.
Thanks in advance, hope you understand me and sorry for my bad English

Picture:
Reply
#2

PLS HELP!!!!!!
Reply
#3

try with createvehicle instead
Reply
#4

Not working .. I tried it and it does not change anything
I know, when I add new vehicles are meeting ID of the existing vehicles on the server
and now i needs to fix that. how ?
Reply
#5

UPPP
Reply
#6

Show the code maybe ?
Reply
#7

ok, Here's the codes exists on a server running car with no problems
AddStaticVehicle(502,-2570.07739258,1136.48876953,55.64094162,160.000000 00,0,66); //Hotring Racer A
AddStaticVehicle(503,-2566.76220703,1134.85656738,55.66930389,160.000000 00,53,83); //Hotring Racer B
AddStaticVehicle(494,-2563.21875000,1134.13134766,55.62146759,159.999389 65,82,49); //Hotring

And here's a new vehicle code that is conflicting with an existing vehicle ID of the server
AddStaticVehicle(451,-2048.4016,463.0262,34.8795,313.6857,0,0); //
-------
I added a new vehicle through / spawnc
And kept it with command / save

PLEASE QUICKLY ANSWER !!

THE LIST OF cars on my SERVER


new VehNames[212][] =
{
"Landstalker","Bravura","Buffalo","Linerunner","Pe reniel","Sentinel","Dumper","Firetruck","Trashmast er",
"Stretch","Manana","Infernus","Voodoo","Pony","Mul e","Cheetah","Ambulance","Leviathan","Moonbeam","E speranto",
"Taxi","Washington","Bobcat","Mr Whoopee","BF Injection","Hunter","Premier","Enforcer","Securica r","Banshee",
"Predator","Bus","Rhino","Barracks","Hotknife","Tr ailer","Previon","Coach","Cabbie","Stallion","Rump o",
"RC Bandit","Romero","Packer","Monster","Admiral","Squ alo","Seasparrow","Pizzaboy","Tram","Trailer",
"Turismo","Speeder","Reefer","Tropic","Flatbed","Y ankee","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","Rus tler","Zr 350","Walton","Regina","Comet","Bmx",
"Burrito","Camper","Marquis","Baggage","Dozer","Ma verick","News Chopper","Rancher","FBI Rancher","Virgo",
"Greenwood","Jetmax","Hotring","Sandking","Bli sta Compact","Police Maverick","Boxville","Benson","Mesa",
"RC Goblin","Hotring Racer A","Hotring Racer B","Bloodring Banger","Rancher","Super GT","Elegant",
"Journey","Bike","Mountain Bike","Beagle","Cropdust","Stunt","Tanker","RoadTr ain","Nebula","Majestic",
"Buccaneer","Shamal","Hydra","Fcr - 900","Nrg - 500","Hpv - 1000","Cement Truck","Tow Truck","Fortune","Cadrona",
"FBI Truck","Willard","Forklift","Tractor","Combine","F eltzer","Remington","Slamvan","Blade","Freight",
"Streak","Vortex","Vincent","Bullet","Clover","Sad ler","Firetruck","Hustler","Intruder","Primo","Car gobob",
"Tampa","Sunrise","Merit","Utility","Nevada","Yose mite","Windsor","Monster A","Monster B","Uranus",
"Jester","Sultan","Stratum","Elegy","Raindance","R C Tiger","Flash","Tahoma","Savanna","Bandito","Freig ht",
"Trailer","Kart","Mower","Duneride","Sweeper","Bro adway","Tornado","AT-400","DFT-30","Huntley","Stafford",
"BF-400","Newsvan","Tug","Trailer A","Emperor","Wayfarer","Euros","Hotdog","Club","T railer B","Trailer C",
"Andromada","Dodo","RC Cam","Launch","Police Car (LSPD)","Police Car (SFPD)","Police Car (LVPD)","Police Ranger",
"Picador","S.W.A.T. Van","Alpha","Phoenix","Glendale","Sadler","Luggag e Trailer A","Luggage Trailer B",
"Stair Trailer","Boxville","Farm Plow","Utility Trailer"
};
enum VehInfo
{
CarID,
CarName[30],
CarModel,
CarOwned,
CarOwner[MAX_PLAYER_NAME],
CarLocked,
Buyable,
Price,
Nitro,
Hyd,
WheelsOn,
Wheels,
pjob,
Parkedx,
Parkedy,
Parkedz,
ParkedAngle,
carname1,
Colour1,
Colour2

};
Reply
#8

Where are you adding the correctly named cars? Where are you loading the "conflicting" car? Where do you set carplates? We need more code, this is simple array initialization
Reply
#9

I will give you an example of code of vehicles exist on the server:
I come now to a folder and then Scriptfiles Cars folder.
I have a txt file on the server of existing vehicles, that is their ID.
Example:
car22.txt

Content:
CarID=22
CarName=Sandking
CarModel=495
CarOwned=0
CarOwner=none
CarLocked=0
Buyable=1
Price=80000
Nitro=0
Hyd=0
Wheel=0
pjob=0
carname1=Sandking
carplate=Sandking
Color1=-1
Color2=-1
PayTaxTime=30
Parkedx=0
Parkedy=0
Parkedz=0
Parkedangle=0
----
I searched the Addstaticvehicle now its in my mod.
And here is with others Sandking vehicles:
AddStaticVehicle(495,-302.93405151,1745.81860352,43.24757385,270.0000000 0,0,1); //Sandking
AddStaticVehicle(495,-302.93405151,1748.91125488,43.24757385,270.0000000 0,3,32); //Sandking
AddStaticVehicle(495,-302.93405151,1751.93750000,43.24757385,270.0000000 0,36,1); //Sandking
AddStaticVehicle(495,-302.93405151,1755.17309570,43.24757385,270.0000000 0,16,1); //Sandking

And now I'm trying to add new vehicles to server with the command Addstaticvehicle
AddStaticVehicle(451,-2048.4016,463.0262,34.8795,313.6857,0,0); // turismo

Another vehicle to serve successfully.
But, he apparently collided with the ID of the vehicle SandKing
when i enter the vehicle , i see "Wellcome to Turimso, Available for purchase at 300,000 dollars /buycar"
and his name Carplate is "SandKing" his price 300,000 instead of 500,000.
I should add the Torismo, and his have a txt file of its own .. That means a file with its standard for Price includes regular name.
how i do that?

PLS QUICKLY ANSWER !
Reply
#10

You still didn't provide important things. Where in the code are you loading the .txt file? Where do you determine which id to load? When are you using AddStaticVehicle (I remind you that you can use this only in OnGameModeInit)?
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)