Jump to content

iFoReX

Members
  • Posts

    1,708
  • Joined

  • Last visited

Everything posted by iFoReX

  1. funciona pero a medias , en la GUI se escribe x y z no las posiciones porq sera :c Lo arregle ahora funciona a la perfeccion aqui mi codigo addEventHandler( 'onClientGUIClick', root, function( btn ) if btn ~= 'left' then return false; end; if source == GUIEditor_Button[1] then local x, y, z = getElementPosition( me ); guiSetText( GUIEditor_Edit[1], x ); guiSetText( GUIEditor_Edit[2], y ); guiSetText( GUIEditor_Edit[3], z ); end; end );
  2. la variable esta arriba en la GUI y lo de soren lo probe y no me funciono
  3. alexs, no entiendo , como es eso de "en donde se define" ]?
  4. aqui ta mi codigo porfas ayudenme GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Window[1] = guiCreateWindow(0.3535,0.2417,0.5498,0.605,"GUI Editor De Casas",true) guiWindowSetMovable(GUIEditor_Window[1],false) guiWindowSetSizable(GUIEditor_Window[1],false) GUIEditor_Label[1] = guiCreateLabel(18,47,169,18,"Coordinadas donde se entrara",false,GUIEditor_Window[1]) GUIEditor_Edit[1] = guiCreateEdit(17,68,166,26,"",false,GUIEditor_Window[1]) guiEditSetReadOnly(GUIEditor_Edit[1],true) GUIEditor_Edit[2] = guiCreateEdit(17,94,166,26,"",false,GUIEditor_Window[1]) guiEditSetReadOnly(GUIEditor_Edit[2],true) GUIEditor_Edit[3] = guiCreateEdit(17,120,166,26,"",false,GUIEditor_Window[1]) guiEditSetReadOnly(GUIEditor_Edit[3],true) GUIEditor_Label[2] = guiCreateLabel(18,179,228,18,"Coordinadas donde se teletrans. a la casa",false,GUIEditor_Window[1]) GUIEditor_Edit[4] = guiCreateEdit(17,196,166,26,"",false,GUIEditor_Window[1]) guiEditSetReadOnly(GUIEditor_Edit[4],true) GUIEditor_Edit[5] = guiCreateEdit(17,222,166,26,"",false,GUIEditor_Window[1]) guiEditSetReadOnly(GUIEditor_Edit[5],true) GUIEditor_Edit[6] = guiCreateEdit(17,248,166,26,"",false,GUIEditor_Window[1]) guiEditSetReadOnly(GUIEditor_Edit[6],true) GUIEditor_Label[3] = guiCreateLabel(349,47,169,18,"Coordinadas donde se saldra",false,GUIEditor_Window[1]) GUIEditor_Edit[7] = guiCreateEdit(347,68,166,26,"",false,GUIEditor_Window[1]) guiEditSetReadOnly(GUIEditor_Edit[7],true) GUIEditor_Edit[8] = guiCreateEdit(348,94,166,26,"",false,GUIEditor_Window[1]) guiEditSetReadOnly(GUIEditor_Edit[8],true) GUIEditor_Edit[9] = guiCreateEdit(349,120,166,26,"",false,GUIEditor_Window[1]) guiEditSetReadOnly(GUIEditor_Edit[9],true) GUIEditor_Label[4] = guiCreateLabel(308,179,216,19,"Coordinadas donde se saldra al exterior",false,GUIEditor_Window[1]) GUIEditor_Edit[10] = guiCreateEdit(347,197,166,26,"",false,GUIEditor_Window[1]) guiEditSetReadOnly(GUIEditor_Edit[10],true) GUIEditor_Edit[11] = guiCreateEdit(348,223,166,26,"",false,GUIEditor_Window[1]) guiEditSetReadOnly(GUIEditor_Edit[11],true) GUIEditor_Edit[12] = guiCreateEdit(349,248,166,26,"",false,GUIEditor_Window[1]) guiEditSetReadOnly(GUIEditor_Edit[12],true) GUIEditor_Label[5] = guiCreateLabel(203,35,125,16,"GUI Creada By ElMota",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[5],255,255,0) guiSetFont(GUIEditor_Label[5],"default-bold-small") GUIEditor_Button[1] = guiCreateButton(18,148,163,27,"Obtener Posicion",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(351,148,163,27,"Obtener Posicion",false,GUIEditor_Window[1]) GUIEditor_Button[3] = guiCreateButton(17,274,163,27,"Obtener Posicion",false,GUIEditor_Window[1]) GUIEditor_Button[4] = guiCreateButton(351,274,163,27,"Obtener Posicion",false,GUIEditor_Window[1]) GUIEditor_Button[5] = guiCreateButton(207,324,110,30,"Crear Casa",false,GUIEditor_Window[1]) GUIEditor_Window[2] = guiCreateWindow(0.1523,0.245,0.2021,0.3283,"GUI Extras",true) guiWindowSetMovable(GUIEditor_Window[2],false) guiWindowSetSizable(GUIEditor_Window[2],false) GUIEditor_Label[6] = guiCreateLabel(9,41,71,20,"Dimension",false,GUIEditor_Window[2]) GUIEditor_Edit[13] = guiCreateEdit(77,38,119,25,"",false,GUIEditor_Window[2]) GUIEditor_Label[7] = guiCreateLabel(9,76,71,20,"World",false,GUIEditor_Window[2]) GUIEditor_Edit[14] = guiCreateEdit(77,73,119,25,"",false,GUIEditor_Window[2]) GUIEditor_Label[8] = guiCreateLabel(9,112,71,20,"Costo",false,GUIEditor_Window[2]) GUIEditor_Edit[15] = guiCreateEdit(77,106,119,25,"",false,GUIEditor_Window[2]) guiSetVisible(GUIEditor_Window[1], false) guiSetVisible(GUIEditor_Window[2], false) showCursor(false) function obtenerPos(localPlayer) if ( source == GUIEditor_Button[1] ) then x, y, z = getElementPosition(localPlayer) guiSetText( GUIEditor_Edit[1], x ) guiSetText( GUIEditor_Edit[2], y ) guiSetText( GUIEditor_Edit[3], z ) end end addEventHandler ( "onClientClick", getRootElement(), obtenerPos ) function ver ( ) guiSetVisible ( GUIEditor_Window[1], not guiGetVisible ( GUIEditor_Window[1] ) ) showCursor ( guiGetVisible ( GUIEditor_Window[1] ) ) guiSetVisible ( GUIEditor_Window[2], not guiGetVisible ( GUIEditor_Window[2] ) ) showCursor ( guiGetVisible ( GUIEditor_Window[2] ) ) end bindKey ( "n","down", ver )
  5. Ok man gracias , pasando a otro tema , como atriburia un texto a XML ?
  6. it is my code function VerPing() local ping = getPlayerPing(source) if (ping > 600) then outputChatbox("Cuidado Tu ping es muy alto : "..ping", Seras Kickeado ") nombre = getPlayerFromName(source) setTimer(kickear, 5000, 1) end end function kickear() if ( hasObjectPermissionTo ( sourcePlayer, "function.kickPlayer" ) ) then kickPlayer( nombre ) end end
  7. Ok man voy a los foros de ingles a ver q dicen Gracias igualmente
  8. xDD Ok pero no kickea :C
  9. mmm, Ok man y que error en el chatbox ?
  10. buee como dice el titulo no lo puedo probar ya q mi ping es poco me dirian si esta bien o esta mal function VerPing() local ping = getPlayerPing(source) if (ping > 600) then OutputChatbox("Cuidado Tu ping es muy alto : "..ping", Seras Kickeado ") nombre = getPlayerFromName(source) setTimer(kickear, 5000, 1) end end function kickear() if ( hasObjectPermissionTo ( sourcePlayer, "function.kickPlayer" ) ) then kickPlayer( nombre ) end end
  11. Si soren edikosh me explico bien eso de los argumentos usare el setElementDimension para aser guerras en mi server de zombies xDD
  12. asi seria ? function redirect( source ) redirectPlayer ( source, 186.9.200.36, 22003) end addCommandHandler("RPG", redirect)
  13. aqui ta completo GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Window[1] = guiCreateWindow(0.2324,0.3033,0.4258,0.3617,"GUI Reproductora de Musica",true) guiWindowSetMovable(GUIEditor_Window[1],false) guiWindowSetSizable(GUIEditor_Window[1],false) GUIEditor_Label[1] = guiCreateLabel(41,48,339,19,"Porfavor Pon la URL de la cancion que quieres hacer sonar",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[1],255,255,0) guiSetFont(GUIEditor_Label[1],"default-bold-small") GUIEditor_Edit[1] = guiCreateEdit(40,70,373,33,"",false,GUIEditor_Window[1]) GUIEditor_Button[1] = guiCreateButton(312,109,101,43,"Escuchar",false,GUIEditor_Window[1]) GUIEditor_Label[2] = guiCreateLabel(17,113,287,19,"Para escuchar una cancion necesitas pagar $3000",false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Label[2],"default-bold-small") GUIEditor_Label[3] = guiCreateLabel(18,155,62,15,"VOLUMEN",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(16,179,29,27,"+",false,GUIEditor_Window[1]) GUIEditor_Button[3] = guiCreateButton(47,179,29,27,"-",false,GUIEditor_Window[1]) GUIEditor_Button[4] = guiCreateButton(106,172,73,35,"Pausar",false,GUIEditor_Window[1]) GUIEditor_Button[5] = guiCreateButton(184,172,73,35,"Detener",false,GUIEditor_Window[1]) GUIEditor_Label[4] = guiCreateLabel(277,177,141,16,"GUI Creada POR ELMOTA",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[4],255,0,255) guiSetFont(GUIEditor_Label[4],"default-bold-small") --[[ local volume = true --]] local sound = true function onGuiClick (button, state, absoluteX, absoluteY) if (source == GUIEditor_Button[1]) then triggerServerEvent ( "m", getLocalPlayer() ) if sound == true then local URL = guiGetText ( GUIEditor_Edit[1] ) sp = playSound(URL) outputChatBox ( "Sonido cargandose en Unos Segundos", getLocalPlayer(), 255, 0, 0, true ) outputChatBox ( "La Musica a comenzado !", getLocalPlayer, 255, 0, 0, true ) end end addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick) function GuiClick (button, state, absoluteX, absoluteY) if (source == GUIEditor_Button[2]) then local svol = getSoundVolume(sp)+1 while not setSoundVolume ( sp, svol ) do svol = svol + 1 end elseif (source == GUIEditor_Button[3]) then local svol = getSoundVolume(sp)-1 while not setSoundVolume ( sp, svol ) do svol = svol -1 end end end addEventHandler ("onClientGUIClick", getRootElement(), GuiClick) function show() if guiGetVisible(GUIEditor_Window[1]) == true then guiSetVisible(GUIEditor_Window[1],false) showCursor(false) else guiSetVisible(GUIEditor_Window[1],true) showCursor(true) end end bindKey("i","down", show) guiSetVisible(GUIEditor_Window[1],false) showCursor(false)
  14. iFoReX

    Misiones

    con esto creo createMarker createBlip givePlayerMoney onMarkerHit Me dices si me falto alguno
  15. que esta malo ? function onGuiClick (button, state, absoluteX, absoluteY) if (source == GUIEditor_Button[1]) then triggerServerEvent ( "m", getLocalPlayer() ) if sound == true then local URL = guiGetText ( GUIEditor_Edit[1] ) sp = playSound(URL) outputChatBox ( "Sonido cargandose en Unos Segundos", getLocalPlayer(), 255, 0, 0, true ) outputChatBox ( "La Musica a comenzado !", getLocalPlayer, 255, 0, 0, true ) elseif (source == GUIEditor_Button[5]) then if isElement(sp) then destroyElement(sp) outputChatBox ( "La Musica a parado !", getLocalPlayer(), 255, 0, 0, true ) end end end me dice que tengo un eror en la linea 30 ._.
  16. Gracias solid funciona a la perfeccion EDIT: Solid pero no me funciona mi boton de detener la musica
  17. buee como dice en el titulo tengo un problema con el take player money me ayudarian ? al aprietar el boton no le quitan dinero al player cl-side GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Window[1] = guiCreateWindow(0.2324,0.3033,0.4258,0.3617,"GUI Reproductora de Musica",true) guiWindowSetMovable(GUIEditor_Window[1],false) guiWindowSetSizable(GUIEditor_Window[1],false) GUIEditor_Label[1] = guiCreateLabel(41,48,339,19,"Porfavor Pon la URL de la cancion que quieres hacer sonar",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[1],255,255,0) guiSetFont(GUIEditor_Label[1],"default-bold-small") GUIEditor_Edit[1] = guiCreateEdit(40,70,373,33,"",false,GUIEditor_Window[1]) GUIEditor_Button[1] = guiCreateButton(312,109,101,43,"Escuchar",false,GUIEditor_Window[1]) GUIEditor_Label[2] = guiCreateLabel(17,113,287,19,"Para escuchar una cancion necesitas pagar $3000",false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Label[2],"default-bold-small") GUIEditor_Label[3] = guiCreateLabel(18,155,62,15,"VOLUMEN",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(16,179,29,27,"+",false,GUIEditor_Window[1]) GUIEditor_Button[3] = guiCreateButton(47,179,29,27,"-",false,GUIEditor_Window[1]) GUIEditor_Button[4] = guiCreateButton(106,172,73,35,"Pausar",false,GUIEditor_Window[1]) GUIEditor_Button[5] = guiCreateButton(184,172,73,35,"Detener",false,GUIEditor_Window[1]) GUIEditor_Label[4] = guiCreateLabel(277,177,141,16,"GUI Creada POR ELMOTA",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[4],255,0,255) guiSetFont(GUIEditor_Label[4],"default-bold-small") --[[ local volume = true --]] local sound = true function onGuiClick (button, state, absoluteX, absoluteY) if (source == GUIEditor_Button[1]) then triggerServerEvent ( "m", getLocalPlayer() ) if sound == true then local URL = guiGetText ( GUIEditor_Edit[1] ) sp = playSound(URL) outputChatBox ( "Sonido cargandose en Unos Segundos", getLocalPlayer(), 255, 0, 0, true ) outputChatBox ( "La Musica a comenzado !", getLocalPlayer, 255, 0, 0, true ) elseif (source == GUIEditor_Button[5]) then stopSound(sp) outputChatBox ( "La Musica a parado !", getLocalPlayer(), 255, 0, 0, true ) end end end addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick) function GuiClick (button, state, absoluteX, absoluteY) if (source == GUIEditor_Button[2]) then local svol = getSoundVolume(sp)+1 while not setSoundVolume ( sp, svol ) do svol = svol + 1 end elseif (source == GUIEditor_Button[3]) then local svol = getSoundVolume(sp)-1 while not setSoundVolume ( sp, svol ) do svol = svol -1 end end end addEventHandler ("onClientGUIClick", getRootElement(), GuiClick) function show() if guiGetVisible(GUIEditor_Window[1]) == true then guiSetVisible(GUIEditor_Window[1],false) showCursor(false) else guiSetVisible(GUIEditor_Window[1],true) showCursor(true) end end bindKey("i","down", show) guiSetVisible(GUIEditor_Window[1],false) showCursor(false) sv-side function qm() local money = getPlayerMoney(thePlayer) if (money > 3000) then takePlayerMoney ( 3000) else outputChatBox ( "No Tienes Suficiente Dinero", source ) end end addEvent( "m", true ) addEventHandler( "m", getRootElement(), qm ) Gracias de antemano
  18. y como lo aria para un vehiculo en espesifico ?
  19. @tittle , quiero aser un auto que nunca estalle me ayudarian con la function
  20. creo q con esto : pero para empezar a aser scripts necesitas estudiar el LUA isObjectInACLGroup setElementHealth
  21. si vitoko los colshape y los markers tienen casi las mismas funciones
  22. Man pero funciona la musica suena lo q no funciona es el elseif osea isPedOnGround
  23. man cuando estoy en tierra no se para la cancion D: function () if isPedInVehicle then local sound = playSound("musica.mp3") elseif isPedOnGround then setSoundPaused(sound, true) end end bindKey("i","down", )
  24. si , como podria aser eso ¨?
  25. mmm man no entiendo mucho de esto pero me dirias q esta mal ?¡ -----CreadoPorElMota------- function remx() avatar = engineLoadTXD ( "bravura.txd" ) engineImportTXD ( avatar, 401 ) dff = engineLoadDFF ( "bravura.dff", 0 ) engineReplaceModel ( dff, 401 ) end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), remx) function () if "getElementsByType( "vehicle" )" then local sound = playSound("musica.mp3") end end bindKey("i","down", )
×
×
  • Create New...