Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. Castillo

    Can Be ?

    That's because it requires an HEX code, not R, G, B values.
  2. What is a "Rang system"? or you mean "Gang system"?
  3. You can use client side XML. https://wiki.multitheftauto.com/wiki/Cli ... _functions
  4. Try this and see what it says on chat box: addEventHandler ( "onMapStarting", root, function ( mapInfo ) outputChatBox ( "Map name: ".. mapInfo.name ) if string.find ( mapInfo.name, "[DM]", 1, true ) then startResource ( getResourceFromName ( "TEST" ) ) else stopResource ( getResourceFromName ( "TEST" ) ) end end )
  5. Try this: addEventHandler ( "onMapStarting", root, function ( mapInfo ) if string.find ( mapInfo.name, "[DM]", 1, true ) then startResource ( getResourceFromName ( "TEST" ) ) else stopResource ( getResourceFromName ( "TEST" ) ) end end )
  6. If you use 'getRootElement' for the 'on(Client)ResourceStart' event, it'll execute the function when any resource starts.
  7. Castillo

    Ayuda

    local marker = createMarker ( 1797.8017578125, -1578.6630859375, 14.088376045227, "arrow", 1.5, 0, 255, 0, 170 ) function MarkerHit ( hitElement, matchingDimension ) if ( getElementType ( hitElement ) == "player" ) then setElementPosition ( hitElement, 1797.8017578125, -1578.6630859375, 14.088376045227 ) end end addEventHandler ( "onMarkerHit", marker, MarkerHit )
  8. You can use the same variable names on many resources, they won't overwrrite.
  9. Castillo

    Ayuda

    Postea lo que probaste.
  10. Castillo

    Ayuda

    Es una combinacion del evento: onMarkerHit con setElementPosition.
  11. Porque no le envias un mensaje privado si esta destinado solo para el?
  12. You can store them on a lua table, then when re-open the GUI, loop the table and insert them into the grid list.
  13. You are triggering the function before it's creation, or that code isn't the real one?
  14. Don't confuse him, he already has 'hitPlayer' defined.
  15. He already has that function used, he can just check if 'theVehicle' returns a element.
  16. Check the player who hit the marker is on a vehicle.
  17. 3rd argument is the time.
  18. Castillo

    Ayuda :c

    Te falta un 'end' para cerrar el 'if'.
  19. Check the team with: getPlayerTeam getTeamName
  20. police_window = guiCreateWindow(350,205,728,380,"RoG Police Window",false) guiSetVisible(police_window, false) guiSetAlpha(police_window,1) guiWindowSetSizable(police_window,false) playerList = guiCreateGridList(14,34,699,272,false,police_window) column = guiGridListAddColumn(playerList,"Name",0.2) police_closeBTN = guiCreateButton(163,325,416,36,"Close",false,police_window) bindKey("F5", "down", function ( ) guiSetVisible(police_window, not guiGetVisible ( police_window )) showCursor(guiGetVisible ( police_window )) if ( guiGetVisible ( police_window ) ) then guiGridListClear ( playerList ) if ( column ) then for id, player in ipairs ( getElementsByType ( "player" ) ) do local row = guiGridListAddRow ( playerList ) local r, g, b = getPlayerNametagColor ( player ) guiGridListSetItemText ( playerList, row, column, getPlayerName ( player ), false, false ) guiGridListSetItemColor ( playerList, row, column, r, g, b ) end end end ) -- Close the window function close() guiSetVisible(police_window, false) guiSetVisible(playerList, false) guiSetVisible(column, false) showCursor(false,false) end addEventHandler("onClientGUIClick", police_closeBTN, close)
  21. Maybe because you are moving it to the same position as it is already?
×
×
  • Create New...