Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. addEventHandler ( "onClientRender", gRoot, function ( ) if isElement ( sound1 ) then dxDrawText("Song: ".. tostring ( meta1.artist ) .." - ".. tostring ( meta1.title ),X,Y+600, Width, Height, tocolor(255,255,0), 1, "default-bold","left", "top",false, false,true,true) elseif isElement ( sound2 ) then dxDrawText("Song: ".. tostring ( meta2.artist ) .." - ".. tostring ( meta2.title ),X,Y+600, Width, Height, tocolor(255,255,0), 1, "default-bold","left", "top",false, false,true,true) elseif isElement ( sound3 ) then dxDrawText("Song: ".. tostring ( meta3.artist ) .." - ".. tostring ( meta3.title ),X,Y+600, Width, Height, tocolor(255,255,0), 1, "default-bold","left", "top",false, false,true,true) elseif isElement ( sound4 ) then dxDrawText("Song: ".. tostring ( meta4.artist ) .." - ".. tostring ( meta4.title ),X,Y+600, Width, Height, tocolor(255,255,0), 1, "default-bold","left", "top",false, false,true,true) end end )
  2. Why it doesn't work? what does it show?
  3. We don't give support with leaked scripts. Topic locked.
  4. --[[ Author : Moeez Description : Information Panel For Servers ----- Information Panel ----- ]]--- helpwindow = guiCreateWindow(141, 81, 535, 503, "SAM:RPG Information Panel", false) guiWindowSetSizable(helpwindow, false) helpmemo = guiCreateMemo(9, 17, 516, 302, "write some text here", false, GUIEditor.window[1]) guiMemoSetReadOnly(helpmemo, true) commandbtn = guiCreateButton(9, 319, 105, 53, "Command", false, helpwindow) guiSetProperty(commandbtn, "NormalTextColour", "FFAAAAAA") GUIEditor.memo[2] = guiCreateMemo(-98, -338, 340, 20, "", false, GUIEditor.button[1]) GUIEditor.button[2] = guiCreateButton(228, -273, 15, 15, "", false, GUIEditor.button[1]) GUIEditor.memo[3] = guiCreateMemo(513, 166, 20, 20, "", false, GUIEditor.button[1]) staffbtn = guiCreateButton(9, 371, 105, 57, "Staff", false, helpwindow) guiSetProperty(staffbtnsbtn, "NormalTextColour", "FFAAAAAA") eventbtn = guiCreateButton(10, 429, 104, 55, "Event", false, helpwindow) guiSetProperty(eventbtn, "NormalTextColour", "FFAAAAAA") infbtn = guiCreateButton(114, 318, 130, 54, "Information", false, helpwindow) guiSetProperty(infbtn, "NormalTextColour", "FFAAAAAA") rulesbtn = guiCreateButton(244, 319, 125, 53, "Rules", false, helpwindow) guiSetProperty(rulesbtn, "NormalTextColour", "FFAAAAAA") upgradebtn = guiCreateButton(369, 320, 151, 52, "Upgrade", false, helpwindow) guiSetProperty(upgradebtn, "NormalTextColour", "FFAAAAAA") samrpgbtn = guiCreateButton(115, 371, 410, 116, "SAM:RPG", false, helpwindow) guiSetProperty(commandsbtn, "NormalTextColour", "FFAAAAAA") addEventHandler("onClientRender", root, function() dxDrawText("San Andreas Magical: RPG", 144, 36, 672, 81, tocolor(255, 255, 255, 255), 2.00, "pricedown", "left", "top", false, false, true, false, false) end ) function open() if (guiGetVisible (helpwindow) == false) then guiSetVisible(helpwindow, true) showCursor(true) local screenW,screenH=guiGetScreenSize() local windowW,windowH=guiGetSize(helpwindow,false) local x,y = (screenW-windowW)/2,(screenH-windowH)/2 guiSetPosition(helpwindow,x,y,false) centerWindow(helpwindow) elseif (guiGetVisible (helpwindow) == true) then guiSetVisible(helpwindow, false) showCursor(false) end end bindKey ("F1", "down", open) function Command () rulestxt = fileOpen("Command.txt", true) rulestxt1 = fileRead(rulestxt, 50000) guiSetText(helpmemo, rulestxt1) end addEventHandler("onClientGUIClick", commandbtn, command) function staff () rulestxt = fileOpen("Staff.txt", true) rulestxt1 = fileRead(rulestxt, 50000) guiSetText(helpmemo, rulestxt1) end addEventHandler("onClientGUIClick", staffbtn, staff) function Event () rulestxt = fileOpen("Event.txt", true) rulestxt1 = fileRead(rulestxt, 50000) guiSetText(helpmemo, rulestxt1) end addEventHandler("onClientGUIClick", eventbtn, Event) function Information () rulestxt = fileOpen("Information.txt", true) rulestxt1 = fileRead(rulestxt, 50000) guiSetText(helpmemo, rulestxt1) end addEventHandler("onClientGUIClick", infbtn, Information) function Rules () rulestxt = fileOpen("Rules.txt", true) rulestxt1 = fileRead(rulestxt, 50000) guiSetText(helpmemo, rulestxt1) end addEventHandler("onClientGUIClick", rulesbtn, Rules) function Upgrade () rulestxt = fileOpen("Upgrade.txt", true) rulestxt1 = fileRead(rulestxt, 50000) guiSetText(helpmemo, rulestxt1) end addEventHandler("onClientGUIClick", upgradebtn, Upgrade) function SAM_RPG () rulestxt = fileOpen("SAMRPG.txt", true) rulestxt1 = fileRead(rulestxt, 50000) guiSetText(helpmemo, rulestxt1) end addEventHandler("onClientGUIClick", samrpgbtn, SAM_RPG)
  5. getElementSyncer es una funcion server side, y tu script es client side.
  6. Te referis a crear mapas o a cambiar objetos? Si hablas de crear mapas podes usar el Map Editor.
  7. Castillo

    Help

    Use: math.random
  8. addEventHandler ( "onClientPlayerDamage", root, function ( attacker, weapon, bodypart, loss ) if ( attacker and getElementType ( attacker ) == "player" and weapon == 14 and team ) then local team = getPlayerTeam ( attacker ) if ( team and getTeamName ( team ) == "Paramedicos" ) then cancelEvent ( ) if ( not isTimer ( pause ) ) then local health = getElementHealth ( localPlayer ) if ( health < 99 ) then triggerServerEvent ( "medic:healing", localPlayer, attacker ) -- Calls the Server Event pause = setTimer ( function ( ) end, 1000, 1 ) end end end end end )
  9. https://wiki.multitheftauto.com/wiki/DxDrawCircle That's for 2D circles, but you can modify it to work in 3D.
  10. You want to display fake players in the scoreboard?
  11. 'source' is not defined anywhere. You may want to use: getPedOccupiedVehicle
  12. No veo en ninguna parte la ejecucion del evento: "medic:healing".
  13. What's wrong with it?
  14. Castillo

    is this nice?

    This topic is obviously going no where, if you are making a resource and want to share it, post it on the resources section. Topic locked.
  15. Yes, it is. getPlayerAccount getAccountName setPlayerName To stop the player from changing his name use: cancelEvent with the event onPlayerChangeNick.
  16. addEventHandler("onClientMouseEnter",Loginbtn,LoginH) Put it like this: addEventHandler ( "onClientMouseEnter", Loginbtn, LoginH, false ) that "false" at the end is the "getPropagated" argument, if you don't put it as false, it'll execute the function once you move the cursor over any GUI element.
  17. You can compare the cursor position to the image position, there are no events for DX.
  18. There are two events for when the cursor enters/leaves a GUI element. onClientMouseEnter onClientMouseLeave
  19. Link is wrong. Why don't you upload it to the community?
×
×
  • Create New...