Jump to content

Search the Community

Showing results for tags 'turf god mode disable'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Multi Theft Auto: San Andreas 1.x
    • Support for MTA:SA 1.x
    • User Guides
    • Open Source Contributors
    • Suggestions
    • Ban appeals
  • General MTA
    • News
    • Media
    • Site/Forum/Discord/Mantis/Wiki related
    • MTA Chat
    • Other languages
  • MTA Community
    • Scripting
    • Maps
    • Resources
    • Other Creations & GTA modding
    • Competitive gameplay
    • Servers
  • Other
    • General
    • Multi Theft Auto 0.5r2
    • Third party GTA mods
  • Archive
    • Archived Items
    • Trash

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Gang


Location


Occupation


Interests

Found 1 result

  1. 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.
×
×
  • Create New...