Search the Community
Showing results for tags 'how to disable godmode'.
-
As I mentioned in the title, I want immortality to be disabled when entering the Turf area. Note: The Turf script is located in server\mods\deathmatch\resources[xkzKlan]\TurfSistem folder. The immortality script is located in server\mods\deathmatch\resources[xkzFreeroamSc]\freeroam folder. Code to disable immortality upon entering Turf (Code block) ; local turfs = {} addEvent("TurfSistem:onPlayerEnterTurf",true) addEvent("TurfSistem:onPlayerExitTurf",true) addEvent("onGroupColorChange",true) addEvent("onGroupDelete",true) addEvent("onGroupNameChange",true) addEvent("D_Modu",true) addEventHandler("TurfSistem:onPlayerEnterTurf",root,function(id) addEventHandler("onPlayerCommand",source,komutEngel) setElementData(source,"Turf",tostring(id)) toggleControl(source,"vehicle_fire",false) toggleControl(source,"vehicle_secondary_fire",false) toggleControl(source,"ozellik1",false) addEventHandler(source, ozellik1, D_Modu, false) -- Invalid code. end) addEventHandler("TurfSistem:onPlayerExitTurf",root,function(id) removeEventHandler("onPlayerCommand",source,komutEngel) setElementData(source,"Turf",nil) toggleControl(source,"vehicle_fire",true) toggleControl(source,"vehicle_secondary_fire",true) toggleControl(source,"ozellik1",true) addEventHandler(source, ozellik1, D_Modu, true) -- Invalid code. end) Immortality script in Freeroam (Code block) ; local D_Modu = {} function D_Modu() if guiCheckBoxGetSelected(ozellik1) == true then triggerServerEvent("Alpha_Olma", getRootElement(), localPlayer) outputChatBox("#0066ffÖlümsüzlük Modu #FFFFFFAktif", 255, 255, 255, true) addEventHandler("onClientPlayerDamage", localPlayer, nodamage) addEventHandler("onClientRender", root, render) triggerServerEvent("Olumsuz_olma", getRootElement(), localPlayer) else outputChatBox("#0066ffÖlümsüzlük Modu #ffffffKapatıldı", 255, 255, 255, true) triggerServerEvent("Alpha_Olmama", getRootElement(), localPlayer) removeEventHandler("onClientPlayerDamage", localPlayer, nodamage) removeEventHandler("onClientRender", root, render) triggerServerEvent("Olumsuz_Olmama", getRootElement(), localPlayer) end end addEventHandler("onClientGUIClick", ozellik1, D_Modu, false) function nodamage() cancelEvent() end function render() if getPedWeaponSlot(localPlayer) ~= 0 then setPedWeaponSlot(localPlayer,0) end end The errors I'm encountering right now ; [00:13:37] WARNING: [umoKlan]\TurfSistem\server.lua:16: Bad argument @ 'addEventHandler' [Expected string at argument 1, got player] [00:13:39] WARNING: [umoKlan]\TurfSistem\server.lua:24: Bad argument @ 'addEventHandler' [Expected string at argument 1, got player] It seems like I can resolve the issue by making the function global and calling it in "onPlayerEnterTurf". Can you help me with this? Update: I merged two different folders into the same directory, but couldn't achieve a result.
- 9 replies
-
- turf
- turf god mode disable
-
(and 1 more)
Tagged with: