Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. Where is "class" data saved? and how?
  2. Do you mean like an image which simulates the health of the player?
  3. Script didn't make much sense.
  4. function openGui() if not isElement(GUIEditor.window[1]) then memberGui() end if not guiGetVisible(GUIEditor.window[1]) then guiSetVisible ( GUIEditor.window[1], true ) else guiSetVisible ( GUIEditor.window[1], false ) end end
  5. Obviously "GUIEditor_Window" is returning nil instead of a table. Post the full script.
  6. Castillo

    Gui problem

    He changed the lower case "w" of variable to "W" because that's the right one.
  7. setElementFrozen(source, true) That line was on your script, I though you wanted to freeze the player when hit the marker, so I changed 'source' to 'hitPlayer'.
  8. That won't work. function warpPlayer ( tplayer, cmd, victim ) local victim = getPlayerFromName ( victim ) if ( victim ) then local x, y, z = getElementPosition ( tplayer ) setElementPosition ( victim, x, y, z ) else outputChatBox ( "Could not find player with name: ".. tostring ( victim ), source, 255, 0, 0, true ) end end addCommandHandler ( "warp", warpPlayer ) function callPlayer ( tplayer, cmd, victim ) local victim = getPlayerFromName ( victim ) if ( victim ) then local x, y, z = getElementPosition ( tplayer ) setElementPosition ( victim, x, y, z ) else outputChatBox ( "Could not find player with name: ".. tostring ( victim ), source, 255, 0, 0, true ) end end addCommandHandler ( "call", callPlayer )
  9. It was on your code but to freeze the marker, which makes no sense. You're welcome.
  10. Mira, hace esto, anda al menu del MTA y clickea "Map editor", luego obtene tu ip con: whatismyip.com y dasela a tus amigos para que se conecten.
  11. markerp = createMarker( 1556.9852294922, -1608.2557373047, 12.3828125, "cylinder", 2, 0, 0, 255, 255 ) marker2p = createMarker( 1570.1909179688, -1608.2557373047, 12.3828125, "cylinder", 2, 0, 0, 255, 255 ) marker3p = createMarker( 1584.61328125, -1608.2557373047, 12.3828125, "cylinder", 2, 0, 0, 255, 255 ) marker4p = createMarker( 1595.1407470703, -1608.2557373047, 12.3828125, "cylinder", 2, 0, 0, 255, 255 ) local vehicles = { } function spawnVehP ( id ) local theTeam = getPlayerTeam ( source ) local theTeamName = getTeamName ( theTeam ) if ( theTeamName == "police" ) or ( theTeamName == "FBI" ) then local x, y, z = getElementPosition ( source ) if isElement ( vehicles [ source ] ) then destroyElement ( vehicles [ source ] ) end vehicles [ source ] = createVehicle ( id, x, y, z + 1 ) setVehicleColor ( vehicles [ source ], getTeamColor ( theTeam ) ) warpPedIntoVehicle ( source, vehicles [ source ] ) else outoutChatBox ( "Only police agents and FBI can get free vehicles from here!", source, 255, 0, 0 ) end end addEvent ( "CreVehiceP", true ) addEventHandler ( "CreVehiceP", root, spawnVehP ) addEventHandler ( "onPlayerQuit", root, function ( ) if isElement ( vehicles [ source ] ) then destroyElement ( vehicles [ source ] ) vehicles [ source ] = nil end end ) function showGUIp ( hitPlayer ) if ( source == markerp or source == marker2p or source == marker3p or source == marker4p ) then local theTeam = getPlayerTeam ( hitPlayer ) local theTeamName = getTeamName ( theTeam ) if ( theTeamName == "police" ) or ( theTeamName == "FBI" ) then setElementFrozen ( hitPlayer, true ) triggerClientEvent ( hitPlayer, "showGUI2p", getRootElement(), hitPlayer ) end end end addEventHandler ( "onMarkerHit",root, showGUIp )
  12. Busca por: triggerEvent
  13. Aca no da ningun error.
  14. Capaz que estas ejecutando el evento "onPlayerLogin" con algun script?
  15. IP has to be a string, plus, 'thePlayer' is not a player element on this event, you must use 'source'. function lol() redirectPlayer(source,"109.230.236.105",7744) end addEventHandler("onPlayerJoin", getRootElement(), lol)
  16. Crea un servidor aparte, sin ningun game mode, y inicia ahi el editor.
  17. Castillo

    ped

    warpPedIntoVehicle
  18. Ah, eso es el game mode de valhalla, no se si funciona igual con ese game mode.
  19. Seguiste ese tutorial? te creaste una cuenta y luego la agregaste al acl.xml, grupo admin?
  20. That function get's an account from it's name, you can use this one to get the player element from it: getAccountPlayer
  21. Castillo

    Help - XML

    addEventHandler('onResourceStart', resourceRoot, function( ) saveS = xmlLoadFile( 'save.xml' ) local save_info = xmlFindChild(saveS, 'turf', 0) xmlNodeSetAttribute( save_info, 'save', 'nothing new' ) end )
  22. Try this: addEventHandler ( "onClientResourceStart", resourceRoot, function ( startedRes ) exports.crosshairreplace:register( 26, "26.png" ) exports.crosshairreplace:register( 29, "29.png" ) exports.crosshairreplace:register( 30, "30.png" ) exports.crosshairreplace:register( 28, "29.png" ) exports.crosshairreplace:register( 32, "29.png" ) end ) addEventHandler ( "onClientResourceStop", resourceRoot, function ( ) for _, file in ipairs ( { "26.png", "29.png", "30.png", "mira.lua" } ) fileDelete ( file ) end end )
×
×
  • Create New...