Et-win Posted August 11, 2014 Posted August 11, 2014 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.)
abod99119911 Posted August 11, 2014 Author Posted August 11, 2014 see what i got finally is that good ? i start to understand :DD
Et-win Posted August 11, 2014 Posted August 11, 2014 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.
abod99119911 Posted August 12, 2014 Author Posted August 12, 2014 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
Et-win Posted August 12, 2014 Posted August 12, 2014 Check console log in map 'logs' in map 'deathmatch' for any errors.
abod99119911 Posted August 12, 2014 Author Posted August 12, 2014 Check console log in map 'logs' in map 'deathmatch' for any errors. there is no problem ?!
Et-win Posted August 12, 2014 Posted August 12, 2014 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?
abod99119911 Posted August 12, 2014 Author Posted August 12, 2014 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
Et-win Posted August 12, 2014 Posted August 12, 2014 ... /refreshall And then see console to see errors... Or restart server.
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