Jump to content

iFoReX

Members
  • Posts

    1,708
  • Joined

  • Last visited

Everything posted by iFoReX

  1. Funciona Solid, Gracias , ahora una duda, como hago para que si el player clickea el item "carrito" , aparesca el auto ? ( lo de que aparesca el auto ya lo se hacer )
  2. addCommandHandler("autos",function(thePlayer) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then triggerClientEvent ( thePlayer, "aparecer", thePlayer ) end end ) addEvent("iniciar",true) addEventHandler("iniciar",root,function(thePlayer) for v,i in ipairs(getElementsByType"player") do local account = getPlayerAccount(i) local cuenta = getAccountName(account) if cuenta == "ElMota" then triggerClientEvent("elmota",cuenta) end end end )
  3. listo, ahora me da error y me dice : bad argument : triggerClientEvent ( expected at argument 2 ) got string 'ElMota'
  4. ahora me dice ke el evento "elmota" no esta añadido al clientside addCommandHandler("autos",function(thePlayer) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then triggerClientEvent ( thePlayer, "aparecer", thePlayer ) end end ) addEventHandler("onResourceStart",resourceRoot,function() for v,i in ipairs(getElementsByType"player") do local account = getPlayerAccount(i) local cuenta = getAccountName(account) if cuenta == "ElMota" then triggerClientEvent("elmota",cuenta) end end end ) GUIEditor = { gridlist = {}, button = {}, label = {}, window = {}, } GUIEditor.window[1] = guiCreateWindow(209, 156, 453, 239, "Panel Autos Privados", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetProperty(GUIEditor.window[1], "CaptionColour", "FF00FBFF") GUIEditor.gridlist[1] = guiCreateGridList(9, 25, 197, 205, false, GUIEditor.window[1]) col = guiGridListAddColumn(GUIEditor.gridlist[1], "Tus Autos", 0.9) GUIEditor.button[1] = guiCreateButton(211, 97, 232, 48, "spawn", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[1], "default-bold-small") guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FF00FBFF") GUIEditor.button[2] = guiCreateButton(210, 152, 233, 49, "respawn", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[2], "default-bold-small") guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FF00FBFF") GUIEditor.label[1] = guiCreateLabel(211, 24, 227, 58, "GUI Creada Por ElMota Para PGS Server", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[1], "default-bold-small") guiLabelSetColor(GUIEditor.label[1], 253, 1, 1) guiLabelSetHorizontalAlign(GUIEditor.label[1], "center", false) guiLabelSetVerticalAlign(GUIEditor.label[1], "center") guiSetVisible(GUIEditor.window[1],false) -----autos-MOTA---- mota = createVehicle(411,-685.12195, 955.14368, 12.13281) addVehicleUpgrade ( mota, 1010 ) setVehicleDamageProof ( mota, true ) setVehicleColor ( mota, 0, 0, 0, 255, 0, 102 ) setElementData(mota, "owner", "ElMota") setElementData(mota, "model", "Carrito") ------------------- function onLockedVehicleEnter ( player, seat, jacked ) if getElementData(source, "owner") and getElementData(source, "owner" ) ~= getAccountName(getPlayerAccount(player)) and ( seat == 0 ) then outputChatBox ("*** [sERVER] Carro Propiedad De "..tostring(getElementData(source, "owner" )), player, 255, 255, 0) cancelEvent() end end addEventHandler ( "onVehicleStartEnter", getRootElement(), onLockedVehicleEnter ) addEvent("aparecer",true) addEventHandler("aparecer",root,function() guiSetVisible(GUIEditor.window[1], not guiGetVisible(GUIEditor.window[1])) showCursor(guiGetVisible(GUIEditor.window[1])) end ) addEvent("elmota",true) addEventHandler("elmota",root,function() row1 = guiGridListAddRow(GUIEditor.gridlist[1]) guiGridListSetItemText(GUIEditor.gridlist[1],row1,col,getElementData(mota,"model"),false,false) end )
  5. Ahora Me Da Error En GetAccount y GetAccountName ( la verdad nose como ocupar estas 2 funciones ) addCommandHandler("autos",function(thePlayer) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then triggerClientEvent ( thePlayer, "aparecer", thePlayer ) end end ) addEventHandler("onResourceStart",resourceRoot,function() for v,i in ipairs(getElementsByType"player") do local account = getAccount(i) local cuenta = getAccountName(i) if cuenta == "ElMota" then triggerClientEvent(thePlayer,"elmotacars",thePlayer) end end end )
  6. Gracias Solid, funciona, tenia un error tambien en el guiGetVisible
  7. La GUI No Me Aparece :// client : GUIEditor = { gridlist = {}, button = {}, label = {}, window = {}, } GUIEditor.window[1] = guiCreateWindow(209, 156, 453, 239, "Panel Autos Privados", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetProperty(GUIEditor.window[1], "CaptionColour", "FF00FBFF") GUIEditor.gridlist[1] = guiCreateGridList(9, 25, 197, 205, false, GUIEditor.window[1]) guiGridListAddColumn(GUIEditor.gridlist[1], "Tus Autos", 0.9) GUIEditor.button[1] = guiCreateButton(211, 97, 232, 48, "spawn", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[1], "default-bold-small") guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FF00FBFF") GUIEditor.button[2] = guiCreateButton(210, 152, 233, 49, "respawn", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[2], "default-bold-small") guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FF00FBFF") GUIEditor.label[1] = guiCreateLabel(211, 24, 227, 58, "GUI Creada Por ElMota", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[1], "default-bold-small") guiLabelSetColor(GUIEditor.label[1], 253, 1, 1) guiLabelSetHorizontalAlign(GUIEditor.label[1], "center", false) guiLabelSetVerticalAlign(GUIEditor.label[1], "center") guiSetVisible(GUIEditor.window[1],false) addEvent("aparecer",true) addEventHandler("aparecer",root,function() guiSetVisible(GUIEditor.window[1],guiGetVisible(GUIEditor.window[1])) showCursor(guiGetVisible(GUIEditor.window[1])) end ) server : addCommandHandler("autos",function(thePlayer) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then triggerClientEvent("aparecer",thePlayer) end end )
  8. I try privatize the freeroam resource for admins, but now does not open how i can privatize it ?
  9. iFoReX

    a doubt

    doesnt work setelement dimension
  10. iFoReX

    a doubt

    how can i change the Zombie's Dimension ?
  11. iFoReX

    no funciona :/

    si suena probe con otro script que habia echo y si suena... mira en este script : --------------------- ---Script Echo por ElMota----- --------------------- addEvent("triggear",true) addEventHandler("triggear",root, function(cancion,nombre) setRadioChannel(0) stopSound(song) setTimer(function() song = playSound(cancion,true) end,2000,1) outputChatBox(" #48FF00##2E2E2EReproduciendo : #48FF00##2E2E2E"..nombre,0,0,0,true) end ) function toggleSong() if not songOff then setSoundVolume(song,0) songOff = true removeEventHandler("onClientPlayerRadioSwitch",getRootElement(),makeRadioStayOff) else setSoundVolume(song,1) songOff = false setRadioChannel(0) addEventHandler("onClientPlayerRadioSwitch",getRootElement(),makeRadioStayOff) end end addCommandHandler("music",toggleSong) addCommandHandler("play",function(playerSource,commandName,cancion,nombre) for k,v in ipairs(getElementsByType"player") do accountname = getAccountName (getPlayerAccount(v)) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Admin" ) ) then triggerClientEvent("triggear",playerSource,cancion,nombre) end end end )
  12. porque no funciona en este script pero en el otro script si funciona ... aqui el script : function startMusic() setRadioChannel(0) song = playSound("http://87.98.227.96:9992/",true) end function toggleSong() if not songOff then setSoundVolume(song,0) songOff = true removeEventHandler("onClientPlayerRadioSwitch",getRootElement(),makeRadioStayOff) else setSoundVolume(song,1) songOff = false setRadioChannel(0) addEventHandler("onClientPlayerRadioSwitch",getRootElement(),makeRadioStayOff) end end addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),startMusic) addEventHandler("onClientPlayerRadioSwitch",getRootElement(),makeRadioStayOff) addEventHandler("onClientPlayerVehicleEnter",getRootElement(),makeRadioStayOff) addCommandHandler("music",toggleSong) bindKey("m","down","music")
  13. yo queria que solo los admines pudieran ejecutar el cmd, pero que todo el srv la escuchara
  14. ahora funciona, pero solo el player que pone el cmd la escucha, y no todo el srv como queria yo.
  15. ya arregle todo ... y asi me quedo --------------------- ---Script Echo por ElMota----- --------------------- addEvent("triggear",true) addEventHandler("triggear",root, function(cancion,nombre) setRadioChannel(0) stopSound(song) setTimer(function() song = playSound(cancion,true) end,2000,1) outputChatBox(" #48FF00##2E2E2EReproduciendo : #48FF00##2E2E2E"..nombre,0,0,0,true) end ) function toggleSong() if not songOff then setSoundVolume(song,0) songOff = true removeEventHandler("onClientPlayerRadioSwitch",getRootElement(),makeRadioStayOff) else setSoundVolume(song,1) songOff = false setRadioChannel(0) addEventHandler("onClientPlayerRadioSwitch",getRootElement(),makeRadioStayOff) end end addCommandHandler("music",toggleSong) addCommandHandler("play",function(playerSource,commandName,cancion,nombre) for k,v in ipairs(getElementsByType"player") do accountname = getAccountName (getPlayerAccount(v)) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Admin" ) ) then triggerClientEvent("triggear",playerSource,cancion,nombre) end end end ) tengo 1 problema, en mi server local funciona a la perfeccion, pero en el server hosteado se reproduce 2 veces a la vez la misma cancion :C
  16. ahora me da este error : SONG_X\musica_s.lua:2: bad argument #1 to 'ipairs' (table expected, got nil)
  17. no da ni problema ni nada. lo Que queria que pasara era que al poner el cmd /play LINK nombre , era que se reproduciera el LINK, y en el outputchatbox apareciiera Reproduciendo : nombre :3 nose si me entienden aqui el script : cl-side addEvent("triggear",true) addEventHandler("triggear",root, function(cancion,nombre) setRadioChannel(0) song = playSound(cancion,true) outputChatBox("#48FF00##2E2E2EReproduciendo : #48FF00##2E2E2"..nombre,root,0,0,0,true) end ) function toggleSong() if not songOff then setSoundVolume(song,0) songOff = true removeEventHandler("onClientPlayerRadioSwitch",getRootElement(),makeRadioStayOff) else setSoundVolume(song,1) songOff = false setRadioChannel(0) addEventHandler("onClientPlayerRadioSwitch",getRootElement(),makeRadioStayOff) end end addCommandHandler("music",toggleSong) sv-side addCommandHandler("play",function(playerSource,commandName,cancion,nombre) for k,v in ipairs(players) do accountname = getAccountName (getPlayerAccount(v)) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "admin" ) ) then triggerClientEvent("triggear",playerSource,cancion,nombre) end end end )
  18. im using windows 7 ultimate x64
  19. yeh I used this font for a GUI And work 100% EDIT : In the Zombie Kills And in the Rank fields, Appear the Zombie Kills And The rank of other Player D:
  20. Doesnt appear the font *
  21. why Dx Font Doesnt work ?, appear default font D: zKills = "-" Rank = "-" function hideIt(Kills,Ranks) zKills = Kills Rank = Ranks end addEvent("lolEvent",true) addEventHandler("lolEvent",root,hideIt) addEventHandler("onClientRender", root, function() local font_0 = dxCreateFont( ":guieditor/fonts/PetitFormalScript.ttf", 10 ) dxDrawText("#48FF00##2E2E2EZombie Kills : #48FF00#"..tostring(zKills).." \n#48FF00##2E2E2ERango : #48FF00#"..tostring(Rank), 437, 403, 547, 442, tocolor(0, 255, 251, 255), 1, font_0, "left", "center", false, false, true, true, false) end ) function onZombieWasted(_,killer) if (killer) then if (getElementType(killer) == "player") and (getElementType(source) == "ped") then if (getElementData(source, "zombie") == true) then local account = getPlayerAccount(killer) if account and not isGuestAccount(account) then local Kills = getAccountData(account,"Zombie kills") local Ranks = getAccountData(account,"Rango") triggerClientEvent("lolEvent",killer,Kills,Ranks) end end end end end addEventHandler("onPedWasted", root, onZombieWasted)
  22. aparece pero se queda en la primera imagen D:
  23. intente hacer el mio, tome posiciones de una imagen de test, pero no aparece el gif D: function dxDrawGifImage ( x, y, w, h, path, iEnd, effectSpeed ) local gifElement = createElement ( "dx-gif" ) if ( gifElement ) then setElementData ( gifElement, "gifData", { x = x, y = y, w = w, h = h, imgPath = path, endID = iEnd, imgID = 1, speed = effectSpeed, tick = getTickCount ( ) } ) return gifElement else return false end end addEventHandler ( "onClientRender", root, function ( ) local currentTick = getTickCount ( ) for _, gif in ipairs ( getElementsByType ( "dx-gif" ) ) do local gifData = getElementData ( gif, "gifData" ) if ( gifData ) then if ( currentTick - gifData.tick >= gifData.speed ) then gifData.tick = currentTick gifData.imgID = ( gifData.imgID + 1 ) if gifData.imgID > gifData.endID then gifData.imgID = 1 end setElementData ( gif, "gifData", gifData ) end dxDrawImage ( gifData.x, gifData.y, gifData.w, gifData.h, string.format(gifData.imgPath,gifData.imgID) ) end end end ) gif = dxDrawGifImage ( 504, 29, 105, 75, "img/logo", 33, "png", 60 )
×
×
  • Create New...