
xXMADEXx
Members-
Posts
2,718 -
Joined
-
Last visited
Everything posted by xXMADEXx
-
You can make it your self, in the scoreboard resource...
-
Why don't you test and see? and, btw, line 7 is incorrect.
-
You can try this, but its just something, not tested... addEventHandler("onChatMessage",root, function () if (getElementType(source) ~= "player") then cancelEvent() end end )
-
addEventHandler("onClientClick",root, function () local screenx, screeny, worldx, worldy, worldz = getCursorPosition() if (screenx==20) and (screeny==50) then -- There is also a few ways to write it to get the position.. -- code -- end end )
-
onPlayerJoin - Event setPlayerMoney - Function
-
Hey guys, i've been looking, but i cannot really find anywhere to teach me how to make a shader, any suggestions?
-
Well, i made this script: [ROG]MySQL: function stopStealers() return "returned to stop stealers" end Other Script: addEventHandler("onClientResourceStart",resourceRoot, function () if (exports['[ROG]MySQL']:stopStealers(source) ~= "returned to stop stealers") then outputChatBox("THIS SERVER IS STEALING SCRIPTS FROM Revolution of Gaming!!!!!! LEAVE THE SERVER NOW!",255,0,0) end end )
-
Man I think you could do this also with some trigger between client and server, but if someone copies this resource and decompiles it, these code lines can be easily removed so this kind of security will be totally useless. yea, i guess so
-
I don't know C++ but, is there some sort of thing i can do, so it calls another resource, and if the other resource dosn't return, it will stop the stolen resource? lol, i know that is kinda hard to understand. What will stop who steals from editing the code and make it work without the other resource? Like, make it use some sort of an export, and if the export dosn't return, then it will stop resource.
-
I don't know C++ but, is there some sort of thing i can do, so it calls another resource, and if the other resource dosn't return, it will stop the stolen resource? lol, i know that is kinda hard to understand.
-
Would it work, even if it was on server side?
-
What does that code do?
-
Hey guys, im using LUAC GUI to compile my scripts, but is it the most anti-decompiler proof? Or is there another one, that makes the file more secure?
-
1. Close skype 2. open XAMPP control as admin, and start/restart apache
-
Are you trying to just stream the music for the person who wants to stream it, or are you trying to stream it to everyone on the server?
-
Hello guys, i made this script, but for some reason "attachElements" is failing to work.... ------------------------------- -- Create attached drug object ------------------------------- newObject = {} updateNewObjectIntAndDim = {} arrowMarker = {} addEvent("onPlayerPickupDrugs",true) addEventHandler("onPlayerPickupDrugs",root, function () p = source local x,y,z = getElementPosition(p) newObject[p] = createObject(1279,x,y,z) attachElements(newObject[p],source,1,0,0) -- Here updateNewObjectIntAndDim[p] = setTimer( function () local x,y,z = getElementPosition(p) setElementInterior(newObject[p],getElementInterior(p)) setElementDimension(newObject[p],getElementDimension(p)) setElementPosition(newObject[p],x+1,y,z) -- I had to use this shitty code, because attachElements wouldn't work D: end, 500, 0 ) addEventHandler("onVehicleEnter",root, function (pl) if (pl==p) then if (isElement(newObject[p])) then local car = source arrowMarker[p] = createMarker(0,0,0,"arrow",2,120,0,255,100,p) attachElements(arrowMarker[p],car,0,0,5) destroyElement(newObject[p]) if (isTimer(updateNewObjectIntAndDim[p])) then killTimer(updateNewObjectIntAndDim[p]) end addEventHandler("onVehicleExplode",car, function () if (isElement(arrowMarker[p])) then destroyElement(arrowMarker[p]) outputChatBox("The car containing your drugs has exploded.",p,255,0,0) end end ) end end end ) end )
-
"setElementRotation" will not work with a col shape.
-
Read write below the final code
-
Thanks
-
Hello everybody! Today ill be teaching you how to make a basic jail system. So, lets not waste any time and get started. First, you will need to make a function, that only an admin can execute. function onPlayerJail(player) local chat = outputChatBox -- Lets define "chat" to "outputChatBox" just to save some time if(isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)),aclGetGroup("Admin")) then -- Check if the player is in the Admin ACL group. else -- And if their not in the admin ACL chat("Jail: Your not an admin.",player,255,0,0) -- this is really going to do: outputChatBox("Jail: Your not an admin.",player,255,0,0) end end So, now that we have the admin lock on, we can get started on the other player functions . So, now is what you want to do is change "function onPlayerJail(player)" to "function onPlayerJail(player,command,player2,time,reason)". This will make it, so that you can create a timer until the jailed person is released, it will let you select a player to be jailed, and you can enter a reason for them to be jailed. Now that we have that, we will need to get the player to be jailed, and put them into the jail cell, if all the arguments return true. When you finish your code, it should look somthing like this: jailx, jaily, jailz = 1516, -1462, 10 -- You can change to custom cordinates. jailInterior = 0 jailDimension = 0 releaseX, releaseY, releaseZ = 1546, -1675, 14 -- the release cordinates of the jail releaseInterior = 0-- The interior that they will be released to releaseDimension= 0 -- The dimension that they will be released to. function onPlayerJail(player,command,player2,timer,reason) timer = timer -- I just do this incase, for the timer function. local chat = outputChatBox -- Lets define "chat" to "outputChatBox" just to save some time prisoner = getPlayerFromName(player2) -- This will get the player who you wan tto jail. if(isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)),aclGetGroup("Admin")) then -- Check if the player is in the Admin ACL group. if (timer) then if (prisoner) then -- if "player2" is a valid player then --- Here Is Where Most of the coding will take place. --- setElementPosition(prisoner,jailx, jaily, jailz) -- Take them to jail setElementInterior(prisoner,jailInterior) -- If they where in an interior, set them to your jails interior setElementDimension(prisoner,jailDimension) -- set them to the jail dimension (opsional) chat("Jail: "..getPlayerName(player).." has jailed "..player2.." for "..timer.." seconds.",root,255,0,0) chat("Jail: Reason: "..reason,root,255,0,0) jailTimer = ( -- Set the timer, of the player to be released. function () chat("Jail: "..player2.." has been released from jail.",255,255,0) setElementPosition(prisoner,releaseX, releaseY, releaseZ)-- Set their position when they get released SetElementDimension(prisoner,releaseDimension) -- set they dimensioon to the release dimension setElementInterior(prisoner,releaseInterior) -- set their interior to the defined release interior end, timer * 1000, 1 -- Will convert the timer into miliseconds. ) -- End the timer function else chat("Jail: "..player2.." isn't a valid player.",player,255,0,0) end else chat("Jail: /"..command.." [prisoner] [time(seconds)] [reason]",player,255,0,0) -- If they didn't enter a time, then outputChatBox that message. end else -- And if their not in the admin ACL chat("Jail: Your not an admin.",player,255,0,0) -- this is really going to do: outputChatBox("Jail: Your not an admin.",player,255,0,0) end end addCommandHandler("jail",onPlayerJail) This code may NOT work, i haven't tested it. If it doesn't work, its most likely just a spelling error. I hope this helped you. And please, don't just take the code, study it to help you with LUA.
-
"distance" isn't defined anywhere.
-
Im making a script to make garages, but for some reason all the garages are finding the x,y,z of the last created garage. Im not sure how to fix this... server.lua ---------------------------------------------------- -- Author: xXMADEXx -- File: server.lua -- copywrite 2013 (C) Revolution of Gaming ---------------------------------------------------- function createMiliSpawner(player) local x,y,z = getElementPosition(player) local city = getZoneName(x,y,z,true) local zone = getZoneName(x,y,z) if isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( player ) ), aclGetGroup ( "lvl 6" ) ) then -- loading file = xmlLoadFile("garages.xml", "garages") child = xmlCreateChild(file,"garage") -- City/zone --- xmlNodeSetAttribute(child,"city",city) xmlNodeSetAttribute(child,"zone",zone) --- Marker --- xmlNodeSetAttribute(child,"markerX",x) xmlNodeSetAttribute(child,"markerY",y) xmlNodeSetAttribute(child,"markerZ",z - 1) --- Garage Door --- xmlNodeSetAttribute(child,"garagedoorX",x+3.2) xmlNodeSetAttribute(child,"garagedoorY",y+0.4) xmlNodeSetAttribute(child,"garagedoorZ",z+1) --- Opening Door --- xmlNodeSetAttribute(child,"toX",x+3.2) xmlNodeSetAttribute(child,"toY",y+0.4) xmlNodeSetAttribute(child,"toZ",z+4) --- Save & Exit --- xmlSaveFile(file) xmlUnloadFile(file) marker = createMarker(x,y,z-1,"cylinder",2,255,255,0,100) end end addCommandHandler("ga",createMiliSpawner) marker = {} garage = {} door = {} function loadMyMiliMainSPawners () local file = xmlLoadFile ("garages.xml", "garages") for k, v in ipairs ( xmlNodeGetChildren ( file ) ) do -- Marker -- local markerX = xmlNodeGetAttribute(v,"markerX") local markerY = xmlNodeGetAttribute(v,"markerY") local markerZ = xmlNodeGetAttribute(v,"markerZ") marker[k] = createMarker(markerX,markerY,markerZ,"cylinder",2, 255, 255, 0, 100) -- Garage -- garage[k] = createObject(17950,markerX+3.2,markerY+4.7,markerZ+2,0,0,180) -- Garage Door -- doorX = xmlNodeGetAttribute(v,"garagedoorX") doorY = xmlNodeGetAttribute(v,"garagedoorY") doorZ = xmlNodeGetAttribute(v,"garagedoorZ") toX = xmlNodeGetAttribute(v,"toX") toY = xmlNodeGetAttribute(v,"toY") toZ = xmlNodeGetAttribute(v,"toZ") door[k] = createObject(17951,tonumber(doorX),tonumber(doorY),tonumber(doorZ),0,0,90) addEventHandler("onMarkerHit",marker[k], function () if (getElementData(door[k],"status") ~= "open") then setElementData(door[k],"status","open",true) moveObject(door[k],2000,toX,toY,toZ) setTimer( function () moveObject(door[k],2000,doorX,doorY,doorZ) setElementData(door[k],"status","closed",true) end, 20000, 1 ) else moveObject(door[k],2000,doorX,doorY,doorZ) setElementData(door[k],"status","closed",true) end end ) end end addEventHandler("onResourceStart",root, loadMyMiliMainSPawners) Example of the Errors: