Jump to content

Local GUI


Recommended Posts

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

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