AMARANT Posted May 2, 2011 Share Posted May 2, 2011 How to show GUI window to local player? I made a code but it always shows that window to all players. Link to comment
Towncivilian Posted May 2, 2011 Share Posted May 2, 2011 Topic moved to Scripting support. Also, it'd be helpful if you could post your script within Lua tags. Link to comment
Castillo Posted May 2, 2011 Share Posted May 2, 2011 Please, post your code as Towncivilian said. Link to comment
AMARANT Posted May 2, 2011 Author Share Posted May 2, 2011 It seems that I've figured out this problem. I didn't know about triggerServerEvent function, but found it on this forum. Thanks you anyways But one question troubles me very much. I can't make a script code to give wanted stars to every player who kills other player. I tried and even posted topic with this problem, but it hasn't helped. Could I request an example for that code? Link to comment
Castillo Posted May 2, 2011 Share Posted May 2, 2011 function setWantedLevelWhenKill(ammo, killer, weapon, bodypart) if killer then setPlayerWantedLevel(killer, tonumber(getPlayerWantedLevel(killer))+1) outputChatBox("* Warning: You've got +1 wanted star(s)!",killer,255,0,0) end end addEventHandler("onPlayerWasted",getRootElement(),setWantedLevelWhenKill) I think it should work (Not tested) Link to comment
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