Jump to content

Problem z skryptem (Marker)


Recommended Posts

Posted

Witam, mam skrypt na dowód, zawiera kilka bugów, ale jeden z nich jest uciążliwy tzn. Chciałem przetestować skrypt, było nas dwóch na serwerze, gdy ja wbiłem w marker, GUI ukazało się i mi, i koledze ;/

Daje ułamek kodu:

  
local marker2 = createMarker(362.10000610352,173.60000610352,1007.4000244141, 'cylinder', 1.0, 205, 248, 6, 150) 
setElementInterior(marker2, 3) 
  
### Blablabla, tutaj jest gui, znaczy gridlist ### 
  
guiSetVisible ( GUIEditor.gridlist[1], false ) 
showCursor(false) 
      ------------------ 
  
  local nick = getPlayerName(getLocalPlayer()) 
  
  function MarkerHit ( marker2, hitPlayer, matchingDimension ) 
    
   local player2 = getPlayerName(getLocalPlayer())    
  if getElementData(getPlayerFromName(player2), "dowod", true) then 
       
        outputChatBox ("Już posiadasz wyrobiony dowód!",player, 0, 255, 0, true )  
else         
       outputChatBox ( "#FF4500[Dowód]#FFFFFFAby wyjść wpisz komende #48D1CC/wyjdz", 255, 0, 0, true) 
      guiSetVisible ( GUIEditor.gridlist[1], true ) 
      showCursor(true) 
  
    function drawText() 
        dxDrawText("Forumularz Dowodowy", 306, 162, 1037, 219, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "bottom", false, false, true, false, false) 
        dxDrawLine(306, 223, 1037, 223, tocolor(255, 255, 255, 255), 1, true) 
        dxDrawLine(306, 192, 1037, 192, tocolor(255, 255, 255, 255), 1, true) 
    end 
addEventHandler("onClientRender", getRootElement(), drawText)    
end 
end 
--addEvent("marker", true) 
addEventHandler ( "onClientMarkerHit", marker2, MarkerHit ) 

Myślę, że tyle wystarczy, bo chodzi mi o pojawianie się skryptu po wejściu w marker dla osoby w markerze, a nie dla wszystkich.

Z góry, baardzo dziękuje za pomoc, pozdrawiam.

PS. Dodam, że:

getElementType(element) == "player" then 

Nie za bardzo mi działa ;/

Posted

Zainstaluj sobie jakiś edytor i rób wcięcia w kodzie normalnie, bo tego się czytac nie da.

Sprawdź czy hitplayer jest równy lokalnemu graczowi

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

Posted

kod?

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...