Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. function hoodOpen( thePlayer ) local vehicle = getPedOccupiedVehicle( thePlayer ) if not vehicle then return end if getVehicleDoorOpenRatio ( vehicle, 0 ) == 0 then setVehicleDoorOpenRatio(vehicle, 0, 1, 3000) else setVehicleDoorOpenRatio(vehicle, 0, 0, 300) end end addCommandHandler("hood", hoodOpen) function trunkOpen( thePlayer ) local vehicle = getPedOccupiedVehicle( thePlayer ) if not vehicle then return end if getVehicleDoorOpenRatio ( vehicle, 1 ) == 0 then setVehicleDoorOpenRatio(vehicle, 1, 1, 3000) else setVehicleDoorOpenRatio(vehicle, 1, 0, 300) end end addCommandHandler("trunk", trunkOpen) function fLeftOpen( thePlayer ) local vehicle = getPedOccupiedVehicle( thePlayer ) if not vehicle then return end if getVehicleDoorOpenRatio ( vehicle, 2 ) == 0 then setVehicleDoorOpenRatio(vehicle, 2, 1, 3000) else setVehicleDoorOpenRatio(vehicle, 2, 0, 300) end end addCommandHandler("fleft", fLeftOpen) function fRightOpen( thePlayer ) local vehicle = getPedOccupiedVehicle( thePlayer ) if not vehicle then return end if getVehicleDoorOpenRatio ( vehicle, 3 ) == 0 then setVehicleDoorOpenRatio(vehicle, 3, 1, 3000) else setVehicleDoorOpenRatio(vehicle, 3, 0, 300) end end addCommandHandler("fright", fRightOpen) function rLeftOpen( thePlayer ) local vehicle = getPedOccupiedVehicle( thePlayer ) if not vehicle then return end if getVehicleDoorOpenRatio ( vehicle, 4 ) == 0 then setVehicleDoorOpenRatio(vehicle, 4, 1, 3000) else setVehicleDoorOpenRatio(vehicle, 4, 0, 300) end end addCommandHandler("rleft", rLeftOpen) function rRightOpen( thePlayer ) local vehicle = getPedOccupiedVehicle( thePlayer ) if not vehicle then return end if getVehicleDoorOpenRatio ( vehicle, 5 ) == 0 then setVehicleDoorOpenRatio(vehicle, 5, 1, 3000) else setVehicleDoorOpenRatio(vehicle, 5, 0, 300) end end addCommandHandler("rright", rRightOpen) "Charlie" type="script" description="Car Parts Movement"/>
  2. Do you mean MTA account system? if so, internal.db.
  3. Castillo

    Role-Playing Servers

    Maybe they have less players than SA-MP, but MTA has more features, stable. P.S: Doesn't SA-MP has fake "players" in the server? I heard that.
  4. function fanFunction() for index, player in pairs(getElementsByType("player")) do bindKey (player,"-","down", function(player) outputChatBox (getPlayerName (player) .. "#FFFF00Need Help Please!",getRootElement(),255,255,0,true) end ) end end addEventHandler ( "onResourceStart", getRootElement(), fanFunction )
  5. Omg, you're annoying, first, don't double post, second debugscript has 4 levels, from 0 to 3.
  6. You can't get the server IP by a MTA function.
  7. And... do these 'arenas' exists?
  8. Castillo

    help

    "Bostjan96" version="1.0.0" description="Wellcome" /> You had the script as server side.
  9. Is this resource in acl.xml group admin? executeCommandHandler requires it.
  10. addEventHandler("onClientGUIClick",root, function () if (source == GUIEditor_Button[1]) then triggerServerEvent("executeACommand",localPlayer,localPlayer,"1") elseif (source == GUIEditor_Button[2]) then triggerServerEvent("executeACommand",localPlayer,localPlayer,"2") elseif (source == GUIEditor_Button[3]) then triggerServerEvent("executeACommand",localPlayer,localPlayer,"3") elseif (source == GUIEditor_Button[4) then triggerServerEvent("executeACommand",localPlayer,localPlayer,"4") elseif (source == GUIEditor_Button[5]) then triggerServerEvent("executeACommand",localPlayer,localPlayer,"5") elseif (source == GUIEditor_Button[6) then triggerServerEvent("executeACommand",localPlayer,localPlayer,"6") elseif (source == GUIEditor_Button[7]) then triggerServerEvent("executeACommand",localPlayer,localPlayer,"7") elseif (source == GUIEditor_Button[8]) then triggerServerEvent("executeACommand",localPlayer,localPlayer,"8") -- You had a missing " and a missing ). end end)
  11. Castillo

    Requst Help

    ----------------- --The Windows ------------------ GUIEditor_Window = {} GUIEditor_Button = {} Shop_Window = guiCreateWindow(135,67,532,481,"Weapon Shop",false) guiSetAlpha(Shop_Window,0.69999998807907) guiWindowSetMovable(Shop_Window,true) guiWindowSetSizable(Shop_Window,false) guiSetVisible (Shop_Window, false) Pistol_popup = guiCreateButton(13,40,199,42,"Handguns",false,Shop_Window) guiSetFont(Pistol_popup,"sa-header") Weapon_popup = guiCreateButton(12,93,204,41,"Assault Rifles",false,Shop_Window) guiSetFont(Weapon_popup,"sa-header") Speical_popup = guiCreateButton(12,143,206,40,"Speical",false,Shop_Window) guiSetFont(Speical_popup,"sa-header") close = guiCreateButton(483,32,22,17,"X",false,Shop_Window) guiSetFont(close,"clear-normal") Pistol_Window = guiCreateWindow(135,67,532,481,"Handguns",false) guiSetAlpha(Pistol_Window,0.69999998807907) guiWindowSetMovable(Pistol_Window,true) guiWindowSetSizable(Pistol_Window,false) --this Buttons to give weapon give_Pistol = guiCreateButton(9,39,204,42,"Pistol",false,Pistol_Window) give_SPistol = guiCreateButton(9,93,204,40,"Silenced Pistol",false,Pistol_Window) give_DEagle = guiCreateButton(9,144,207,41,"Desert Eagle",false,Pistol_Window) Hidep = guiCreateButton(401,442,121,30,"<| Back",false,Pistol_Window) Weapon_Window = guiCreateWindow(135,67,532,481,"Assault Rifles",false) guiWindowSetMovable(Weapon_Window,true) guiWindowSetSizable(Weapon_Window,false) GUIEditor_Button[11] = guiCreateButton(12,43,194,39,"AK-47",false,Weapon_Window) GUIEditor_Button[12] = guiCreateButton(10,92,198,39,"M4",false,Weapon_Window) GUIEditor_Button[13] = guiCreateButton(11,145,198,40,"Weapon 3",false,Weapon_Window) GUIEditor_Button[14] = guiCreateButton(401,442,121,30,"<| Back",false,Weapon_Window) Spiciacl_Window = guiCreateWindow(135,67,532,481,"Spiciacl",false) guiWindowSetMovable(Spiciacl_Window,true) guiWindowSetSizable(Spiciacl_Window,false) GUIEditor_Button[16] = guiCreateButton(290,13,5,5,"",false,Spiciacl_Window) GUIEditor_Button[17] = guiCreateButton(43,44,171,39,"spe 1",false,Spiciacl_Window) GUIEditor_Button[18] = guiCreateButton(44,96,171,39,"spe 2",false,Spiciacl_Window) GUIEditor_Button[19] = guiCreateButton(46,146,170,38,"spe 3",false,Spiciacl_Window) GUIEditor_Button[20] = guiCreateButton(401,442,121,30,"<| Back",false,Spiciacl_Window) bindKey ( "F2" , "down" , function() if ( guiGetVisible ( Shop_Window ) == true ) then guiSetVisible ( Shop_Window ,false ) showCursor (false ) guiSetInputEnabled(false) elseif ( guiGetVisible ( Shop_Window ) == false ) then guiSetVisible ( Shop_Window ,true ) showCursor (false ) guiSetInputEnabled(true) end end ) addEventHandler("onClientGUIClick",root, function () if (source == Pistol_popup) then guiSetVisible(Pistol_Window, not guiGetVisible(Pistol_Window)) elseif (source == Weapon_popup) then guiSetVisible(Weapon_Window, not guiGetVisible(Weapon_Window)) elseif (source == Speical_popup) then guiSetVisible(Spiciacl_Window, not guiGetVisible(Spiciacl_Window)) elseif (source == Hidep) then guiSetVisible(Pistol_Window, false) end end)
  12. What exactly doesn't work? you'll never get it fixed if you don't give more details. @karlis: Wouldn't be the same?
  13. The script works perfectly. Remember that this script binds the key AFTER the player logs in.
  14. Castillo

    Requst Help

    ----------------- --The Windows ------------------ GUIEditor_Window = {} GUIEditor_Button = {} Shop_Window = guiCreateWindow(135,67,532,481,"Weapon Shop",false) guiSetAlpha(Shop_Window,0.69999998807907) guiWindowSetMovable(Shop_Window,true) guiWindowSetSizable(Shop_Window,false) guiSetVisible (Shop_Window, false) Pistol_popup = guiCreateButton(13,40,199,42,"Handguns",false,Shop_Window) guiSetFont(Pistol_popup,"sa-header") Weapon_popup = guiCreateButton(12,93,204,41,"Assault Rifles",false,Shop_Window) guiSetFont(Weapon_popup,"sa-header") Speical_popup = guiCreateButton(12,143,206,40,"Speical",false,Shop_Window) guiSetFont(Speical_popup,"sa-header") close = guiCreateButton(483,32,22,17,"X",false,Shop_Window) guiSetFont(close,"clear-normal") addEventHandler ( "onClientGUIClick", close, down, false ) Pistol_Window = guiCreateWindow(135,67,532,481,"Handguns",false) guiSetAlpha(Pistol_Window,0.69999998807907) guiWindowSetMovable(Pistol_Window,true) guiWindowSetSizable(Pistol_Window,false) GUIEditor_Button[7] = guiCreateButton(9,39,204,42,"Pistol",false,Pistol_Window) GUIEditor_Button[8] = guiCreateButton(9,93,204,40,"Silenced Pistol",false,Pistol_Window) GUIEditor_Button[9] = guiCreateButton(9,144,207,41,"Desert Eagle",false,Pistol_Window) GUIEditor_Button[10] = guiCreateButton(401,442,121,30,"<| Back",false,Pistol_Window) Weapon_Window = guiCreateWindow(135,67,532,481,"Assault Rifles",false) guiWindowSetMovable(Weapon_Window,true) guiWindowSetSizable(Weapon_Window,false) GUIEditor_Button[11] = guiCreateButton(12,43,194,39,"AK-47",false,Weapon_Window) GUIEditor_Button[12] = guiCreateButton(10,92,198,39,"M4",false,Weapon_Window) GUIEditor_Button[13] = guiCreateButton(11,145,198,40,"Weapon 3",false,Weapon_Window) GUIEditor_Button[14] = guiCreateButton(401,442,121,30,"<| Back",false,Weapon_Window) Spiciacl_Window = guiCreateWindow(135,67,532,481,"Spiciacl",false) guiWindowSetMovable(Spiciacl_Window,true) guiWindowSetSizable(Spiciacl_Window,false) GUIEditor_Button[16] = guiCreateButton(290,13,5,5,"",false,Spiciacl_Window) GUIEditor_Button[17] = guiCreateButton(43,44,171,39,"spe 1",false,Spiciacl_Window) GUIEditor_Button[18] = guiCreateButton(44,96,171,39,"spe 2",false,Spiciacl_Window) GUIEditor_Button[19] = guiCreateButton(46,146,170,38,"spe 3",false,Spiciacl_Window) GUIEditor_Button[20] = guiCreateButton(401,442,121,30,"<| Back",false,Spiciacl_Window) bindKey ( "F2" , "down" , function() if ( guiGetVisible ( Shop_Window ) == true ) then guiSetVisible ( Shop_Window ,false ) showCursor (false ) guiSetInputEnabled(false) elseif ( guiGetVisible ( Shop_Window ) == false ) then guiSetVisible ( Shop_Window ,true ) showCursor (false ) guiSetInputEnabled(true) end end ) addEventHandler("onClientGUIClick",root, function () if (source == Pistol_popup) then guiSetVisible(Pistol_Window, not guiGetVisible(Pistol_Window)) elseif (source == Weapon_popup) then guiSetVisible(Weapon_Window, not guiGetVisible(Weapon_Window)) elseif(source == GUIEditor_Button[10]) then guiSetVisible(Pistol_Window, false) end end)
  15. function fanFunction() bindKey (source,"-","down", function(player) outputChatBox (getPlayerName (player) .. "#FFFF00 Need Help Please!",getRootElement(),255,255,0,true) end ) end addEventHandler ("onPlayerLogin",getRootElement(),fanFunction)
  16. Castillo

    Requst Help

    You can check how I did it and do it with the "Back" button(s).
  17. Castillo

    Requst Help

    ----------------- --The Windows ------------------ GUIEditor_Window = {} GUIEditor_Button = {} Shop_Window = guiCreateWindow(135,67,532,481,"Weapon Shop",false) guiSetAlpha(Shop_Window,0.69999998807907) guiWindowSetMovable(Shop_Window,true) guiWindowSetSizable(Shop_Window,false) guiSetVisible (Shop_Window, false) Pistol_popup = guiCreateButton(13,40,199,42,"Handguns",false,Shop_Window) guiSetFont(Pistol_popup,"sa-header") Weapon_popup = guiCreateButton(12,93,204,41,"Assault Rifles",false,Shop_Window) guiSetFont(Weapon_popup,"sa-header") Speical_popup = guiCreateButton(12,143,206,40,"Speical",false,Shop_Window) guiSetFont(Speical_popup,"sa-header") close = guiCreateButton(483,32,22,17,"X",false,Shop_Window) guiSetFont(close,"clear-normal") addEventHandler ( "onClientGUIClick", close, down, false ) Pistol_Window = guiCreateWindow(135,67,532,481,"Handguns",false) guiSetAlpha(Pistol_Window,0.69999998807907) guiWindowSetMovable(Pistol_Window,true) guiWindowSetSizable(Pistol_Window,false) GUIEditor_Button[7] = guiCreateButton(9,39,204,42,"Pistol",false,Pistol_Window) GUIEditor_Button[8] = guiCreateButton(9,93,204,40,"Silenced Pistol",false,Pistol_Window) GUIEditor_Button[9] = guiCreateButton(9,144,207,41,"Desert Eagle",false,Pistol_Window) GUIEditor_Button[10] = guiCreateButton(401,442,121,30,"<| Back",false,Pistol_Window) Weapon_Window = guiCreateWindow(135,67,532,481,"Assault Rifles",false) guiWindowSetMovable(Weapon_Window,true) guiWindowSetSizable(Weapon_Window,false) GUIEditor_Button[11] = guiCreateButton(12,43,194,39,"AK-47",false,Weapon_Window) GUIEditor_Button[12] = guiCreateButton(10,92,198,39,"M4",false,Weapon_Window) GUIEditor_Button[13] = guiCreateButton(11,145,198,40,"Weapon 3",false,Weapon_Window) GUIEditor_Button[14] = guiCreateButton(401,442,121,30,"<| Back",false,Weapon_Window) Spiciacl_Window = guiCreateWindow(135,67,532,481,"Spiciacl",false) guiWindowSetMovable(Spiciacl_Window,true) guiWindowSetSizable(Spiciacl_Window,false) GUIEditor_Button[16] = guiCreateButton(290,13,5,5,"",false,Spiciacl_Window) GUIEditor_Button[17] = guiCreateButton(43,44,171,39,"spe 1",false,Spiciacl_Window) GUIEditor_Button[18] = guiCreateButton(44,96,171,39,"spe 2",false,Spiciacl_Window) GUIEditor_Button[19] = guiCreateButton(46,146,170,38,"spe 3",false,Spiciacl_Window) GUIEditor_Button[20] = guiCreateButton(401,442,121,30,"<| Back",false,Spiciacl_Window) bindKey ( "F2" , "down" , function() if ( guiGetVisible ( Shop_Window ) == true ) then guiSetVisible ( Shop_Window ,false ) showCursor (false ) guiSetInputEnabled(false) elseif ( guiGetVisible ( Shop_Window ) == false ) then guiSetVisible ( Shop_Window ,true ) showCursor (false ) guiSetInputEnabled(true) end end ) addEventHandler("onClientGUIClick",root, function () if (source == Pistol_popup) then guiSetVisible(Pistol_Window, not guiGetVisible(Pistol_Window)) elseif (source == Weapon_popup) then guiSetVisible(Weapon_Window, not guiGetVisible(Weapon_Window)) end end)
  18. karlis, that's what I gave him in the first time, this way it send's a player element to the server side (apart from 'source').
  19. Castillo

    Role-Playing Servers

    There are many Roleplay servers, here I'll leave a small list for you: Valhalla gaming - 68.68.31.29:22003 ShoDown Roleplay - 94.23.145.134:2000 DeVo MTA Roleplay - 81.19.215.100:22003 And also there are RPG servers where you could play.
  20. Sure, PM me when you want to talk about that.
  21. Wrong section, this should go here: viewforum.php?f=115
  22. imperio, this topic is not to get help, is to update abandoned resources of the community center.
  23. col = createColTube (-1683.0999755859, -2881.1000976563, 51.400001525879, 10, 3) -- enter your cooderates here for your colshape please note 10 and 3 is to do with the size of the shape. root = getRootElement () cone1 = createObject ( 1237, -1679.099609375, -2884.099609375, 51.099998474121, 0, 0, 311.99523925781) -- enter the ID of the object followed by the coordinates cone2 = createObject ( 1237, -1681.5, -2881.7998046875, 51.099998474121, 0, 0, 311.99523925781) cone3 = createObject ( 1237, -1684.19921875, -2879.3994140625, 51.099998474121, 0, 0, 311.99523925781) cone4 = createObject ( 1237, -1686.7998046875, -2877, 51.099998474121, 0, 0, 311.99523925781) gate1 = createObject ( 980, -1683, -2881.19921875, 54, 0, 0, 317.99926757813) -- note the rotx y and z may not be required so you just remove these. x y and z is where you would put your cordinates. function Open ( pla ) if getElementType ( pla ) == "player" then if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(pla)), aclGetGroup ( "Admin" ) ) then moveObject (cone1, 300, -1679.0999755859, -2884.1000976563, 50) moveObject (cone2, 300, -1681.5, -2881.8000488281, 50) moveObject (cone3, 300, -1684.1999511719, -2879.3999023438, 50) moveObject (cone4, 300, -1686.8000488281, -2877, 50) moveObject (gate1, 2500, -1674.4000244141, -2888.8999023438, 54) -- here is where you enter the coordinatess of the new location of the object, 2200 = the speed of the movent. end end end addEventHandler ( "onColShapeHit", col, Open) function Close ( pla ) if getElementType ( pla ) == "player" then if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(pla)), aclGetGroup ( "Admin" ) ) then moveObject (cone1, 300, -1679.099609375, -2884.099609375, 51.099998474121) moveObject (cone2, 300, -1681.5, -2881.7998046875, 51.099998474121) moveObject (cone3, 300, -1684.19921875, -2879.3994140625, 51.099998474121) moveObject (cone4, 300, -1686.7998046875, -2877, 51.099998474121) moveObject (gate1, 2500, -1683, -2881.19921875, 54) -- here is where you copy the coordinates of the orginal location of the object, 2951 = the timer of movent. end end end addEventHandler ( "onColShapeLeave", col, Close ) Should work.
×
×
  • Create New...