Car Dealer

Post Reply
geckie456
New to forums
New to forums
Posts: 13
https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
Joined: Sat Jul 18, 2015 2:41 pm

Car Dealer

Post by geckie456 »

I followed this video: https://www.youtube.com/watch?v=cF9HeDlO9hg
I did everything it did, but my car dealer doesnt spawn. I contacted NFO and they said put a forum post.
I really would like to know whats wrong. This is my code in notepad++:

/*
Only change stuff in here!
*/
NPCSHOP = NPCSHOP or {}
NPCSHOP.CarSpawn = {}
NPCSHOP.NPCSpawn = {}

/*
Edit stuff below this line
**************************
*/
// Model of the NPC, can be changed to whatever you want, as long as it follows this path of models/<modelname>.mdl
NPCSHOP.NPCModel = "models/batman/slow/jamis/mkvsdcu/batman/slow_pub_v2.mdl"

//Position of the NPC, in YOUR console, type getpos to get positioning co-ordinates

NPCSHOP.NPCSpawn["rp_mapnamehere"] = { //Put the actual map name in
pos = Vector( -2250.778809, -447.468140, -131.968750),
ang = Angle(2.685797, -88.270142, 0.000000)
}

//Position for the carspawn

NPCSHOP.CarSpawn["rp_downtown_v4c_v2_drp_ext"] = {
pos = Vector(-2222.951660, -937.542664, -139.968750),
ang = Angle(7.393356, 179.723373, 0.000000)
}

setpos -2242.889160 -163.675583 -71.362671;setang 2.606495 -91.627533 0.000000


//Which ULX usergroups are considered "Donator"
NPCSHOP.UserGroups = {"vip", "vip+", "admin", "superadmin", "head-admin", "co-owner," "owner"}

/*=-=-=-=-=-=-=-=-=-=-==--=-=-=-=-=-=HOW TO ADD VEHICLES=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Add vehicles here.

The jobrestriction is abit wonky, in darkrp you can just do like {TEAM_POLICE, TEAM_CHIEF, TEAM_MAYOR} but it doesn't really work the same here.
Jobrestriction is put with {1,2,3} where 1, 2 and 3 are the team numbers of those teams, in order to get the team numbers, just go ingame, open console
using F11 and type "lua_run_cl print(TEAM_CITIZEN)" which will give you the team number for citizen. You can also get the teamnumber of your current
team by typing "lua_run_cl print(LocalPlayer():Team())"
If you add or remove darkrp teams, this process (in some cases) have to be done again!

NPCSHOP.AddVehicle(name, class, model, price, jobrestriction, donatoronly)
name: Name of the vehicle in the npcshop menu
class: Vehicle-class of the vehicle. Use "rp_getvehicles" to find these.
model: Model which will appear in the npcshop menu
price: How much it costs
jobrestriction: What jobs will be able to buy this (type nil if its available to all jobs)
donatoronly: Is this vehicle only available for donator's? true/false
Display name > Class (rp_getvehicles in console) > Model directory > Price > Jobs > Donator/Not Donator - False = Not Donator, True = Donator
*/
NPCSHOP.AddVehicle("Hummer H1", "h1tdm", "models/tdmcars/hummerh1.mdl", 25000, nil, false )
NPCSHOP.AddVehicle("Land Rover Defender", "lrdefendertdm", "models/tdmcars/landrover_defender.mdl", 25000, nil, false )
NPCSHOP.AddVehicle("Alfa Romeo 33 Stradale", "alfa_stradaletdm", "models/tdmcars/hummerh1.mdl", 50000, nil, false )



__________________________________________________________________________________

This is my code. Please can someone look into this, and help me.
Thank you! :D
Mayoz
A semi-regular
A semi-regular
Posts: 18
Joined: Sat Jan 03, 2015 11:49 am

Re: Car Dealer

Post by Mayoz »

setpos -2242.889160 -163.675583 -71.362671;setang 2.606495 -91.627533 0.000000

should not be there
Post Reply