Smart. Posted November 20, 2012 Posted November 20, 2012 This resource creates jobs (markers) from a table. You can modify the job description, skins, position and more. You can choose to decline job or accept it via the GUI which is visible when you enter the marker. You'll have to script the actual job functions yourself and you can use: getElementData(player, "Role") to get the players job. Nothing more to it, it's a simple resource shouldn't be hard to use. If you however have any questions, post them here. Screenshots: http://puu.sh/1sikH http://puu.sh/1sikO http://puu.sh/1sikW http://puu.sh/1sil0 http://puu.sh/1silK Download: https://community.multitheftauto.com/index.php?p= ... ls&id=6016 Obs: Please ignore the "Welcome to ARC" message, it was due to my local server running ARC resources. (This resource has no connection to ARC nor has it been used on ARC)
Allentus Posted November 20, 2012 Posted November 20, 2012 Really helpful,especially for new scripters like me
xiBraheem Posted December 19, 2012 Posted December 19, 2012 How to add more markers ... jobs = { {jobTitle = "Police Officer", markerX = 1554.0769042969, markerY = -1675.5629882813, markerZ = 15.1953125, markerColorR = 0, markerColorG = 25, markerColorB = 200, skins = {280, 281, 284}, information = "TEST"}, } { {jobTitle = "Trucker", markerX = -1743.7244873047, markerY = 36.274353027344, markerZ = 3.5546875, markerColorR = 0, markerColorG = 25, markerColorB = 200, skins = {206}, information = "test"}, } this doesnt work
Castillo Posted December 20, 2012 Posted December 20, 2012 jobs = { {jobTitle = "Police Officer", markerX = 1554.0769042969, markerY = -1675.5629882813, markerZ = 15.1953125, markerColorR = 0, markerColorG = 25, markerColorB = 200, skins = {280, 281, 284}, information = "TEST"}, {jobTitle = "Trucker", markerX = -1743.7244873047, markerY = 36.274353027344, markerZ = 3.5546875, markerColorR = 0, markerColorG = 25, markerColorB = 200, skins = {206}, information = "test"}, }
Chronos Posted February 28, 2014 Posted February 28, 2014 (edited) This script's outdate could recompile it ! also to get data i use this but doesn't work function createPoliceTeam () Policeteam = createTeam ("Police ", 0, 0, 200) end addEventHandler ("onResourceStart", resourceRoot, createPoliceTeam) -- Join the police forces function joinPolice() local job = getElementData(player, "Police Officer") if job then ... Edited March 8, 2014 by Guest
Anubhav Posted March 1, 2014 Posted March 1, 2014 Did you even read the topic? You'll have to script the actual job functions yourself and you can use: getElementData(player, "Role") to get the players job.
Chronos Posted March 1, 2014 Posted March 1, 2014 Did you even read the topic? You'll have to script the actual job functions yourself and you can use: getElementData(player, "Role") to get the players job. Check the script above I've already use local job = getElementData(player, "Police Officer") if job then ....
Spajk Posted March 1, 2014 Posted March 1, 2014 ... getElementData(player, "Role") returns player's current job, so you should use: if(getElementData(player, "Role") == "Police officer")then
Chronos Posted March 1, 2014 Posted March 1, 2014 ... getElementData(player, "Role") returns player's current job, so you should use: if(getElementData(player, "Role") == "Police officer")then ah my bad ,Thanks
K4stic Posted March 2, 2014 Posted March 2, 2014 Images not working .. re-upload images Smart wont work or update this script anymore he just upload it at 20 Nov 2012 and over no updates or anythink else
2Lio Posted March 10, 2016 Posted March 10, 2016 Hi! I tried creating a script for Police team, but i can't manage to move players to teams when they apply to a job. This is my script: local policeTeam function createPoliceTeam() policeTeam = createTeam("Police", 0, 0, 255) end addEventHandler("onResourceStart", resourceRoot, createPoliceTeam) function movePlayerToPolice(thePlayer) if (getElementData(thePlayer, "Role") == "LSPD Officer" or getElementData(thePlayer, "Role") == "SFPD Officer" or getElementData(thePlayer, "Role") == "LVPD Officer") then thePlayer:setTeam(policeTeam) thePlayer:setNametagColor(0, 0, 255) end end Which eventHandler do I have to choose for movePlayerToPolice() function? (LSPD Officer, SFPD Officer and LVPD Officer are the jobs names I put on job.slua)
Enargy, Posted March 10, 2016 Posted March 10, 2016 Hi! I tried creating a script for Police team, but i can't manage to move players to teams when they apply to a job.This is my script: local policeTeam function createPoliceTeam() policeTeam = createTeam("Police", 0, 0, 255) end addEventHandler("onResourceStart", resourceRoot, createPoliceTeam) function movePlayerToPolice(thePlayer) if (getElementData(thePlayer, "Role") == "LSPD Officer" or getElementData(thePlayer, "Role") == "SFPD Officer" or getElementData(thePlayer, "Role") == "LVPD Officer") then thePlayer:setTeam(policeTeam) thePlayer:setNametagColor(0, 0, 255) end end Which eventHandler do I have to choose for movePlayerToPolice() function? (LSPD Officer, SFPD Officer and LVPD Officer are the jobs names I put on job.slua) You're using OOP method. Use setPlayerTeam and setPlayerNametagColor
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