Jump to content

Zonename


Best-Killer

Recommended Posts

Posted (edited)
function citycheck (plr)
if ( plr and plr ~= source and getElementType(plr) == "player" ) then 
local city = getElementZoneName(plr,true) 
if city == "Las Venturas" then 
triggerClientEvent ( plr, 'killslist', plr ) 
end
end
end

No error but the gui didn't open ? 

what i want do ?? that when player be in Lv that gui showed to the player

Edited by Best-Killer
Posted

If there are no errors clientside as you said, i would check if the function gets really called (both this and the client side handler), and if the function gets called try checking all variables or excluding them (ie append to the if statement an "or true") if that won't cause problems. This may be not helpful, i'm not expert, but till others reply to this you can try what i said

Posted (edited)

how do you handle ' citycheck ' function? you send a traigger from the client or there's an event in the server or how? and you didn't answer my questions how is the plr is it defined also what's the source.

Edited by FaHaD
Posted
1 minute ago, LoPollo said:

shouldn't addEventHandler be attached to something? i guess localPlayer but not sure

 

That's true LoPollo's find where is the problem i guess as he said you are missing the event attached to so just use 'root'.

 

Also i'm pretty sure there's an error for that in the client side? there's not?

Posted

For sure there's an error, so @Best-Killer must have checked the console/server log, while there's a file where you can see the errors in client-side, check:

MTA San Andreas 1.5\MTA\logs\clientscript.log

Also tell us if the script works when you can :)

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