Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function onduty()
- IsCop = true
- local player = GetPlayerPed(-1)
- local model = GetHashKey("s_m_y_sheriff_01") -- Change model name here <-
- RequestModel(model)
- while not HasModelLoaded(model) do
- RequestModel(model)
- IsEMS = false
- Citizen.Wait(0)
- end
- SetPlayerModel(PlayerId(), model)
- SetModelAsNoLongerNeeded(model)
- SetPlayerModel(player, GetHashKey(model))
- SetModelAsNoLongerNeeded(model)
- SetPedArmour(player, 200)
- GiveWeaponToPed(GetPlayerPed(-1), GetHashKey("WEAPON_COMBATPISTOL"), 1000, false)
- GiveWeaponComponentToPed(GetPlayerPed(-1), GetHashKey("WEAPON_COMBATPISTOL"), GetHashKey("COMPONENT_AT_PI_FLSH"))
- GiveWeaponToPed(GetPlayerPed(-1), GetHashKey("WEAPON_FLARE"), 5, false)
- GiveWeaponToPed(GetPlayerPed(-1), GetHashKey("WEAPON_NIGHTSTICK"), 1000, false)
- GiveWeaponToPed(GetPlayerPed(-1), GetHashKey("WEAPON_FLASHLIGHT"), 1000, false)
- GiveWeaponToPed(GetPlayerPed(-1), GetHashKey("WEAPON_STUNGUN"), 1000, false)
- end
- function offduty()
- IsCop = false
- local model = GetHashKey("mp_m_freemode_01") -- Change model name here <-
- RequestModel(model)
- while not HasModelLoaded(model) do
- RequestModel(model)
- Citizen.Wait(0)
- end
- SetPlayerModel(PlayerId(), model)
- SetModelAsNoLongerNeeded(model)
- SetPlayerModel(player, GetHashKey(model))
- SetModelAsNoLongerNeeded(model)
- SetPedComponentVariation(GetPlayerPed(-1), 8, 1, 0, 0) --shirt
- SetPedComponentVariation(GetPlayerPed(-1), 11, 3, 7, 0) --torso2 (shirt/jacket)
- SetPedComponentVariation(GetPlayerPed(-1), 9, 13, 0, 0) --armour
- SetPedComponentVariation(GetPlayerPed(-1), 3, 16, 0, 0) --arms
- SetPedComponentVariation(GetPlayerPed(-1), 4, 35, 0, 0) --trousers
- SetPedComponentVariation(GetPlayerPed(-1), 7, 8, 0, 0) --chain
- SetPedComponentVariation(GetPlayerPed(-1), 5, 0, 0, 0) --gloves
- SetPedComponentVariation(GetPlayerPed(-1), 6, 3, 0, 0) --shoes
- local player = GetPlayerPed(-1)
- RemoveAllPedWeapons(player, true)
- end
- --Sign on/off--
- Citizen.CreateThread(function()
- while true do
- local player = GetPlayerPed(-1)
- local pl = GetEntityCoords(player)
- Citizen.Wait(0)
- if GetDistanceBetweenCoords(pl.x, pl.y, pl.z, 1856.72, 3689.58, 34.27) < 1.0 and IsCop == false then -- <-- Sandy Shores --
- DrawText3Ds(1856.72, 3689.58, 34.27, "~w~Press [~g~E~w~] To Go on duty")
- if IsControlJustReleased(1, 38) then
- onduty()
- end
- elseif
- Vdist2(pl.x, pl.y, pl.z, -449.85, 6016.22, 31.72) < 1.0 and IsCop == false then -- <-- Paleto Bay --
- DrawText3Ds(-449.85, 6016.22, 31.72, "~w~Press [~g~E~w~] To Go on duty")
- if IsControlJustReleased(1, 38) then
- onduty()
- end
- elseif
- Vdist2(pl.x, pl.y, pl.z, 440.48, -976.32, 30.69) < 1.0 and IsCop == false then -- <-- Mission Row --
- DrawText3Ds(440.48, -976.32, 30.69, "~w~Press [~g~E~w~] To Go on duty")
- if IsControlJustReleased(1, 38) then
- onduty()
- end
- elseif GetDistanceBetweenCoords(pl.x, pl.y, pl.z, 1856.72, 3689.58, 34.27) < 1.0 and IsCop == true then
- DrawText3Ds(1856.72, 3689.58, 34.27, "~w~Press [~g~E~w~] To Go off duty")
- if IsControlJustReleased(1, 38) then
- offduty()
- end
- elseif GetDistanceBetweenCoords(pl.x, pl.y, pl.z, -449.85, 60.22, 31.72) < 1.0 and IsCop == true then
- DrawText3Ds(-449.85, 6016.22, 31.72, "~w~Press [~g~E~w~] To Go off duty")
- if IsControlJustReleased(1, 38) then
- offduty()
- end
- elseif GetDistanceBetweenCoords(pl.x, pl.y, pl.z, 440.48, -976.32, 30.69) < 1.0 and IsCop == true then
- DrawText3Ds(440.48, -976.32, 30.69, "~w~Press [~g~E~w~] To Go off duty")
- if IsControlJustReleased(1, 38) then
- offduty()
- end
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement