Jump to content

no wanted in LV


Recommended Posts

Posted
function showZone(tPlayer) 
    local x, y, z = getElementPosition(tPlayer) 
    local gZone = getZoneName(x, y, z, true) --'true' = for city's only. 
    outputChatBox(gZone, tPlayer) 
end 
  
addCommandHandler("zone", showZone) 

In-game, typ:

/zone

This output's the city where you are currently. You can use this for your script, which is easier than a ColShape. (If you want whole LV to be no wanted level in.)

Posted
function showZone(tPlayer) 
    local x, y, z = getElementPosition(tPlayer) 
    local gZone = getZoneName(x, y, z, true) --'true' = for city's only. 
    outputChatBox(gZone, tPlayer) 
end 
  
addCommandHandler("zone", showZone) 

function checkZone() --Make a 'function' 
    local gPlayers = getElementsByType("player") --Get all players 
    if (gPlayers ~= false) and (gPlayers ~= nil) then --If it was not failed to get all players 
        for placeNumber, playerData in ipairs(gPlayers) do --Then make a 'loop', this will do the next code for EVERY player 
            local pX, pY, pY = getElementPosition(playerData) --Get the player's position 
            local gZone = getZoneName(pX, pY, pZ, true) --Get the zone name on the position 
            if (gZone == "") then --If the zone name is Las Venturas 
                setPlayerWantedLevel(playerData, 0) --Then set the player's wanted level to '0' 
            end --End the 'if' 
        end --End the 'loop' 
    end --End the 'if' 
end --End the 'function' 
  
setTimer(checkZone, 1000, 0) --Start the function every 1 second 

I trust that you will 'study' this and try to understand it. Next time it's your turn fully.

Posted
function showZone(tPlayer) 
    local x, y, z = getElementPosition(tPlayer) 
    local gZone = getZoneName(x, y, z, true) --'true' = for city's only. 
    outputChatBox(gZone, tPlayer) 
end 
  
addCommandHandler("zone", showZone) 

function checkZone() --Make a 'function' 
    local gPlayers = getElementsByType("player") --Get all players 
    if (gPlayers ~= false) and (gPlayers ~= nil) then --If it was not failed to get all players 
        for placeNumber, playerData in ipairs(gPlayers) do --Then make a 'loop', this will do the next code for EVERY player 
            local pX, pY, pY = getElementPosition(playerData) --Get the player's position 
            local gZone = getZoneName(pX, pY, pZ, true) --Get the zone name on the position 
            if (gZone == "") then --If the zone name is Las Venturas 
                setPlayerWantedLevel(playerData, 0) --Then set the player's wanted level to '0' 
            end --End the 'if' 
        end --End the 'loop' 
    end --End the 'if' 
end --End the 'function' 
  
setTimer(checkZone, 1000, 0) --Start the function every 1 second 

I trust that you will 'study' this and try to understand it. Next time it's your turn fully.

*NO problem in this script*

igot problem that i dont see the resources in "P" even i go to the console and type start resourc name and it say not found

i try refresh but still not found

and i give the script to my friend and it work on his server ?

not only 1 resoures many

Posted

igot problem that i dont see the resources in "P" even i go to the console and type start resourc name and it say not found

i try refresh but still not found

and i give the script to my friend and it work on his server ?

not only 1 resoures many

Dahell you meant then?

Posted

igot problem that i dont see the resources in "P" even i go to the console and type start resourc name and it say not found

i try refresh but still not found

and i give the script to my friend and it work on his server ?

not only 1 resoures many

Dahell you meant then?

the resources is not working with me even i console i do "refresh" and it show no error then i do start "resourcesName" and it say no found give ur ur skype name or add me abodcgg

please

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...