Jump to content

itHyperoX

Members
  • Posts

    522
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by itHyperoX

  1. itHyperoX

    Help.

    use @marty000123 code, and when @NeXuS™ done, you just change the code.
  2. Its working thanks. Now i got debugerrors. Whats can be the problem? attemt to perform arithmetic on local screenX ( a boolean value )
  3. im stupid. replace with this function Boltrablas() local x, y, z = 2117.6228027344, 897.66882324219, 10 robmarker1 = createMarker(x,y,z,"cylinder", 1.5, 255, 0, 0, 160) setElementCollisionsEnabled(robmarker1, false) blip = createBlipAttachedTo(robmarker1, 52) end addEventHandler("onResourceStart",resourceRoot,Boltrablas)
  4. feel free to use my own. Edit the positions etc. function Boltrablas(res) if res == getThisResource() then local x, y, z = 2117.6228027344, 897.66882324219, 10 robmarker1 = createMarker(x,y,z,"cylinder", 1.5, 255, 0, 0, 160) setElementCollisionsEnabled(robmarker1, false) blip = createBlipAttachedTo(robmarker1, 52) end end addEventHandler("onResourceStart",resourceRoot,Boltrablas) function boltrablas(source) if isElementWithinMarker(source, robmarker1) then local players = getPlayerCount() if tonumber(players) > 0 then -- 1 a 2 játékos setElementFrozen(source, true) setPedAnimation(source , "rob_bank", "cat_safe_rob", 30000, true, true, true, false) setTimer(setElementFrozen,30000,1,source,false) randomM = math.random(0,150000) setTimer(function() givePlayerMoney(source,randomM) end,30000,1) setTimer(outputChatBox, 1000, 1,"#00B4FF"..getPlayerName(source).." #ffffffelkezdte rabolni a(z) #6F9F86Las Venturas, Las Venturas - benzinkutat.",root,255,255,255,true) setTimer(outputChatBox, 30000,1,"#00B4FF"..getPlayerName(source).." #ffffffVégzett a boltrablással. Összesen rabolt #007DFA"..randomM.." #ffffffdollárt.",root,255,255,255,true) setTimer(outputChatBox, 900000, 1,"#6F9F86Las Venturas, Las Venturas - benzinkút újra rabolható!",root,255,255,255,true) setTimer(Boltrablas,3600000,1) --< Óránként csinál rablást >-- destroyElement(robmarker1) destroyElement(blip) else outputChatBox(" Legalább 2 játékosnak kell lennie a szerveren.",source,255,255,255,true) return end else outputChatBox(" Ezt a parancsot csak bolt markerben használhatod.",source,255,255,255,true) end end addCommandHandler("rob",boltrablas)
  5. itHyperoX

    Crosshair

    function crosshair() local hitX,hitY,hitZ = getPedTargetEnd ( getLocalPlayer() ); local screenX1, screenY1 = getScreenFromWorldPosition ( hitX,hitY,hitZ ); dxDrawImage(screenX1-(32/2), screenY1-(32/2), 32, 32, "files/crosshair.png") end bindKey("aim_weapon", "both", function(key, keyState) if keyState == "down" then addEventHandler("onClientRender", root, crosshair) else removeEventHandler("onClientRender", root, crosshair) end end) So. Here is my crosshair script. How can i make that, if the weapon id is 34 or 35 or 36 then remove this crosshair, and draw the default?
  6. yes, if not this can going to be so wrong. Thank you your help
  7. @NeXuS™ here is the acl
  8. i'm not calling, only this in the script file @NeXuS™ here is the acl <acl> <group name="Everyone"> <acl name="Default"></acl> <object name="user.*"></object> <object name="resource.*"></object> </group> <group name="Moderator"> <acl name="Moderator"></acl> <object name="resource.mapcycler"></object> <object name="resource.mapmanager"></object> <object name="resource.resourcemanager"></object> <object name="resource.votemanager"></object> </group> <group name="SuperModerator"> <acl name="Moderator"></acl> <acl name="SuperModerator"></acl> </group> <group name="Admin"> <acl name="Moderator"></acl> <acl name="SuperModerator"></acl> <acl name="Admin"></acl> <acl name="RPC"></acl> <object name="resource.*"></object> </group> <group name="Console"> <acl name="Moderator"></acl> <acl name="SuperModerator"></acl> <acl name="Admin"></acl> <acl name="RPC"></acl> <object name="user.Console"></object> </group> <group name="RPC"> <acl name="RPC"></acl> </group> <group name="autoGroup_guieditor"> <acl name="autoACL_guieditor"></acl> <object name="resource.guieditor"></object> </group> <acl name="Default"> <right name="general.ModifyOtherObjects" access="false"></right> <right name="general.http" access="false"></right> <right name="command.start" access="false"></right> <right name="command.stop" access="false"></right> <right name="command.restart" access="false"></right> <right name="command.stopall" access="false"></right> <right name="command.gamemode" access="false"></right> <right name="command.changemode" access="false"></right> <right name="command.changemap" access="false"></right> <right name="command.stopmode" access="false"></right> <right name="command.stopmap" access="false"></right> <right name="command.skipmap" access="false"></right> <right name="command.refresh" access="false"></right> <right name="command.refreshall" access="false"></right> <right name="command.addaccount" access="false"></right> <right name="command.delaccount" access="false"></right> <right name="command.debugscript" access="false"></right> <right name="command.chgpass" access="false"></right> <right name="command.loadmodule" access="false"></right> <right name="command.unloadmodule" access="false"></right> <right name="command.reloadmodule" access="false"></right> <right name="command.upgrade" access="false"></right> <right name="command.mute" access="false"></right> <right name="command.crun" access="false"></right> <right name="command.srun" access="false"></right> <right name="command.run" access="false"></right> <right name="command.unmute" access="false"></right> <right name="command.banip" access="false"></right> <right name="command.unbanip" access="false"></right> <right name="command.reloadbans" access="false"></right> <right name="command.shutdown" access="false"></right> <right name="command.install" access="false"></right> <right name="command.aexec" access="false"></right> <right name="command.whois" access="false"></right> <right name="command.whowas" access="false"></right> <right name="command.aclrequest" access="false"></right> <right name="function.executeCommandHandler" access="false"></right> <right name="function.setPlayerMuted" access="false"></right> <right name="function.addAccount" access="false"></right> <right name="function.addBan" access="false"></right> <right name="function.setUnbanTime" access="false"></right> <right name="function.setBanAdmin" access="false"></right> <right name="function.setBanReason" access="false"></right> <right name="function.setBanNick" access="false"></right> <right name="function.removeBan" access="false"></right> <right name="function.removeAccount" access="false"></right> <right name="function.setAccountPassword" access="false"></right> <right name="function.banIP" access="false"></right> <right name="function.banPlayer" access="false"></right> <right name="function.banSerial" access="false"></right> <right name="function.getBansXML" access="false"></right> <right name="function.unbanIP" access="false"></right> <right name="function.unbanSerial" access="false"></right> <right name="function.reloadBans" access="false"></right> <right name="function.setServerPassword" access="false"></right> <right name="function.getServerPassword" access="false"></right> <right name="function.callRemote" access="false"></right> <right name="function.fetchRemote" access="false"></right> <right name="function.startResource" access="false"></right> <right name="function.stopResource" access="false"></right> <right name="function.restartResource" access="false"></right> <right name="function.createResource" access="false"></right> <right name="function.copyResource" access="false"></right> <right name="function.addResourceMap" access="false"></right> <right name="function.addResourceConfig" access="false"></right> <right name="function.removeResourceFile" access="false"></right> <right name="function.setResourceDefaultSetting" access="false"></right> <right name="function.removeResourceDefaultSetting" access="false"></right> <right name="function.redirectPlayer" access="false"></right> <right name="function.aclReload" access="false"></right> <right name="function.aclSave" access="false"></right> <right name="function.aclCreate" access="false"></right> <right name="function.aclDestroy" access="false"></right> <right name="function.aclSetRight" access="false"></right> <right name="function.aclRemoveRight" access="false"></right> <right name="function.aclCreateGroup" access="false"></right> <right name="function.aclDestroyGroup" access="false"></right> <right name="function.aclGroupAddACL" access="false"></right> <right name="function.aclGroupRemoveACL" access="false"></right> <right name="function.aclGroupAddObject" access="false"></right> <right name="function.aclGroupRemoveObject" access="false"></right> <right name="function.refreshResources" access="false"></right> <right name="function.setServerConfigSetting" access="false"></right> <right name="function.updateResourceACLRequest" access="false"></right> <right name="function.shutdown" access="false"></right> </acl> <acl name="Moderator"> <right name="general.ModifyOtherObjects" access="false"></right> <right name="command.gamemode" access="true"></right> <right name="command.changemode" access="true"></right> <right name="command.changemap" access="true"></right> <right name="command.stopmode" access="true"></right> <right name="command.stopmap" access="true"></right> <right name="command.skipmap" access="true"></right> <right name="command.mute" access="true"></right> <right name="command.unmute" access="true"></right> <right name="command.whois" access="true"></right> <right name="command.whowas" access="true"></right> <right name="function.setPlayerMuted" access="true"></right> <right name="function.kickPlayer" access="true"></right> <right name="function.banIP" access="true"></right> <right name="function.banPlayer" access="true"></right> <right name="function.banSerial" access="true"></right> <right name="function.getBansXML" access="true"></right> <right name="function.unbanIP" access="true"></right> <right name="function.unbanSerial" access="true"></right> <right name="function.startResource" access="true"></right> <right name="function.stopResource" access="true"></right> <right name="function.restartResource" access="true"></right> <right name="function.redirectPlayer" access="true"></right> </acl> <acl name="SuperModerator"> <right name="general.ModifyOtherObjects" access="false"></right> <right name="command.start" access="true"></right> <right name="command.stop" access="true"></right> <right name="command.restart" access="true"></right> <right name="command.kick" access="true"></right> <right name="command.ban" access="true"></right> <right name="command.banip" access="true"></right> <right name="command.unbanip" access="true"></right> <right name="command.reloadbans" access="true"></right> <right name="command.refresh" access="true"></right> <right name="command.refreshall" access="true"></right> <right name="command.loadmodule" access="true"></right> <right name="command.unloadmodule" access="true"></right> <right name="command.reloadmodule" access="true"></right> <right name="command.addaccount" access="true"></right> <right name="command.delaccount" access="true"></right> <right name="command.chgpass" access="true"></right> <right name="function.addAccount" access="true"></right> <right name="function.removeAccount" access="true"></right> <right name="function.setAccountPassword" access="true"></right> </acl> <acl name="Admin"> <right name="general.ModifyOtherObjects" access="true"></right> <right name="general.http" access="true"></right> <right name="command.shutdown" access="true"></right> <right name="command.install" access="true"></right> <right name="command.stop" access="true"></right> <right name="command.start" access="true"></right> <right name="command.restart" access="true"></right> <right name="command.aexec" access="true"></right> <right name="command.refresh" access="true"></right> <right name="function.redirectPlayer" access="true"></right> <right name="command.debugscript" access="true"></right> <right name="command.upgrade" access="true"></right> <right name="function.callRemote" access="true"></right> <right name="function.stopResource" access="true"></right> <right name="command.crun" access="true"></right> <right name="function.startResource" access="true"></right> <right name="command.srun" access="true"></right> <right name="function.fetchRemote" access="true"></right> <right name="command.run" access="true"></right> <right name="command.aclrequest" access="true"></right> <right name="function.addBan" access="true"></right> <right name="function.setUnbanTime" access="true"></right> <right name="function.setBanAdmin" access="true"></right> <right name="function.setBanReason" access="true"></right> <right name="function.setBanNick" access="true"></right> <right name="function.removeBan" access="true"></right> <right name="function.reloadBans" access="true"></right> <right name="function.executeCommandHandler" access="true"></right> <right name="function.setServerPassword" access="true"></right> <right name="function.getServerPassword" access="true"></right> <right name="function.createResource" access="true"></right> <right name="function.copyResource" access="true"></right> <right name="function.addResourceMap" access="true"></right> <right name="function.addResourceConfig" access="true"></right> <right name="function.removeResourceFile" access="true"></right> <right name="function.setResourceDefaultSetting" access="true"></right> <right name="function.removeResourceDefaultSetting" access="true"></right> <right name="function.aclReload" access="true"></right> <right name="function.aclSave" access="true"></right> <right name="function.aclCreate" access="true"></right> <right name="function.aclDestroy" access="true"></right> <right name="function.aclSetRight" access="true"></right> <right name="function.aclRemoveRight" access="true"></right> <right name="function.aclCreateGroup" access="true"></right> <right name="function.aclDestroyGroup" access="true"></right> <right name="function.aclGroupAddACL" access="true"></right> <right name="function.aclGroupRemoveACL" access="true"></right> <right name="function.aclGroupAddObject" access="true"></right> <right name="function.aclGroupRemoveObject" access="true"></right> <right name="function.refreshResources" access="true"></right> <right name="function.setServerConfigSetting" access="true"></right> <right name="function.updateResourceACLRequest" access="true"></right> <right name="function.shutdown" access="true"></right> </acl> <acl name="RPC"> <right name="function.callRemote" access="true"></right> <right name="function.fetchRemote" access="true"></right> </acl> <acl name="autoACL_guieditor"> <right name="general.ModifyOtherObjects" access="true" who="" pending="true" date=""></right> <right name="function.callRemote" access="true" who="" pending="true" date=""></right> </acl> </acl>
  9. Its already done. I tried with make new folder etc.. Nothing And yes, i have only my resources installed. (Working on play server so long )
  10. still ACL: Access denied for 'aexec' But its show me the output, i dont know what the problem addEventHandler("onPlayerCommand", getRootElement(), function(commandName) if blockedCommands[commandName:lower()] then outputChatBox("ok") if not enabledSerials [getPlayerSerial(source)] then cancelEvent() end end end)
  11. Hello guys. How can i make that, i have serial table serials = { ["TEST"]=true, } And if that serial is mine, i can use /debugscript 3, /aexec, /shutdown, etc without i'm adding accout to ACL ?
  12. btw with this, you dont need to enter the player full name better to use this one for getting player name: In your script : local jatekos = getPlayerFromName(jatekos) with this you can use local jatekos = getPlayerFromPartialName(jatekos) function getPlayerFromPartialName(name) local name = name and name:gsub("#%x%x%x%x%x%x", ""):lower() or nil if name then for _, player in ipairs(getElementsByType("player")) do local name_ = getPlayerName(player):gsub("#%x%x%x%x%x%x", ""):lower() if name_:find(name, 1, true) then return player end end end end
  13. function kirugas(admin, parancs, jatekos, ...) local indok = table.concat({ ... }, " ") if not getElementData(admin, "gm", true) then outputChatBox ("#A1D490[King of the Kill]#FFFFFF Nincs jogod a parancs használatához.", admin, 255, 255, 255, true) end if not jatekos and getElementData(admin, "gm", true) then outputChatBox ("#A1D490[King of the Kill] #FFFFFFHibás szintaxis. Helyes: #A1D490/"..parancs.." #86B5DB[játékosnév] [opcionális indok]", admin, 255, 255, 255, true) end local jatekos = getPlayerFromName(jatekos) if jatekos and not indok and getElementData(admin, "gm", true) then kickPlayer (jatekos, admin, "Ismeretlen indok.") elseif indok and jatekos and getElementData(admin, "gm", true) then kickPlayer (jatekos, admin, indok) end end addCommandHandler ("kirugas", kirugas)
  14. itHyperoX

    Complie

    https://community.multitheftauto.com/index.php?p=resources&s=details&id=13172 use this and you dont need share your code, you dont need to use the site
  15. hmm, now i dont get messages its down What you said before setTimer(function() outputChatBox("Down",root,255,255,255,true) end,tonumber(minutes)*60000,minutes)
  16. @NeXuS™ Read again please, edited
  17. Hi, i'm working on servershutdown command, its working but i dont know how to make that, the messages show on the chat every minutes. Like: /servershutdown 5 Test After 1 minutes it put out the chat: The server is going down in about 4 minutes after 1 minutes The server is going down in about 3 minutes after 1 minutes The server is going down in about 2minutes after 1 minutes The server is going down in about 1 minutes after 1 minutes server is goind down function shutdown(player,cmd,minutes,...) local reason = table.concat({ ... }, " ") local minutes = tonumber(minutes) if #reason > 0 then outputChatBox("The server is going down in about "..minutes.." minutes.",root) outputChatBox(reason,root) setTimer(function() outputChatBox("Down",root,255,255,255,true) end,tonumber(minutes)*60000,1) end end addCommandHandler("servershutdown",shutdown)
  18. so, if i'm right, you want that, when player wanted level change to 3, automaticly goin to jail. If yes, you can use setElementData -- Set the data when player wanted level change onElementDataChange -- you dont need setTimer setElementPosition -- Set the player position to jail setPlayerWantedLevel -- remove the wanted level I hope this help u. If i forgott something, or if you have some problems, feel free to ask here and we help ya
  19. addEventHandler("onPlayerJoin", root,function() spawn(source) end) function spawn(source) x, y, z = 2028.4606933594, 1342.2176513672, 10.8203125 repeat until spawnPlayer(source,x+1,y+1,z, 0,303) setCameraTarget(source, player) fadeCamera(source, true) setElementRotation(source, 0, 0, -90) end
  20. How can i get the zone name from table? local posTable = { {{2675.6840820313, 805.86389160156, 200}, {2675.6840820313, 805.86389160156, 10.434359550476}}, --< Las Venturas, Építkezés >-- {{2000.8110351563, 1563.2194824219, 200}, {2000.8110351563, 1563.2194824219, 14.934368133545}}, --< Las Venturas, Kaszinóval szemben hajó >-- {{2046.3370361328, 1158.7958984375, 200}, {2046.3370361328, 1158.7958984375, 10.134365081787}}, --< Las Venturas, Városi 2 sávos >-- {{1643.2946777344, -25.087184906006, 200}, {1643.2946777344, -25.087184906006, 36.03441619873}}, --< Los Santos, 2 sávos >-- {{47.896957397461, -1529.2211914063, 200}, {47.896957397461, -1529.2211914063, 4.8344135284424}}, --< Los Santos, déli határ >-- {{268.02044677734, 1882.9016113281, 200}, {268.02044677734, 1882.9016113281, -30.465515136719}}, --< Area 51 >-- {{250.90054321289, 2514.453125, 200}, {250.90054321289, 2514.453125, 16.134490966797}}, --< Elhagyatott reptér >-- {{-1978.5466308594, -1629.66796875, 250}, {-1978.5466308594, -1629.66796875, 87.234451293945}}, --< Chilliad >-- {{-2091.9978027344, 2313.4880371094, 200}, {-2091.9978027344, 2313.4880371094, 25.614063262939}} --< Tierra >-- } function dropTHIS(res) if res == getThisResource() then local rTable = posTable[math.random(#posTable)] local area = getZoneName(posTable[1], posTable[2], posTable[3]) local city = getZoneName(posTable[1], posTable[2], posTable[3], true) outputChatBox(area.." >< "..city,root) end end addEventHandler("onResourceStart",root,dropTHIS)
  21. ye not that was the problem, fixed
  22. i tried this before, same debug bad Argument getElementModel expected element at argument 1, setElementModel element at argument 1 got number 28
×
×
  • Create New...