Jump to content

Solve: Limited Location


Hadif

Recommended Posts

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!

Link to comment
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) 

Link to comment
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... :roll::roll::roll:

Link to comment
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!

Link to comment
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) 

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...