Steal Stop Signs [qTarget] [Update]

I got bored, so I decided to make this simple stopsign resource. This should sync across all clients, and should also work with Onesync and Onesync Infinity.

It’s probably not the best way to do it, but I didn’t use a lot of time making this, as it was just a resource I made for fun. Maybe I’ll add more features later. Feel free to make a pull request on my github if there is any features you’d like to add or anything that could’ve been done better.

Github / Download

Changelog

Changed animation and prop coords, thanks to @anon70864786

Dependencies

It’s easy to convert it to standalone if you’d like to.
qTarget
mythic_notify (could easily be replaced or removed)

Features

Not alot, just playing an anim while holding the sign, with the sign in your hand. Doesn’t do much else

5 Likes

Looks funny, I’m gonna download it for my private server :+1:t2:

1 Like

The stop sign disappearing syncs for all clients too? How’d you pull that off.

Hilarious script, second only to $5 chair script

1 Like

Yeah it should do. The script basically attatches the closest stop sign to the player, as well as creating a new stop sign on top. Then when you ‘drop’ the stop sign the first time the original stop sign just gets teleported to a invinsible location, so basically only the created one is left.

I’m fairly certain the pole wont be deleted for other people, not that it matters, they’ll still see the one in your hand. :crossed_fingers:

Hmm, it did do it for others when I checked. But could be wrong

wtf :rofl:

1 Like

The animation for holding the stop sign looks a bit odd. You could use this one:

Animation: rcmnigel1d, base_club_shoulder

Prop: prop_sign_road_01a

Prop Bone = 60309

Prop Placement = -0.1390, -0.9870, 0.4300, -67.3315314, 145.0627869, -4.4318885}

Could also add these other signs, same bone same placement






Looks cool, just used the janitor emote, but will change right now. Thank you!

2 Likes

is it also possible to write that for bt-target?

Should just need to change “qtarget” to “bt-target” in the client file.

I’ve already tried but it didn’t work

I’m not using bt-target, so I don’t know

hm that’s a shame because unfortunately i can’t let target and bt-target woll run together unless the man could put qtarget on the other alt key

1 Like

Client.lua bt-target

local stopsigns = {
    -949234773
}
exports['bt-target']:AddTargetModel(stopsigns, {
	options = {
		{
			event = "0pax:stealStopsign",
			icon = "fas fa-sign",
			label = "Steal Stopsign"
		},
        },
            job = {"all"},
            distance = 2 
    })

RegisterNetEvent('0pax:stealStopsign')
AddEventHandler('0pax:stealStopsign', function()
    local playerPed = PlayerPedId()
    local playerCoords = GetEntityCoords(playerPed)
    local playerHeading = GetEntityHeading(playerPed)
    local closestObj = GetClosestObjectOfType(playerCoords, 2.0, `prop_sign_road_01a`, true)

    if DoesEntityExist(closestObj) then
        if(IsPedArmed(playerPed, 1|2|4)) then SetCurrentPedWeapon(playerPed, `WEAPON_UNARMED`, 1) end

        local dict = "rcmnigel1d"
        LoadAnimDict(dict)
        TaskPlayAnim(playerPed, dict, "base_club_shoulder", 5.0, -1, -1, 50, 0, false, false, false)
        RemoveAnimDict(dict)

        stopsign = CreateObject(`prop_sign_road_01a`, playerCoords.x, playerCoords.y, playerCoords.z, true, false, false)
        AttachEntityToEntity(stopsign, playerPed,GetPedBoneIndex(playerPed, 60309),-0.1390, -0.4870, 0.2200, -67.3315314, 145.0627869, -4.4318885,1,1,0,1,0,1)
        if DoesEntityExist(stopsign) then
            DeleteObject(closestObj)
            SetEntityCoords(closestObj, -100.0, -100.0, -100.0)
        end

        exports['mythic_notify']:SendAlert('inform', 'Drop the stop sign with G')
    end
end)

RegisterCommand('dropStopsign', function(source)
    local playerPed = PlayerPedId()

    if IsEntityAttachedToEntity(stopsign, playerPed) then
        DetachEntity(stopsign, false, false)
        PlaceObjectOnGroundProperly(stopsign)
        ClearPedTasks(playerPed)
    end
end)

RegisterKeyMapping('dropStopsign', 'Drop the stop sign youre holding', 'keyboard', 'g')

function LoadAnimDict(dict)
    while not HasAnimDictLoaded(dict) do
        RequestAnimDict(dict)
        Citizen.Wait(5)
    end
