Jump to content

[REl] Job markers/system


Smart.

Recommended Posts

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: http://community.mtasa.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
  • 4 weeks later...

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
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
  • 1 month later...
  • 10 months later...
  • 2 months later...

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 by Guest
Link to comment
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
  • 2 years later...

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
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
  • 8 months later...
  • 1 year later...

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