Hadif Posted July 23, 2015 Posted July 23, 2015 (edited) How do I make a script that makes location limited? Example: If player get out from Los Santos, they will be kill or be warn. Any help will be appreciate, thank you! Edited August 3, 2015 by Guest
LabiVila Posted July 23, 2015 Posted July 23, 2015 https://wiki.multitheftauto.com/wiki/CreateColSphere it can be done via this
Hadif Posted July 23, 2015 Author Posted July 23, 2015 https://wiki.multitheftauto.com/wiki/CreateColSphereit can be done via this I'll try
GTX Posted July 23, 2015 Posted July 23, 2015 If you want specifically Los Santos, I'd suggest: getZoneName It's much easier than creating col sphere
Hadif Posted July 24, 2015 Author Posted July 24, 2015 If you want specifically Los Santos, I'd suggest: getZoneName It's much easier than creating col sphere this is much better and easier! Thanks bro!
Hadif Posted July 24, 2015 Author Posted July 24, 2015 function theLocator(source) local allLocation = {"Los Santos", "Las Venturas"} local theLocation = getElementZoneName(source, true) for theKey, allLocation in pairs(allLocation) do if (theLocation == allLocation) then killPed(source) end end end function checkLocation() setTimer(theLocator(source), 1000, 0) end addEventHandler("onPlayerSpawn", getRootElement(), checkLocation) -- Test Command addCommandHandler("locator", theLocator) setTimer Problem!
MTA Team 0xCiBeR Posted July 24, 2015 MTA Team Posted July 24, 2015 function theLocator(source) local allLocation = {"Los Santos", "Las Venturas"} local theLocation = getElementZoneName(source, true) for theKey, allLocation in pairs(allLocation) do if (theLocation == allLocation) then killPed(source) end end end function checkLocation() source = source setTimer(theLocator(source), 1000, 0) end addEventHandler("onPlayerSpawn", getRootElement(), checkLocation) -- Test Command addCommandHandler("locator", theLocator)
Hadif Posted July 24, 2015 Author Posted July 24, 2015 function theLocator(source) local allLocation = {"Los Santos", "Las Venturas"} local theLocation = getElementZoneName(source, true) for theKey, allLocation in pairs(allLocation) do if (theLocation == allLocation) then killPed(source) end end end function checkLocation() source = source setTimer(theLocator(source), 1000, 0) end addEventHandler("onPlayerSpawn", getRootElement(), checkLocation) -- Test Command addCommandHandler("locator", theLocator) thanks dude! ill try...
Hadif Posted July 24, 2015 Author Posted July 24, 2015 function theLocator(source) local allLocation = {"Los Santos", "Las Venturas"} local theLocation = getElementZoneName(source, true) for theKey, allLocation in pairs(allLocation) do if (theLocation == allLocation) then killPed(source) end end end function checkLocation() source = source setTimer(theLocator(source), 1000, 0) end addEventHandler("onPlayerSpawn", getRootElement(), checkLocation) -- Test Command addCommandHandler("locator", theLocator) STILL NOT WORKING!
GTX Posted July 24, 2015 Posted July 24, 2015 function theLocator(source) local allLocation = {["Los Santos"]=true, ["Las Venturas"]=true} local theLocation = getElementZoneName(source, true) for i=1, #allLocation do if (allLocation[theLocation]) then killPed(source) end end end function checkLocation() source = source setTimer(theLocator, 1000, 0, source) end addEventHandler("onPlayerSpawn", getRootElement(), checkLocation) -- Test Command addCommandHandler("locator", theLocator)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now