Hunter567T Posted September 5, 2010 Share Posted September 5, 2010 Ok I am trying to make a marker that when you touch it. It sets your team and skin. I did it first with just the skin and it worked fine but when I added the team part it stopped working. Client (no Server) local fireLV = createMarker ( 1746.64, 2081.58, 9.82, 'cylinder', 2, 29, 225, 52, 243 ) function MarkerHit1 ( hitPlayer ) if (getPlayerSkin(hitPlayer) == 278 ) then if (getPlayerTeam(hitPlayer) == LVFP ) then outputChatBox("You are Already In The Las Venturas Fire Department", hitPlayer) else setPlayerSkin(hitPlayer, 278) setPlayerTeam(hitPlayer, LVFP) outputChatBox("Enjoy Your New Job As A Fireman In Las Venturas!", hitPlayer) end end end addEventHandler( "onMarkerHit", fireLV, MarkerHit1 ) Link to comment
dzek (varez) Posted September 5, 2010 Share Posted September 5, 2010 DEBUG? CLICK ME * CLICK ME * CLICK ME <-- HOT STUFF ! In debug window you will easly see that setPlayerTeam is not existing, then you will check MTA wiki to see that setPlayerTeam is SERVER SIDE. Also in wiki you can find out that setPlayerSkin is deprecated and you should use setElementModel instead. Also, you should have know that client-side things are visible only in one client - it means if you change skin of player client side - other players will see that player as old skin! Read more wiki. You will need: triggerServerEvent setElementModel setPlayerTeam Link to comment
Hunter567T Posted September 5, 2010 Author Share Posted September 5, 2010 ok thanks and I was using /debugscript 3 in game and no-bugs were appearing for me Link to comment
CowTurbo Posted September 6, 2010 Share Posted September 6, 2010 varez, u missed that, he sayd its in client, but he have onMarkerHit, that is will be too one bug.. Link to comment
dzek (varez) Posted September 6, 2010 Share Posted September 6, 2010 whoops, another bug.. i just checked the beginning.. onMarkerHit is the reason why he cant see another errors .. 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