Smart. Posted November 20, 2012 Share 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) Link to comment
Allentus Posted November 20, 2012 Share Posted November 20, 2012 Really helpful,especially for new scripters like me Link to comment
MrCor Posted November 25, 2012 Share Posted November 25, 2012 good and Nice Thank you Link to comment
xiBraheem Posted December 19, 2012 Share 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 Link to comment
Castillo Posted December 20, 2012 Share 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"}, } Link to comment
xiBraheem Posted December 20, 2012 Share Posted December 20, 2012 How to add weapons to the marker ? Link to comment
EH10 Posted December 14, 2013 Share Posted December 14, 2013 Good Start :@ Nice Thanx You . =) Link to comment
Chronos Posted February 28, 2014 Share 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 Link to comment
Anubhav Posted March 1, 2014 Share 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. Link to comment
Chronos Posted March 1, 2014 Share 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 .... Link to comment
Spajk Posted March 1, 2014 Share Posted March 1, 2014 ... getElementData(player, "Role") returns player's current job, so you should use: if(getElementData(player, "Role") == "Police officer")then Link to comment
Chronos Posted March 1, 2014 Share 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 Link to comment
Hell-Mate Posted March 2, 2014 Share Posted March 2, 2014 Images not working .. re-upload images Link to comment
K4stic Posted March 2, 2014 Share 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 Link to comment
2Lio Posted March 10, 2016 Share 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) Link to comment
Enargy, Posted March 10, 2016 Share 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 Link to comment
enzopaul4 Posted November 20, 2016 Share Posted November 20, 2016 How to use this script? Link to comment
Tony Brand Posted October 5, 2018 Share Posted October 5, 2018 it is not usefull, remove this 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