Hi,
So I’ve read ALL event related topics, pages but I can’t get my scripts to work
Server.lua:

RegisterServerEvent('HeliSpawned')

  AddEventHandler('HeliSpawned', function()
    TriggerEvent('chat:addMessage', {
        args = { 'DEBUG: NETEVENT CALLED' }
    })
     
        end)

Client.lua:

 function ifHeli(vehicle, side)
        local ped = GetPlayerPed(-1) 
        local posi = GetEntityCoords(ped)
        local hash = GetHashKey(vehicle)
        local x = posi.x
        local y = posi.y
        local z = posi.z
        TriggerEvent('chat:addMessage', {
            args = { 'Debug:: ' .. hash }
        })
        local blip = AddBlipForCoord(x, y, z)
        SetBlipSprite(blip, 43)
        SetBlipColour(blip, 29)
        SetBlipDisplay(blip, 6)
        SetBlipScale(blip, 0.9)
        BeginTextCommandSetBlipName("STRING")
        AddTextComponentToString("Helicopter")
        EndTextCommandSetBlipName(blip)

        TriggerServerEvent('HeliSpawned')

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.