Jump to content

Giovanni999

Members
  • Posts

    9
  • Joined

  • Last visited

Everything posted by Giovanni999

  1. OK guys, the results with a friend are: When he goes to the marker, the window appears on me too and his game blocks. He can't move till I turn off the resource. I also want to say that, that file I post there, the .lua file, is client type. I made a server type also, but just with some nitro things... I can't really find the problem...
  2. I used all your lines, all but that, because it was not right. It's good like this: 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
  3. I didn't mate, you made a mistake here (this is in your post): function Close() if ( isElement ( modshop ) ) then destroyElement ( odshop ) end showCursor ( false ) end
  4. Sorry for posting with that format, I still don't know how to do it like you did ^^
  5. 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
  6. But there is still a mistake, I still open the window without any vehicle... How can I restrict it?
  7. I tried all, only Dimos7's worked right, I will wait for a friend to try it too, because yesterday I was the only one capable of mod my cars... Will post the results later, thanks all!! Appreciate ur time!
  8. Still not working guys, do I need to change server script too? Now I touch the marker and the window does not close..
  9. Hey guys, I'm still newbie and I can't write this script correctly, what should I do to make Panel window open when (only) vehicles hit the marker (only that marker)? Waiting for a answer, thanks for reading. modshopls1 = createMarker(1041.5,-1021.5,31,"cylinder",3.5,250,0,0,100,getRootElement ()) Blipmodshopls1 = createBlipAttachedTo(modshopls1, 27) setBlipVisibleDistance (Blipmodshopls1, 300) function Panel() 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) showCursor ( true ) addEventHandler ( "onClientGUIClick", Exit, Close, false ) addEventHandler ( "onClientGUIClick", Nitrox2, Nitroxx2, false ) addEventHandler ( "onClientGUIClick", Nitrox5, Nitroxx5, false ) addEventHandler ( "onClientGUIClick", Nitrox10, Nitroxx10, false ) end function MarkerHit( vehicle ) end addEventHandler ( "onClientMarkerHit", modshopls1, Panel ) function Close() guiSetVisible (modshop, not guiGetVisible ( modshop ) ) showCursor ( false ) end function Nitroxx2() triggerServerEvent ( "onNitroxxx2", getLocalPlayer() ) end function Nitroxx5() triggerServerEvent ( "onNitroxxx5", getLocalPlayer() ) end function Nitroxx10() triggerServerEvent ( "onNitroxxx10", getLocalPlayer() ) end
×
×
  • Create New...