Overkillz

Members
  • Content Count

    358
  • Joined

  • Last visited

Community Reputation

5 Neutral

About Overkillz

  • Rank
    Fool

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Overkillz

    dxDrawCircle

    It makes a fade effect.
  2. Overkillz

    dxDrawCircle

    Well, mybad. I have realized that this function has been updated. Previously there was the same function but made with dxDrawLines. It used to be a bit blurred but u could reach what are u looking for. Probabilly u will need to work with shaders or dxDrawImage/dxDrawImageSection
  3. Overkillz

    dxDrawCircle

    Read carefully the function. It allows you to leave the middle empty.
  4. Overkillz

    dxDrawCircle

    Just create more circles leaving some spaces between them ...
  5. Overkillz

    Run functions with the same name

    Well, but could I run just one of the functions by a trigger using the same name for the event ? Something like that. -- FOR ROOM 1 addEvent("onTestThisFunction",true) addEventHandler("onTestThisFunction",root,whateverFunctionName) -- Same event name FOR ROOM 2 addEvent("onTestThisFunction",true) addEventHandler("onTestThisFunction",root,whateverFunctionName) In case of no. which one would be the optimal way for it ? Thanks for ur help, regards.
  6. Overkillz

    How to clone AK-47?

    You have to use shaders.
  7. Overkillz

    Run functions with the same name

    Well, according to your previous answer. Is there someway to execute the function for ROOM 1 (And not the ROOM 2) from an external resource without using a variable ? --## resourceName/room1/client.lua local function testFunction () --CODE end addEvent("onTestThisFunction",true) addEventHandler("onTestThisFunction",root,testFunction) --## resourceName/room2/client.lua -- <-- Now the folderRoom is the 2nd one (SAME Resource) local function testFunction () --CODE end addEvent("onTestThisFunction",true) addEventHandler("onTestThisFunction",root,testFunction) --## anotherResource/ -- triggerServerEvent ( "onTestThisFunction", localPlayer )
  8. Overkillz

    Run functions with the same name

    Well, but following this method I must to have all the rooms on the same file. I want to have them on different files but in the same resource. And I have another question. How can I call some of these functions from another resource without adding a custom event, exports and without using callClientFunction/callServerFunction ? Thanks for your help. I know I can sound so annoying but I would like to learn more about this. Regards.
  9. Overkillz

    Run functions with the same name

    What do you mean with table methods ? Something like this ? Room = {} function Room.Join() --Something Here end function Room.Leave() --Something Here end function Room.Start() --Something Here end --.....
  10. Overkillz

    Run functions with the same name

    Hello dear community. Today I wanted to create a multi room script. However, I have realized that might could be an easy way to make something similar like copy and paste to use almost the whole code as template but on different files. (ON THE SAME RESOURCE BUT DIFFERENT FILES) Here goes my question. Could I run the function from one file just changing a VARIABLE VALUE?. I would like that you explain me whats the best way to reach and optimize result without using different names for functions, events ..etc The code is going to be so long, thats why I wont to start yet. NOTE: The script looks the same 2 times due to I just change the variable 'currentArena'. Read it carefully please. --### guiResourceName/ --CIENT function joinArena(ID) if tonumber(ID) == 1 then triggerServerEvent ( "onPlayerJoinServerRoom", localPlayer, 1 ) elseif tonumber(ID) == 2 then triggerServerEvent ( "onPlayerLeaveServerRoom", localPlayer, 1 ) elseif tonumber(ID) == 3 then triggerServerEvent ( "onPlayerJoinServerRoom", localPlayer, 2 ) elseif tonumber(ID) == 4 then triggerServerEvent ( "onPlayerLeaveServerRoom", localPlayer, 2 ) end end bindKey("1","down",joinArena) bindKey("2","down",joinArena) bindKey("3","down",joinArena) bindKey("4","down",joinArena) -- ### roomResource/room1/ -> CLIENT & SERVER --CLIENT local currentArena = 1 local arenaList = {} function loadEvents() addEvent( "onEventTest", true ) end loadEvents() function removeHandlers() removeEventHandler( "onEventTest", getRootElement(), listEventTest) end addEvent("onPlayerJoinRoom", true) addEventHandler("onPlayerJoinRoom", root, function(ArenaNo) if ArenaNo == currentArena then outputChatBox("Succesfully joined at arena: "..currentArena) loadHandlers() end end) addEvent("onPlayerLeaveRoom", true) addEventHandler("onPlayerLeaveRoom", root, function(ArenaNo) if ArenaNo == ArenaNo then outputChatBox("Succesfully left arena: "..currentArena) removeHandlers() end end) function listEventTest(tableListTest) if tableListTest and type(tableListTest) == "table" then arenaList = tableListTest end end --SERVER local currentArena = 1 local srvArenaTable = {} local roomRunning = false function updateRoomResources() srvArenaTable = {} local resourceTable = getResources() for resourceKey, resourceValue in ipairs(resourceTable) do local name = getResourceName(resourceValue) table.insert(srvArenaTable,{resourceName = name}) end end function updateRoomOnStart() updateRoomResources() outputChatBox("Updating Resource list for arena: "..currentArena) end addEventHandler("onResourceStart",resourceRoot,updateArenaonStart) function joinServerRoom(ArenaNo) if ArenaNo == currentArena then triggerClientEvent(source, "onPlayerJoinRoom", source, currentArena) loadArena() end end addEvent("onPlayerJoinServerRoom",true) addEventHandler("onPlayerJoinServerRoom",getRootElement(),joinServerRoom) function leaveServerRoom(ArenaNo) if ArenaNo == currentArena then triggerClientEvent(source,"onPlayerLeaveRoom",source, currentArena) end end addEvent("onPlayerLeaveServerRoom",true) addEventHandler("onPlayerLeaveServerRoom",getRootElement(),leaveServerRoom) function loadArena() if not roomRunning then startRoomApps() end end function startRoomApps() outputChatBox("Apps should be running for room: "currentArena) end -- ### roomResource/room2/ -> CLIENT & SERVER --CLIENT local currentArena = 2 -- <---- THIS CHANGES local arenaList = {} function loadEvents() addEvent( "onEventTest", true ) end loadEvents() function removeHandlers() removeEventHandler( "onEventTest", getRootElement(), listEventTest) end addEvent("onPlayerJoinRoom", true) addEventHandler("onPlayerJoinRoom", root, function(ArenaNo) if ArenaNo == currentArena then outputChatBox("Succesfully joined at arena: "..currentArena) loadHandlers() end end) addEvent("onPlayerLeaveRoom", true) addEventHandler("onPlayerLeaveRoom", root, function(ArenaNo) if ArenaNo == ArenaNo then outputChatBox("Succesfully left arena: "..currentArena) removeHandlers() end end) function listEventTest(tableListTest) if tableListTest and type(tableListTest) == "table" then arenaList = tableListTest end end --SERVER local currentArena = 2 -- <---- THIS CHANGES local srvArenaTable = {} local roomRunning = false function updateRoomResources() srvArenaTable = {} local resourceTable = getResources() for resourceKey, resourceValue in ipairs(resourceTable) do local name = getResourceName(resourceValue) table.insert(srvArenaTable,{resourceName = name}) end end function updateRoomOnStart() updateRoomResources() outputChatBox("Updating Resource list for arena: "..currentArena) end addEventHandler("onResourceStart",resourceRoot,updateArenaonStart) function joinServerRoom(ArenaNo) if ArenaNo == currentArena then triggerClientEvent(source, "onPlayerJoinRoom", source, currentArena) loadArena() end end addEvent("onPlayerJoinServerRoom",true) addEventHandler("onPlayerJoinServerRoom",getRootElement(),joinServerRoom) function leaveServerRoom(ArenaNo) if ArenaNo == currentArena then triggerClientEvent(source,"onPlayerLeaveRoom",source, currentArena) end end addEvent("onPlayerLeaveServerRoom",true) addEventHandler("onPlayerLeaveServerRoom",getRootElement(),leaveServerRoom) function loadArena() if not roomRunning then startRoomApps() end end function startRoomApps() outputChatBox("Apps should be running for room: "currentArena) end
  11. Overkillz

    MTA freezes/stutters when moving mouse

    I had the same issue. Does someone know why is this currently happening ? Im not feeling pretty well having this temporal fix. Regards.
  12. Overkillz

    meta.xml manage (server-side)

    as far as I know, you can set a property in meta.xml <file src="fileName.TXD/DFF" download="false" /> Well, if you update/create another system to compile the file without requesting to change it a password each time u can keep the file on the client cache and it cant be used in other servers and I think thats your goal.
  13. Overkillz

    meta.xml manage (server-side)

    You need to create your own fileRead system to compile the TXD / DFF files with teaEncode and base64encode I guess. It is the best choice imo. Regards.
  14. Overkillz

    Killing timers in a table

    Well, I think I have found the problem. I guess I haven't got any issue the whole time. Why ? I thought that killing the timer and setting the variable as nil it would dissapear from the table, but, no, it still there with the name: userdata*x*****. Im still not understading why it doesn't dissapear from the table setting the variable as nil. Anyways, thanks for the help, if someone could argument why it doesn't dissapear would be great. Regards.
  15. Overkillz

    Killing timers in a table

    It is defined, I just didn't post it .. for i,player in ipairs(arenaSrv.players) do arenaSrv.timers.cd2 = setTimer ( triggerClientEvent, 1000, 1, player,"onTestingCD",player,"2") arenaSrv.timers.cd1 = setTimer ( triggerClientEvent, 2000, 1, player,"onTestingCD",player,"1") arenaSrv.timers.cd0 = setTimer ( triggerClientEvent, 3000, 1, player,"onTestingCD",player,"GO!") end There is not a debugscript3 error. It is an issue with the table ... I would already realized about it ...