-
Posts
527 -
Joined
-
Last visited
-
Days Won
4
Everything posted by justn
-
So yeah, I have a combobox (language chat ) , and i wanna know how to like, if the player clicks an item from the combobox then it will bindKey 'L' in chat and the language.
-
Okay so i have tried this code, it works, but the problem is, when i set my team to another, the occupation doesn't change. _setPlayerTeam = setPlayerTeam addEvent ( "onPlayerTeamChange", true ) function setPlayerTeam ( player, team ) if not team or not player then return false end local oldTeam = getPlayerTeam ( player ) triggerEvent ( "onPlayerTeamChange", player, oldTeam, team ) return _setPlayerTeam ( player, team ) end addEventHandler ( "onPlayerTeamChange", root, function ( oldTeam, currentTeam ) if ( currentTeam == "Police" ) then setElementData ( source, "Occupation", "Officer" ) elseif ( currentTeam == "Staff" ) then setElementData ( source, "Occupation", "Staff" ) else setElementData ( source, "Occupation", "Civillian" ) end end )
-
.. So, can someone tell me, which is the best solution to this?
-
Thanks for this compiler !
-
The reason, I choose client side is because if you loop through all players every 2.5 seconds then you're server might lagg like hell but for client side I think it should be okay. Not sure but I think you need to replace this line with this: exports [ "scoreboard" ]:addScoreboardColumn ( "Occupation" ) Everytime i put your version (client-side) , the column doesnt show up, then when i put my version (server-side) and restart the scripts, it works, then when i reconnect , it doesn't work anymore
-
I don't need to modify the meta.mxl, because im using this script in a gamemode, i just copied your version of it and put it in the client side.. and the column still doesn't show up, wouldn't it be best to make this a server-sided script.. ?
-
..Now the occupation column doesn't show.
-
Oops, I had player for some jobs i made and just copied it in to this script and forgot to changed it, but anyways, its still not working.
-
Hey guys, so the problem is, it doesn't set the occupation as 'Officer' or 'Staff' or 'Civillian' exports [ "scoreboard" ]:addScoreboardColumn ( "Occupation", 2 ) function thatit() if ( source ~= false) then local sourceTeam = getTeamName ( getPlayerTeam(source) ) if ( sourceTeam == "Police" ) then setElementData ( source, "Occupation", "Officer" ) elseif ( sourceTeam == "Staff" ) then setElementData ( source, "Occupation", "Staff" ) else setElementData ( source, "Occupation", "Civillian" ) end end end setTimer ( thatit, 2500, 0 )
-
Slothbot
-
when the police shots the player, then the player gets 2 wanted level, how to change so if player shoot police, then he gets 2 wanted levels? function onPlayerDamage ( theCop ) if isPlayerInTeam( theCop, "Police" ) then if ( getElementType ( theCop ) == "player" and getElementModel ( theCop ) == 280 ) then setPlayerWantedLevel ( source, 2 ) end end end addEventHandler ( "onPlayerDamage", getRootElement(), onPlayerDamage )
-
Still have problems, i dont get any errors in debugscript though.
-
Okay 1 more thing, if the player already has a job, and he goes in another job marker and click get job how to make it so a gui will pop-up and say 'Do you want to leave your current job first ?
-
So i have made a job, how do i make it, so if the player has gotten the job, and if the player reconnects, then he will still have th job ? Example: When I click Get Job (A Quit job buttons appear) but if the player reconnects , then the quit button job will still be there.
-
Yeah dont worry , it's beta. i know i need to use isPlayerInTeam
-
Oops, typo error: Health changed to wanted
-
How do i make, so if the player has 2 or more wanted level, then his wanted cant be set back to 1 ? function onPlayerTarget ( theCop ) local PoliceTeam = getTeamFromName ( "Police" ) if ( PoliceTeam ) then if getElementType ( theCop ) == "player" and getElementModel ( theCop ) == 280 then setPlayerWantedLevel ( source, 1 ) end end end addEventHandler ( "onPlayerTarget", getRootElement(), onPlayerTarget )
-
Awesome map ! love the kart part.
-
Can someone help me with one thing, so i already made a police job, but i need help with some things in it..so yeah, if a aims at another player (who is in police) the player will get 1 star, and if the player shoots the other player ( who is in police) then he'll get 2 stars.
-
So hi, can someone help me with a script? if theres no player in a vehicle for 30 seconds, then the vehicle will destroy, and if the vehicle gets blown, then the blown car will be destroyed.. I really need this because it prevents lag.
-
Lol thanks, but i had already fixed the problem
