1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Sign up for news, events and more!

    You're currently visiting the official DarkRP Forums as a guest. Sign up now to participate in our community and we'll let you know when we have news.

Ulx staff command

Discussion in 'DarkRP Modding Questions & Help' started by Mr._Snake3_, Apr 3, 2019.

Tags:
  1. Mr._Snake3_

    Mr._Snake3_ New Member

    So i want it so when staff use a command it will swap them to staff on duty *but not so they respawn as that job just so lets say they are theif they put !onduty and they auto change to sod infront of there name and there model changes to the admin playermodel.
     
  2. CrazyTechKid

    CrazyTechKid New Member

    I have an edited version of the ulx custom commands so I have my code do when !admin in chat it changes their model so its like this

    if not should_revoke then
    calling_ply:SetModel("models/kingpommes/emperors_tower/ph_props/rx_unit/r5_j2.mdl")
    else
    calling_ply:Kill()
    calling_ply:Spawn()
    end

    just add this in the code under the -- Admin mode function

    unfortunately, I do not know how to reset the model when they unadmin so it just respawns them.

    I've included the addon here
     

    Attached Files:

  3. Mr._Snake3_

    Mr._Snake3_ New Member

    thanks, it works amazing but the is 1 problem. When you unadmin it takes the weapon you was last holding and removes it when you respawn. any ideas ?
     
  4. Emperor Penguin

    Emperor Penguin New Member

    Seems you can use GM: PlayerSetModel(ply) for player model change without killing him. I dont tested this yet, but it is must work
     
  5. Mr._Snake3_

    Mr._Snake3_ New Member

    where do i put that ? and is the away to go back to the previous model?

    example

    i am a thief i do !admin it changes my model
    then i go !unadmin
    then it changes it back to the thief model that i previously was
     
    Last edited: Jun 3, 2019
  6. Emperor Penguin

    Emperor Penguin New Member

    Stop. I posted the way to return player job model without killing him(what you do).
    --- Double Post Merged, Jun 3, 2019 ---
    Just change

    if not should_revoke then
    calling_ply:SetModel("models/kingpommes/emperors_tower/ph_props/rx_unit/r5_j2.mdl")
    else
    calling_ply:Kill()
    calling_ply:Spawn()
    end

    on

    if not should_revoke then
    calling_ply:SetModel("models/kingpommes/emperors_tower/ph_props/rx_unit/r5_j2.mdl")
    else
    GM: PlayerSetModel(calling_ply)
    end
     

Share This Page