Let’s start
Everything what you need is:
vRP
vRP Basic Menu
Step 1.
Add choices to vrp_basic_menu/server.lua
local coroner_enter = {}
coroner_enter["Enter"] = {function(player,choice)
vRPclient.teleport(player,{254.37602233887,-1372.4349365234,24.537794113159}) -- Destination point (Morgue)
end}
local coroner_out = {}
coroner_out["Quit"] = {function(player,choice)
vRPclient.teleport(player,{241.16851806641,-1379.0466308594,33.741760253906}) -- Destination point (Outside)
end}
After that, you need to add StaticMenuChoices
vRP.addStaticMenuChoices({"coroner_in", coroner_enter})
vRP.addStaticMenuChoices({"coroner_out", coroner_out})
Step 2.
Open vrp/cfg/gui.lua
And add this
Also you can add blipid, blipcolor and permissions
cfg.static_menu_types = {
["coroner_in"] = {
title = "Los Santos County Coroner Office" -- You can name it like you want
},
["coroner_out"] = {
title = "Los Santos County Coroner Office" -- You can name it like you want
}
}
After that, you need to add menus
cfg.static_menus = {
{"coroner_in", 241.16851806641,-1379.0466308594,33.741760253906}, -- Marker (Enter)
{"coroner_out",254.37602233887,-1372.4349365234,24.537794113159}, -- Marker (Quit)
}
That’s all! Easily, right?
I hope this is useful to someone.
Many thanks to Sighmir and ImagicTheCat and other vRP developers!
!UPD!
This tutorial was made for the old vRP version, it does not work with the vRPex.
Check my other tutorial:
[How-to] vRP Vehicle control with GUI (Example)