-
Posts
21,935 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Castillo
-
Where is "class" data saved? and how?
-
Do you mean like an image which simulates the health of the player?
-
Script didn't make much sense.
-
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
-
Obviously "GUIEditor_Window" is returning nil instead of a table. Post the full script.
-
He changed the lower case "w" of variable to "W" because that's the right one.
-
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'.
-
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 )
-
It was on your code but to freeze the marker, which makes no sense. You're welcome.
-
Duda, porfavor alguna respuesta.
Castillo replied to Andres Zunino's topic in Ayuda relacionada al cliente/servidor
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. -
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 )
-
Busca por: triggerEvent
-
Aca no da ningun error.
-
Capaz que estas ejecutando el evento "onPlayerLogin" con algun script?
-
Que error exactamente?
-
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)
-
Duda, porfavor alguna respuesta.
Castillo replied to Andres Zunino's topic in Ayuda relacionada al cliente/servidor
Crea un servidor aparte, sin ningun game mode, y inicia ahi el editor. -
Change 'player' to 'client'.
-
No, as far as I know.
-
Duda, porfavor alguna respuesta.
Castillo replied to Andres Zunino's topic in Ayuda relacionada al cliente/servidor
Ah, eso es el game mode de valhalla, no se si funciona igual con ese game mode. -
Duda, porfavor alguna respuesta.
Castillo replied to Andres Zunino's topic in Ayuda relacionada al cliente/servidor
Seguiste ese tutorial? te creaste una cuenta y luego la agregaste al acl.xml, grupo admin? -
That function get's an account from it's name, you can use this one to get the player element from it: getAccountPlayer
-
addEventHandler('onResourceStart', resourceRoot, function( ) saveS = xmlLoadFile( 'save.xml' ) local save_info = xmlFindChild(saveS, 'turf', 0) xmlNodeSetAttribute( save_info, 'save', 'nothing new' ) end )
-
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 )