Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. There was such resource in the community center if i remember well, but it was buggy, maybe yours is better. Good luck.
  2. If i'm right this resource is stolen: https://community.multitheftauto.com/index.php?p= ... ls&id=2031 I've seen this before, somewhere. Edit: This guy uploaded also another people(including one of myself) resources. https://community.multitheftauto.com/ind ... ls&id=2029 -- DX drawing information (by myself) https://community.multitheftauto.com/ind ... ls&id=2028
  3. Use english only on this forum!
  4. Pues, si tienes todo en ZIP es lo mismo que lo tengas en Carpeta, pero solo usa 1 a la vez, creo que puede armar lio.
  5. enabled = true GUIEditor_Window = {} GUIEditor_TabPanel = {} GUIEditor_Tab = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Image = {} GUIEditor_Window[1] = guiCreateWindow(150,185,457,363,"Gui De Sonidos",false) guiSetVisible(GUIEditor_Window[1],false) GUIEditor_Button[1] = guiCreateButton(21,32,99,35,"Ayuwoky",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(19,79,102,34,"Fail",false,GUIEditor_Window[1]) GUIEditor_Button[3] = guiCreateButton(20,130,100,33,"Hola",false,GUIEditor_Window[1]) GUIEditor_Button[4] = guiCreateButton(18,177,100,34,"Boton1",false,GUIEditor_Window[1]) GUIEditor_Button[5] = guiCreateButton(19,219,100,34,"Boton2",false,GUIEditor_Window[1]) GUIEditor_Button[6] = guiCreateButton(21,261,100,34,"Boton3",false,GUIEditor_Window[1]) GUIEditor_Button[7] = guiCreateButton(133,32,100,34,"Boton4",false,GUIEditor_Window[1]) GUIEditor_Button[8] = guiCreateButton(134,79,100,34,"Boton5",false,GUIEditor_Window[1]) GUIEditor_Button[9] = guiCreateButton(133,128,100,34,"Boton6",false,GUIEditor_Window[1]) GUIEditor_Button[10] = guiCreateButton(133,178,100,34,"Boton7",false,GUIEditor_Window[1]) GUIEditor_Button[11] = guiCreateButton(131,226,100,34,"Boton8",false,GUIEditor_Window[1]) GUIEditor_Button[12] = guiCreateButton(131,270,100,34,"Boton9",false,GUIEditor_Window[1]) GUIEditor_Button[13] = guiCreateButton(9,309,435,45,"CERRAR",false,GUIEditor_Window[1]) GUIEditor_TabPanel[1] = guiCreateTabPanel(35,-668,5,600,false,GUIEditor_Window[1]) GUIEditor_Tab[1] = guiCreateTab("Tab",GUIEditor_TabPanel[1]) GUIEditor_Label[1] = guiCreateLabel(271,37,165,257,"No agas Spam ",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[1],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[1],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[1],"left",false) guiSetFont(GUIEditor_Label[1],"sa-header") GUIEditor_Image[1] = guiCreateStaticImage(243,134,204,120,"images/mtalogo.png",false,GUIEditor_Window[1]) addEventHandler("onClientGUIClick",getRootElement(), function () if (source == GUIEditor_Button[13]) then guiSetVisible(GUIEditor_Window[1],false) showCursor(false) elseif (source == GUIEditor_Button[2]) then if enabled then triggerServerEvent("sendSound",getLocalPlayer(),"fail.mp3") enabled = false setTimer(setState,60000,1) else outputChatBox("You can use this once 1 minute.",255,0,0) end end end) function setState() enabled = true end addEvent("returnSound",true) addEventHandler("returnSound",getRootElement(), function (sound) playSound(tostring(sound),false) end) bindKey("F5","down",function () showCursor(not isCursorShowing()) guiSetVisible(GUIEditor_Window[1], not guiGetVisible(GUIEditor_Window[1])) end)
  6. Pues, un poquito mas dificil que eso, como viste te deje un ejemplo para agregar una segunda puerta. elseif source == cols[2] then eso es cuando tenes otro colshape indexeado 2, despues de eso le pones el moveObject y todo eso
  7. I didn't said i know where to get them, i said i know there are resource(s) like that somewhere.
  8. Ok, i suposed it wasn't going to work that way, now, you will need to create a server-side script too. --server side addEvent("sendSound",true) addEventHandler("sendSound",getRootElement(), function (sound) triggerClientEvent("returnSound",getRootElement(),sound) outputChatBox("#FF0000".. getPlayerName(source) .."#FFFF00 has played a sound!",getRootElement(),255,255,0,true) end) --client side GUIEditor_Window = {} GUIEditor_TabPanel = {} GUIEditor_Tab = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Image = {} GUIEditor_Window[1] = guiCreateWindow(150,185,457,363,"Gui De Sonidos",false) guiSetVisible(GUIEditor_Window[1],false) GUIEditor_Button[1] = guiCreateButton(21,32,99,35,"Ayuwoky",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(19,79,102,34,"Fail",false,GUIEditor_Window[1]) GUIEditor_Button[3] = guiCreateButton(20,130,100,33,"Hola",false,GUIEditor_Window[1]) GUIEditor_Button[4] = guiCreateButton(18,177,100,34,"Boton1",false,GUIEditor_Window[1]) GUIEditor_Button[5] = guiCreateButton(19,219,100,34,"Boton2",false,GUIEditor_Window[1]) GUIEditor_Button[6] = guiCreateButton(21,261,100,34,"Boton3",false,GUIEditor_Window[1]) GUIEditor_Button[7] = guiCreateButton(133,32,100,34,"Boton4",false,GUIEditor_Window[1]) GUIEditor_Button[8] = guiCreateButton(134,79,100,34,"Boton5",false,GUIEditor_Window[1]) GUIEditor_Button[9] = guiCreateButton(133,128,100,34,"Boton6",false,GUIEditor_Window[1]) GUIEditor_Button[10] = guiCreateButton(133,178,100,34,"Boton7",false,GUIEditor_Window[1]) GUIEditor_Button[11] = guiCreateButton(131,226,100,34,"Boton8",false,GUIEditor_Window[1]) GUIEditor_Button[12] = guiCreateButton(131,270,100,34,"Boton9",false,GUIEditor_Window[1]) GUIEditor_Button[13] = guiCreateButton(9,309,435,45,"CERRAR",false,GUIEditor_Window[1]) GUIEditor_TabPanel[1] = guiCreateTabPanel(35,-668,5,600,false,GUIEditor_Window[1]) GUIEditor_Tab[1] = guiCreateTab("Tab",GUIEditor_TabPanel[1]) GUIEditor_Label[1] = guiCreateLabel(271,37,165,257,"No agas Spam ",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[1],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[1],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[1],"left",false) guiSetFont(GUIEditor_Label[1],"sa-header") GUIEditor_Image[1] = guiCreateStaticImage(243,134,204,120,"images/mtalogo.png",false,GUIEditor_Window[1]) addEventHandler("onClientGUIClick",getRootElement(), function () if (source == GUIEditor_Button[13]) then guiSetVisible(GUIEditor_Window[1],false) showCursor(false) elseif (source == GUIEditor_Button[2]) then triggerServerEvent("sendSound",getLocalPlayer(),"fail.mp3") end end) addEvent("returnSound",true) addEventHandler("returnSound",getRootElement(), function (sound) playSound(tostring(sound),false) end) bindKey("F5","down",function () showCursor(not isCursorShowing()) guiSetVisible(GUIEditor_Window[1], not guiGetVisible(GUIEditor_Window[1])) end) It should work fine (not tested).
  9. Why don't you execute it using the event: onPlayerJoin?
  10. John_Michael, please read the post(s) again, the show/hide function is done to don't have to re-make the GUI, since he will lose any changes done to the grid-list.
  11. I do know there are some resources of traffic, but they aren't released on the community center.
  12. Seriously, if you want to get a FREE server you will need to be a little more expecified, like, showing proof of your scripting skills and so on, like a game mode, something cool.
  13. gates = {} cols = {} gates[1] = createObject ( 2929, 215.99548339844, 1875.40234375, 13.938992500305, 0, 0, 0 ) gates[2] = createObject ( 2929, 211.94564819336, 1875.40234375, 13.938992500305, 0, 0, 0 ) cols[1] = createColCircle ( 213.94564819336, 1875.40234375, 13.938992500305, 7 ) function openGates(thePlayer) if source == cols[1] then if isObjectInACLGroup( 'user.'..getAccountName( getPlayerAccount( thePlayer ) ), aclGetGroup( 'Admin' ) ) and hasObjectPermissionTo( thePlayer, 'function.door', true ) then moveObject (gates[1], 5000, 218.99548339844, 1875.40234375, 13.938992500305 ) moveObject (gates[2], 5000, 208.94564819336, 1875.40234375, 13.938992500305 ) elseif source == cols[2] then end end end addEventHandler( "onColShapeHit", getRootElement(), openGates ) function closeGates(thePlayer) if source == cols[1] then if isObjectInACLGroup( 'user.'..getAccountName( getPlayerAccount( thePlayer ) ), aclGetGroup( 'Admin' ) ) and hasObjectPermissionTo( thePlayer, 'function.door', true ) then moveObject (gates[1], 5000, 215.99548339844, 1875.40234375, 13.938992500305 ) moveObject (gates[2], 5000, 211.94564819336, 1875.40234375, 13.938992500305 ) elseif source == cols[2] then end end end addEventHandler( "onColShapeLeave", getRootElement(), closeGates ) De esta manera puedes crear mas puertas sin hacer mucho lio.
  14. Castillo

    .

    You should have told that at the start. GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_TabPanel = {} GUIEditor_Tab = {} function createthegui() showCursor(true,true) GUIEditor_Window[1] = guiCreateWindow(6,0,297,596,"Spawn menu",false) GUIEditor_Button[1] = guiCreateButton(12,24,98,43,"Adminspawn",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(176,38,88,33,"Pilot",false,GUIEditor_Window[1]) GUIEditor_Button[3] = guiCreateButton(16,87,89,41,"Robber",false,GUIEditor_Window[1]) GUIEditor_Button[4] = guiCreateButton(16,149,88,40,"Hobo",false,GUIEditor_Window[1]) GUIEditor_Button[5] = guiCreateButton(15,200,92,35,"Carjacker",false,GUIEditor_Window[1]) GUIEditor_Button[6] = guiCreateButton(17,245,88,38,"Army Rangers",false,GUIEditor_Window[1]) GUIEditor_Button[7] = guiCreateButton(12,288,92,40,"Arms Dealer",false,GUIEditor_Window[1]) GUIEditor_Button[8] = guiCreateButton(14,335,87,37,"Drug Dealer",false,GUIEditor_Window[1]) GUIEditor_Button[9] = guiCreateButton(13,377,88,36,"The Organisation",false,GUIEditor_Window[1]) GUIEditor_TabPanel[1] = guiCreateTabPanel(288,123,0,5,false,GUIEditor_Window[1]) GUIEditor_Tab[1] = guiCreateTab("Tab",GUIEditor_TabPanel[1]) addEventHandler("onClientGUIClick", GUIEditor_Button[1], teleportPlayer, false) end function openTeleportWindow() createthegui() end addCommandHandler("teleportme",openTeleportWindow) function teleportPlayer(button,state) if button == "left" and state == "up" then triggerServerEvent("movePlayerToPosition",getLocalPlayer(),1479.6,-1612.8,14.0,0) closeWindow() end end function closeWindow() destroyElement(GUIEditor_Window[1]) end
  15. Castillo

    .

    Is this a joke? where's your "close" button? you didn't changed my code.
  16. Castillo

    .

    Post your code.
  17. There isn't any public resource to do this.
  18. Castillo

    .

    GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_TabPanel = {} GUIEditor_Tab = {} function createthegui() showCursor(true,true) GUIEditor_Window[1] = guiCreateWindow(6,0,297,596,"Spawn menu",false) GUIEditor_Button[1] = guiCreateButton(12,24,98,43,"Adminspawn",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(176,38,88,33,"Pilot",false,GUIEditor_Window[1]) GUIEditor_Button[3] = guiCreateButton(16,87,89,41,"Robber",false,GUIEditor_Window[1]) GUIEditor_Button[4] = guiCreateButton(16,149,88,40,"Hobo",false,GUIEditor_Window[1]) GUIEditor_Button[5] = guiCreateButton(15,200,92,35,"Carjacker",false,GUIEditor_Window[1]) GUIEditor_Button[6] = guiCreateButton(17,245,88,38,"Army Rangers",false,GUIEditor_Window[1]) GUIEditor_Button[7] = guiCreateButton(12,288,92,40,"Arms Dealer",false,GUIEditor_Window[1]) GUIEditor_Button[8] = guiCreateButton(14,335,87,37,"Drug Dealer",false,GUIEditor_Window[1]) GUIEditor_Button[9] = guiCreateButton(13,377,88,36,"The Organisation",false,GUIEditor_Window[1]) GUIEditor_TabPanel[1] = guiCreateTabPanel(288,123,0,5,false,GUIEditor_Window[1]) GUIEditor_Tab[1] = guiCreateTab("Tab",GUIEditor_TabPanel[1]) addEventHandler("onClientGUIClick", GUIEditor_Button[1], teleportPlayer, false) addEventHandler("onClientGUIClick", myCloseButton, closeWindow, false) -- change myCloseButton to your close button element. end function openTeleportWindow() createthegui() end addCommandHandler("teleportme",openTeleportWindow) function teleportPlayer(button,state) if button == "left" and state == "up" then triggerServerEvent("movePlayerToPosition",getLocalPlayer(),1479.6,-1612.8,14.0,0) end end function closeWindow() if button == "left" and state == "up" then destroyElement(GUIEditor_Window[1]) end end
  19. Castillo

    .

    What..? when press a button do what?
  20. Castillo

    .

    Because the server side part is also wrong. function moveThePlayer(x,y,z,rotation) if x and y and z and rotation then local skin = getElementModel(source) spawnPlayer(source,x,y,z,rotation,skin) setCameraTarget(source,source) end end addEvent("movePlayerToPosition",true) addEventHandler("movePlayerToPosition",root,moveThePlayer) Try that.
  21. Firstly, don't double-post. Now, what doesn't work? you can't upload the mod to that website and generate the code?
  22. Volk-rus, what is this? why you did write this if it was already fixed? my code was even simplier/less code, i won't offend you but, he should use my code instead.
  23. Cadu12, do you mean, AcitanoX stole resources from your server?
  24. Castillo

    .

    GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_TabPanel = {} GUIEditor_Tab = {} function createthegui() showCursor(true,true) GUIEditor_Window[1] = guiCreateWindow(6,0,297,596,"Spawn menu",false) GUIEditor_Button[1] = guiCreateButton(12,24,98,43,"Adminspawn",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(176,38,88,33,"Pilot",false,GUIEditor_Window[1]) GUIEditor_Button[3] = guiCreateButton(16,87,89,41,"Robber",false,GUIEditor_Window[1]) GUIEditor_Button[4] = guiCreateButton(16,149,88,40,"Hobo",false,GUIEditor_Window[1]) GUIEditor_Button[5] = guiCreateButton(15,200,92,35,"Carjacker",false,GUIEditor_Window[1]) GUIEditor_Button[6] = guiCreateButton(17,245,88,38,"Army Rangers",false,GUIEditor_Window[1]) GUIEditor_Button[7] = guiCreateButton(12,288,92,40,"Arms Dealer",false,GUIEditor_Window[1]) GUIEditor_Button[8] = guiCreateButton(14,335,87,37,"Drug Dealer",false,GUIEditor_Window[1]) GUIEditor_Button[9] = guiCreateButton(13,377,88,36,"The Organisation",false,GUIEditor_Window[1]) GUIEditor_TabPanel[1] = guiCreateTabPanel(288,123,0,5,false,GUIEditor_Window[1]) GUIEditor_Tab[1] = guiCreateTab("Tab",GUIEditor_TabPanel[1]) addEventHandler("onClientGUIClick", GUIEditor_Button[1], teleportPlayer, false) end function openTeleportWindow() createthegui() end addCommandHandler("teleportme",openTeleportWindow) function teleportPlayer(button,state) if button == "left" and state == "up" then triggerServerEvent("movePlayerToPosition",getLocalPlayer(),1479.6,-1612.8,14.0,0) end end It should work. P.S: Proracer, this code had many other errors, you should have mentioned too.
×
×
  • Create New...