end

And for fxmanifest.lua

fx_version 'cerulean'
game 'gta5'

author '0pax'
description 'Steal Stop Signs'
version '1.0.1'

client_script 'client/main.lua'

dependencies {
  'bt-target',
  'mythic_notify'
}
3 Likes

it’s not work for me :frowning:
I can’t press “START” in txadmin
I’m use QBusV4

hahaha might have to snag this, it pretty easy to switch over to fiveM target?

1 Like

how can i get another sign? to

how can i add more sign?

local stopsigns = {
-949234773,
1502931467
}

exports.qtarget:AddTargetModel(stopsigns, {
options = {
{
event = “0pax:stealStopsign”,
icon = “fas fa-sign”,
label = “Steal Stopsign”
},
{
event = “0pax:stealStopsign”,
icon = “fas fa-sign”,
label = “Steal Stopsign”
},
},
distance = 2
})

RegisterNetEvent(‘0pax:stealStopsign’)
AddEventHandler(‘0pax:stealStopsign’, function()
local playerPed = PlayerPedId()
local playerCoords = GetEntityCoords(playerPed)
local playerHeading = GetEntityHeading(playerPed)
local closestObj = GetClosestObjectOfType(playerCoords, 2.0, prop_sign_road_01a, true)

if DoesEntityExist(closestObj) then
    if(IsPedArmed(playerPed, 1|2|4)) then SetCurrentPedWeapon(playerPed, `WEAPON_UNARMED`, 1) end

    local dict = "rcmnigel1d"
    LoadAnimDict(dict)
    TaskPlayAnim(playerPed, dict, "base_club_shoulder", 5.0, -1, -1, 50, 0, false, false, false)
    RemoveAnimDict(dict)

    stopsign = CreateObject(`prop_sign_road_01a`, playerCoords.x, playerCoords.y, playerCoords.z, true, false, false)
    AttachEntityToEntity(stopsign, playerPed,GetPedBoneIndex(playerPed, 60309),-0.1390, -0.4870, 0.2200, -67.3315314, 145.0627869, -4.4318885,1,1,0,1,0,1)
    if DoesEntityExist(stopsign) then
        DeleteObject(closestObj)
        SetEntityCoords(closestObj, -100.0, -100.0, -100.0)
    end

    exports['mythic_notify']:SendAlert('inform', 'Drop the stop sign with -')
end

end)

RegisterNetEvent(‘0pax:stealStopsign’)
AddEventHandler(‘0pax:stealStopsign’, function()
local playerPed = PlayerPedId()
local playerCoords = GetEntityCoords(playerPed)
local playerHeading = GetEntityHeading(playerPed)
local closestObj = GetClosestObjectOfType(playerCoords, 2.0, prop_sign_road_05a, true)

if DoesEntityExist(closestObj) then
    if(IsPedArmed(playerPed, 1|2|4)) then SetCurrentPedWeapon(playerPed, `WEAPON_UNARMED`, 1) end

    local dict = "rcmnigel1d"
    LoadAnimDict(dict)
    TaskPlayAnim(playerPed, dict, "base_club_shoulder", 5.0, -1, -1, 50, 0, false, false, false)
    RemoveAnimDict(dict)

    stopsign = CreateObject(`prop_sign_road_05a`, playerCoords.x, playerCoords.y, playerCoords.z, true, false, false)
    AttachEntityToEntity(stopsign, playerPed,GetPedBoneIndex(playerPed, 60309),-0.1390, -0.4870, 0.2200, -67.3315314, 145.0627869, -4.4318885,1,1,0,1,0,1)
    if DoesEntityExist(stopsign) then
        DeleteObject(closestObj)
        SetEntityCoords(closestObj, -100.0, -100.0, -100.0)
    end

    exports['mythic_notify']:SendAlert('inform', 'Drop the stop sign with -')
end

end)

RegisterCommand(‘dropStopsign’, function(source)
local playerPed = PlayerPedId()

if IsEntityAttachedToEntity(stopsign, playerPed) then
    DetachEntity(stopsign, false, false)
    PlaceObjectOnGroundProperly(stopsign)
    ClearPedTasks(playerPed)
end

end)

RegisterKeyMapping(‘dropStopsign’, ‘Drop the stop sign youre holding’, ‘keyboard’, ‘-’)

function LoadAnimDict(dict)
while not HasAnimDictLoaded(dict) do
RequestAnimDict(dict)
Citizen.Wait(5)
end
end

local stopsigns = {
-949234773,
1502931467
}