Jump to content

joedajoester

Members
  • Posts

    256
  • Joined

  • Last visited

Everything posted by joedajoester

  1. joedajoester

    Cursor

    How would you make it so you press a button and it shows a cursor and you can click a object and it will do a function like outputchatbox?
  2. Which xyz? all of them *edit getscreenfromworldposition x y z coordinates?
  3. joedajoester

    dxdraw

    How would you make a picture or text appear somewhere on the map with dxdrawtext? Do you attach it or something? Edit: getScreenFromWorldPosition(0,0,0) Would this work? And would i need to check line of sight?
  4. Ooh I totally misread it even after u said that I read what he said a few times and I now understand what he meant. I feel stupid now
  5. Try this. https://community.multitheftauto.com/index.php?p= ... ls&id=1953
  6. Here, try this.. col = createColTube (-1868.6999511719, -3104.1999511719, 54.900001525879, 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 () othergate1 = createObject ( 2951, -1868.5, -3104.1999511719, 54.700000762939, 0, 0, 318.5) -- enter the ID of the object followed by the coordinates -- 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 (othergate1, 2500, -1868.5, -3104.1999511719, 56.900001525879) -- 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 (othergate1, 2500,-1868.5, -3104.1999511719, 54.700000762939) -- 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 ) Only copy the rotation coordinates to the createObject 1. Go in map editor and go to where you want the gate to be 2. Get a object you want to be the gate 3. Place it in place 4. Double click it and get the coordinates and paste it in the col zone and in the createObject and the moveObject and the moveObject where it says move back to 5. Move the gate to were it should be when opened and double click the object and copy those coordinates into the moveObject, the one that says where it's moving to If your still having trouble, pm me and I'll make it for you for free. You could send me your map or five me the coordinates. Hope I helped, or will help
  7. Im using that exact code, my acl groups are named Admin SuperModerator and Moderator. Would it be possible to make a new acl group and put only the staff members in it and make the script so it opens to only that group?
  8. None of my Smods can open it. Only the admins can. Is there another way? I am very frustrated right now because i have tried changing the script so much to only get errors or not doing what i need.
  9. What code are you using?
  10. This, i get no error, it has the same ifstaff like in the jail script. col = createColTube (-1683.0999755859, -2881.1000976563, 50.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 ( player ) if getElementType ( player ) == "player" then if isStaff(player) 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. else return end end end addEventHandler ( "onColShapeHit", col, Open) function Close ( player ) if getElementType ( player ) == "player" then if isStaff(player) 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. else return end end end addEventHandler ( "onColShapeLeave", col, Close ) function isStaff(player) for index, group in ipairs({"Admin", "SuperModerator", "Moderator"}) do if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(player)), aclGetGroup ( group ) ) then return true end end end
  11. I tried this, and it still doesnt open for moderators and smods. col = createColTube (-1683.0999755859, -2881.1000976563, 50.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 ( player ) if getElementType ( player ) == "player" then if isStaff(player) 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. else return end end end addEventHandler ( "onColShapeHit", col, Open) function Close ( player ) if getElementType ( player ) == "player" then if isStaff(player) 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 ) function isStaff(player) -- I meant here to replace "pla" with "player". for index, group in ipairs({"Admin", "SuperModerator", "Moderator"}) do if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(player)), aclGetGroup ( group ) ) then return true end end end I dont understand what you mean
  12. it only opens for admins i need mod smod admin. should i replace pla with player?
  13. how about this one? col = createColTube (-1683.0999755859, -2881.1000976563, 50.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 isStaff(pla) 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 isStaff(pla) 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 ) function isStaff(player) -- I meant here to replace "pla" with "player". for index, group in ipairs({"Admin", "SuperModerator", "Moderator"}) do if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(player)), aclGetGroup ( group ) ) then return true end end end
  14. joedajoester

    staff

    This doesnt work, i need it to open to moderator super mod and admin, solidsnake14 helped and made this but my moderators cannot use this. function getPlayerFromPartOfName(playerPart) local pl = getPlayerFromName(playerPart) if isElement(pl) then return pl else for i,v in ipairs (getElementsByType ("player")) do if (string.find(getPlayerName(v),playerPart)) then return v end end end end function Jail (player, command, name) if isStaff(player) then local thePlayer = getPlayerFromPartOfName(name) if not thePlayer then return end if getElementData( thePlayer, "isJailed") then outputChatBox("This player is already in jail.",player,255,0,0) return end setElementData(thePlayer, "jailSkin", getElementModel ( thePlayer )) setElementModel ( thePlayer, 22 ) setElementPosition ( thePlayer, 52, 2483, 21 ) takeAllWeapons ( getRootElement() ) setElementData ( thePlayer, "isJailed", true ) outputChatBox (getPlayerName(thePlayer).." has been jailed", getRootElement(), 255, 0, 0, true ) else outputChatBox ("You cannot use this command!", player, 255, 0, 0, true ) end end addCommandHandler("jail",Jail) function Unjail (player, command, name) if isStaff(player) then local thePlayer = getPlayerFromPartOfName(name) if not thePlayer then return end if not getElementData( thePlayer, "isJailed") then outputChatBox("This player is not in jail.",player,255,0,0) return end setElementPosition ( thePlayer, 72, 2484, 16.3 ) setElementModel ( thePlayer, tonumber(getElementData(thePlayer,"jailSkin"))) setElementData ( thePlayer, "isJailed", false ) outputChatBox (getPlayerName(thePlayer).." has been unjailed. Be good now, "..getPlayerName(thePlayer), getRootElement(), 0, 255, 0, true ) else outputChatBox ("You cannot unjail yourself!", player, 255, 0, 0, true ) end end addCommandHandler("unjail",Unjail) ped1inside = createPed ( 71, 69, 2503, 17) setPedRotation (ped1inside, 180) function respawn() local x,y,z = getElementPosition(source) local rx,ry,rz = getElementRotation(source) setTimer(createPed, 60000, 1, 71, x,y,z,rz) if isElement(ped1inside) then destroyElement(ped1inside) end end addEventHandler("onPedWasted",ped1inside,respawn) function visit (player) setElementPosition (player, 71, 2499, 17 ) end addCommandHandler("visitjail", visit) function isStaff(player) for index, group in ipairs({"Admin", "SuperModerator", "Moderator"}) do if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(player)), aclGetGroup ( group ) ) then return true end break end return false end
  15. Bad argument @ executeCommandHandler expected element at argument 2 got string carl Carl was a player in the game. Nothing happens when i type, warp me to Carl. It says okey warp now
  16. I need it so someone can type, warp me to [a playername] function sendMessage2( messageclean, messageType, commandName, player2nick, ..name ) if (string.find(messageclean, "warp") and string.find(messageclean, "..name")) then outputChatBox("You asked!", source, 0, 255, 0) executeCommandHandler ( "warp", "..name", source ) end end addEventHandler("onPlayerChat",root,sendMessage2) i just dont understand how the .. works
  17. thats what i allready did. thank you
  18. Oh it work and i got a few more scripts to change that i might need help with
  19. Will this work?? if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(player)), aclGetGroup (moderator" ) ) then if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(player)), aclGetGroup (supermoderator" ) ) then if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(player)), aclGetGroup (Admin" ) ) then
  20. eof expected near end
  21. col = createColTube (-1683.0999755859, -2881.1000976563, 50.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 isStaff(pla) 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 ( player ) == "player" then if isStaff(player) 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 ) function isStaff(pla) for index, group in ipairs({"Admin", "SuperModerator", "Moderator"}) do if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(player)), aclGetGroup ( group ) ) then return true end break end return false end
  22. bad argument @ get element type
  23. Doesnt work i get no error. function connect() outputChatBox("Hello, i am your assistant. You can ask me questions and i will perform tasks. You can even ask for a car, or weapon. You can also talk to me! Go ahead, have fun!", source, 0, 255, 0) end addEventHandler("onPlayerJoin", getRootElement(), connect)
×
×
  • Create New...