ok guys, I changed few stuff in your scripts and I got it, it works for me, only vehicles and no errors, will wait for other person to try it out and then I'll post. Anyway, here is the final result:
modshopls1 = createMarker(1041.5,-1021.5,31,"cylinder",3.5,250,0,0,100,getRootElement ())
addEventHandler ( "onClientMarkerHit", modshopls1,
function ( hitElement, matchingDimension )
if ( getElementType ( hitElement ) == "player" and matchingDimension ) then
if ( isPedInVehicle ( hitElement ) ) then
Panel ( )
end
end
end
)
Blipmodshopls1 = createBlipAttachedTo(modshopls1, 27)
setBlipVisibleDistance (Blipmodshopls1, 300)
function Panel()
showCursor ( true )
modshop = guiCreateWindow(1230, 285, 323, 433, "modshop", false)
guiWindowSetSizable(modshop, false)
Nitrox2 = guiCreateButton(20, 38, 134, 43, "Nitrox2", false, modshop)
Nitrox5 = guiCreateButton(20, 100, 134, 43, "Nitrox5", false, modshop)
Nitrox10 = guiCreateButton(20, 163, 134, 43, "Nitrox10", false, modshop)
Exit = guiCreateButton(66, 375, 193, 48, "Exit", false, modshop)
addEventHandler ( "onClientGUIClick", Exit, Close, false )
addEventHandler ( "onClientGUIClick", Nitrox2, Nitroxx2, false )
addEventHandler ( "onClientGUIClick", Nitrox5, Nitroxx5, false )
addEventHandler ( "onClientGUIClick", Nitrox10, Nitroxx10, false )
end
function Close()
guiSetVisible (modshop, false )
showCursor ( false )
end
function Nitroxx2()
triggerServerEvent ( "onNitroxxx2", getLocalPlayer() )
end
function Nitroxx5()
triggerServerEvent ( "onNitroxxx5", getLocalPlayer() )
end
function Nitroxx10()
triggerServerEvent ( "onNitroxxx10", getLocalPlayer() )
end