addCommmandHandler("test",
function (player)
local veh = getPedOccupiedVehicle(player)
if veh then
bliper = createBlipAttachedTo (veh,46)
outputChatBox("start",player,255,0,0)
end
end)
function destroyBlip(player)
if isElement(bliper) then
destroyElement(bliper)
end
end
addEventHandler ( "onVehicleStartExit", root, destroyBlip)
addEventHandler("onVehicleExplode", root, destroyBlip)
function CreateBlip (player)
bliper = createBlipAttachedTo (player,46)
outputChatBox("start",player,255,0,0)
end
addEventHandler ( "onVehicleStartEnter", getRootElement(), CreateBlip )
function destroyBlip(player)
if isElement(bliper) then
destroyElement(bliper)
end
end
addEventHandler ( "onVehicleStartExit", root, destroyBlip)
addEventHandler("onVehicleExplode", root, destroyBlip)
try it on client side , it worked for me
addEventHandler("onClientResourceStart",resourceRoot,
function()
if(getElementData(localPlayer,"Group")== "Test" )then
blip = createBlip(100,20,0,31)
setBlipVisibleDistance(blip,1000)
end
end)
dMap = {
{ -- الماب الاول
{x, y, z},
{x, y, z},
{x, y, z}
},
{ -- الماب الثاني
{x, y, z},
{x, y, z},
{x, y, z}
},
{ -- الماب الثالث
{x, y, z},
{x, y, z},
{x, y, z}
},
}