Jump to content

تعديل البلب


Recommended Posts

السلام عليكم

كيفككم

باختصار ممعي مود جربته تمام ذذ

لكن طلع فيه مشكله الحين لو الاعب نزل من الموتر البلب يختفي

لكن لو مات وهو داخل الموتر ورسبن البلب ماراح يختفي وراح يكون بق

لذالك ابي اخليه الماركر يختفي لو الاعب مات وهو داخل السيارة .. اتمنى الافادة

هذا الكود اللي ممكن تحتاجونه

حاولت اسوي حدث الموت بدال بدال حدث النزول من سياره

لكن اكتشفت ان الحدث الموت سيرفر

وقلت ممكن تحتاج ترايقر و يمكن لا ومو فاهم لة

addEvent ( "barco_set_locationPizz", true ) 
addEventHandler ( "barco_set_locationPizz", root, 
    function ( x, y, z ) 
        marker = createMarker ( x, y, z - 1, "cylinder", 2.5, 235, 141, 19, 153 ) 
        blip = createBlipAttachedTo ( marker, 23 ) 
        addEventHandler ( "onClientMarkerHit", marker, onBarcoStopHit ) 
    end 
) 
  
function onBarcoStopHit ( hitPlayer ) 
    if ( getElementType ( hitPlayer ) == "player" ) and ( hitPlayer == localPlayer ) then 
        triggerServerEvent ( "pizza_finishPizz", localPlayer ) 
        if isElement ( blip ) then 
            destroyElement ( blip ) 
        end 
        if isElement ( marker ) then 
            removeEventHandler ( "onClientMarkerHit", marker, onBarcoStopHit ) 
            destroyElement ( marker ) 
        end 
    end 
end 
  
addEventHandler ( "onClientVehicleExit", root, 
    function ( thePlayer ) 
        if ( thePlayer == localPlayer ) then 
            if isElement ( blip ) then 
                destroyElement ( blip ) 
            end 
            if isElement ( marker ) then 
                removeEventHandler ( "onClientMarkerHit", marker, onBarcoStopHit ) 
                destroyElement ( marker ) 
            end 
        end 
    end 
) 
  

Link to comment

اهاا صح والله لكن سويته ذا الحدث ونسخت الكود تحته وحطيت

addEventHandler ( "onClientPlayerWasted", root, 
    function ( thePlayer ) 
        if ( thePlayer == localPlayer ) then 
            if isElement ( blip ) then 
                destroyElement ( blip ) 
            end 
            if isElement ( marker ) then 
                removeEventHandler ( "onClientMarkerHit", marker, onBarcoStopHit ) 
                destroyElement ( marker ) 
            end 
        end 
    end 
) 

Link to comment

addEvent ( "barco_set_locationPizz", true ) 
addEventHandler ( "barco_set_locationPizz", root, 
    function ( x, y, z ) 
        marker = createMarker ( x, y, z - 1, "cylinder", 2.5, 235, 141, 19, 153 ) 
        blip = createBlipAttachedTo ( marker, 23 ) 
        addEventHandler ( "onClientMarkerHit", marker, onBarcoStopHit ) 
    end 
) 
  
function onBarcoStopHit ( hitPlayer ) 
    if ( getElementType ( hitPlayer ) == "player" ) and ( hitPlayer == localPlayer ) then 
        triggerServerEvent ( "pizza_finishPizz", localPlayer ) 
        if isElement ( blip ) then 
            destroyElement ( blip ) 
        end 
        if isElement ( marker ) then 
            removeEventHandler ( "onClientMarkerHit", marker, onBarcoStopHit ) 
            destroyElement ( marker ) 
        end 
    end 
end 
  
addEventHandler ( "onClientPlayerWasted", root, 
    function (    ) 
            if isElement ( blip ) then 
                destroyElement ( blip ) 
            end 
            if isElement ( marker ) then 
                removeEventHandler ( "onClientMarkerHit", marker, onBarcoStopHit ) 
                destroyElement ( marker ) 
        end 
    end 
) 
Link to comment

مافي خطاء

يمكن انا غلطت ب التركيب

شوف ذا كامل

:)

function pe ()     
    if guiGetVisible (GUIEditor.window) == true then 
        else 
        showCursor (true) 
        guiSetVisible (GUIEditor.window,true) 
    end 
end 
addEvent ("MinerPizz", true)  
addEventHandler ("MinerPizz",root, pe)  
  
addEvent ( "barco_set_locationPizz", true ) 
addEventHandler ( "barco_set_locationPizz", root, 
    function ( x, y, z ) 
        marker = createMarker ( x, y, z - 1, "cylinder", 2.5, 235, 141, 19, 153 ) 
        blip = createBlipAttachedTo ( marker, 41 ) 
        addEventHandler ( "onClientMarkerHit", marker, onBarcoStopHit ) 
    end 
) 
  
function onBarcoStopHit ( hitPlayer ) 
    if ( getElementType ( hitPlayer ) == "player" ) and ( hitPlayer == localPlayer ) then 
        triggerServerEvent ( "pizza_finishPizz", localPlayer ) 
        if isElement ( blip ) then 
            destroyElement ( blip ) 
        end 
        if isElement ( marker ) then 
            removeEventHandler ( "onClientMarkerHit", marker, onBarcoStopHit ) 
            destroyElement ( marker ) 
        end 
    end 
end 
  
addEventHandler ( "onClientVehicleExit", root, 
    function ( thePlayer ) 
        if ( thePlayer == localPlayer ) then 
            if isElement ( blip ) then 
                destroyElement ( blip ) 
            end 
            if isElement ( marker ) then 
                removeEventHandler ( "onClientMarkerHit", marker, onBarcoStopHit ) 
                destroyElement ( marker ) 
            end 
        end 
    end 
) 
GUIEditor_Button = {} 
GUIEditor_Grid = {} 
GUIEditor_Marker = {} 
GUIEditor_Window = {} 
vehicleId = {448}--1279.17859 -805.24109 86.12299 
GUIEditor_Marker[1] = createMarker(1224.5068359375, -900.4482421875, 42.898097991943-1,"cylinder",2,255,255,0,255) -- السيارة 
GUIEditor_Marker[2] = createMarker(1209.6396484375, -904.720703125, 43.020980834961,"cylinder",3,255,0,0,0) -- الكلام فوق البيد 
local x,y = guiGetScreenSize() 
local x = x - 208 
local y = y - 321 
GUIEditor_Window[1] = guiCreateWindow(432, 152, 211, 297,"Pizz Job",false) 
guiSetVisible(GUIEditor_Window[1],false) 
guiSetAlpha(GUIEditor_Window[1],1) 
guiWindowSetSizable(GUIEditor_Window[1],false) 
GUIEditor_Grid[1] = guiCreateGridList(9, 22, 192, 228,false,GUIEditor_Window[1]) 
guiGridListSetSelectionMode(GUIEditor_Grid[1],2) 
  
column = guiGridListAddColumn(GUIEditor_Grid[1],"vehicle name",0.9) 
GUIEditor_Button[2] = guiCreateButton(9, 255, 81, 33,"Select",false,GUIEditor_Window[1]) 
GUIEditor_Button[1] = guiCreateButton(127, 255, 74, 33,"Close",false,GUIEditor_Window[1]) 
  
  
  
for i,id in ipairs ( vehicleId ) do 
guiGridListSetItemText ( GUIEditor_Grid[1], guiGridListAddRow( GUIEditor_Grid[1] ), column, getVehicleNameFromModel( id ), false, false ) 
end 
 ------------------------------------------------------------------------------------------------------ 
addEventHandler ("onClientMarkerHit", GUIEditor_Marker[1], 
function( player ) 
    if getPlayerTeam( player ) and getTeamName( getPlayerTeam( player ) ) == 'Pizz' and not isPedInVehicle( player ) and player == localPlayer then 
  
                x999,y999,z999 = getElementPosition( localPlayer ) 
                setElementFrozen ( localPlayer, true ) 
                guiSetVisible(GUIEditor_Window[1],true) 
                showCursor( true ) 
                end 
                end 
                ) 
  
addEventHandler('onClientGUIClick', root, 
function() 
    if ( source == GUIEditor_Button[1] ) then 
        guiSetVisible(GUIEditor_Window[1],false) 
        showCursor( false ) 
        setElementFrozen ( localPlayer, false ) 
    elseif ( source == GUIEditor_Button[2] ) then 
        local name = guiGridListGetItemText( GUIEditor_Grid[1], guiGridListGetSelectedItem ( GUIEditor_Grid[1] ), 1 ) 
        triggerServerEvent('gvoaPizz', getLocalPlayer(), name) 
        guiSetVisible(GUIEditor_Window[1],false) 
        setElementFrozen ( localPlayer, false ) 
        showCursor( false ) 
    end 
end 
) 
 ------------------------------------------------------------------------------------------------------------- 
 ------------------------------------------------------------------------------------------------------------- 
addEventHandler("onClientRender", getRootElement(),  
function() 
 local x, y, z = getElementPosition  (GUIEditor_Marker[2]) 
  local x2, y2, z2 = getElementPosition(localPlayer) 
   if(isLineOfSightClear(x, y, z, x2, y2, z2, true, true, false, true)) then 
    local sx, sy = getScreenFromWorldPosition(x, y, z+2) 
     if(sx) and (sy) then 
     local distance = getDistanceBetweenPoints3D(x, y, z, x2, y2, z2) 
      if(distance < 100) then 
       dxDrawText("Pizz Job", sx, sy, sx, sy, tocolor(255, 255, 0, 1000), 2-(distance/100), "arial", "center", "center") 
       dxDrawText("Pizz Job", sx, sy, sx, sy, tocolor(255, 255, 0, 1000), 2-(distance/100), "arial", "center", "center") 
     end 
   end 
 end 
end) 

Link to comment

function pe ()  
if guiGetVisible (GUIEditor.window) == true then 
else 
showCursor (true) 
guiSetVisible (GUIEditor.window,true) 
end 
end 
addEvent ("MinerPizz", true)  
addEventHandler ("MinerPizz",root, pe)  
  
addEvent ( "barco_set_locationPizz", true ) 
addEventHandler ( "barco_set_locationPizz", root, 
function ( x, y, z ) 
marker = createMarker ( x, y, z - 1, "cylinder", 2.5, 235, 141, 19, 153 ) 
blip = createBlipAttachedTo ( marker, 41 ) 
addEventHandler ( "onClientMarkerHit", marker, onBarcoStopHit ) 
end 
) 
  
function onBarcoStopHit ( hitPlayer ) 
if ( getElementType ( hitPlayer ) == "player" ) and ( hitPlayer == localPlayer ) then 
triggerServerEvent ( "pizza_finishPizz", localPlayer ) 
if isElement ( blip ) then 
destroyElement ( blip ) 
end 
if isElement ( marker ) then 
removeEventHandler ( "onClientMarkerHit", marker, onBarcoStopHit ) 
destroyElement ( marker ) 
end 
end 
end 
  
  
function destroy (  ) 
if isElement ( blip ) then 
destroyElement ( blip ) 
end 
if isElement ( marker ) then 
removeEventHandler ( "onClientMarkerHit", marker, onBarcoStopHit ) 
destroyElement ( marker ) 
end 
end 
  
addEventHandler ("onClientPlayerVehicleExit",root,destroy) 
addEventHandler ( "onClientPlayerWasted", localPlayer,destroy) 
  
GUIEditor_Button = {} 
GUIEditor_Grid = {} 
GUIEditor_Marker = {} 
GUIEditor_Window = {} 
vehicleId = {448}--1279.17859 -805.24109 86.12299 
GUIEditor_Marker[1] = createMarker(1224.5068359375, -900.4482421875, 42.898097991943-1,"cylinder",2,255,255,0,255) -- السيارة 
GUIEditor_Marker[2] = createMarker(1209.6396484375, -904.720703125, 43.020980834961,"cylinder",3,255,0,0,0) -- الكلام فوق البيد 
local x,y = guiGetScreenSize() 
local x = x - 208 
local y = y - 321 
GUIEditor_Window[1] = guiCreateWindow(432, 152, 211, 297,"Pizz Job",false) 
guiSetVisible(GUIEditor_Window[1],false) 
guiSetAlpha(GUIEditor_Window[1],1) 
guiWindowSetSizable(GUIEditor_Window[1],false) 
GUIEditor_Grid[1] = guiCreateGridList(9, 22, 192, 228,false,GUIEditor_Window[1]) 
guiGridListSetSelectionMode(GUIEditor_Grid[1],2) 
  
column = guiGridListAddColumn(GUIEditor_Grid[1],"vehicle name",0.9) 
GUIEditor_Button[2] = guiCreateButton(9, 255, 81, 33,"Select",false,GUIEditor_Window[1]) 
GUIEditor_Button[1] = guiCreateButton(127, 255, 74, 33,"Close",false,GUIEditor_Window[1]) 
  
  
  
for i,id in ipairs ( vehicleId ) do 
guiGridListSetItemText ( GUIEditor_Grid[1], guiGridListAddRow( GUIEditor_Grid[1] ), column, getVehicleNameFromModel( id ), false, false ) 
end 
------------------------------------------------------------------------------------------------------ 
addEventHandler ("onClientMarkerHit", GUIEditor_Marker[1], 
function( player ) 
if getPlayerTeam( player ) and getTeamName( getPlayerTeam( player ) ) == 'Pizz' and not isPedInVehicle( player ) and player == localPlayer then 
  
x999,y999,z999 = getElementPosition( localPlayer ) 
setElementFrozen ( localPlayer, true ) 
guiSetVisible(GUIEditor_Window[1],true) 
showCursor( true ) 
end 
end 
) 
  
addEventHandler('onClientGUIClick', root, 
function() 
if ( source == GUIEditor_Button[1] ) then 
guiSetVisible(GUIEditor_Window[1],false) 
showCursor( false ) 
setElementFrozen ( localPlayer, false ) 
elseif ( source == GUIEditor_Button[2] ) then 
local name = guiGridListGetItemText( GUIEditor_Grid[1], guiGridListGetSelectedItem ( GUIEditor_Grid[1] ), 1 ) 
triggerServerEvent('gvoaPizz', getLocalPlayer(), name) 
guiSetVisible(GUIEditor_Window[1],false) 
setElementFrozen ( localPlayer, false ) 
showCursor( false ) 
end 
end 
) 
------------------------------------------------------------------------------------------------------------- 
------------------------------------------------------------------------------------------------------------- 
addEventHandler("onClientRender", getRootElement(),  
function() 
local x, y, z = getElementPosition (GUIEditor_Marker[2]) 
local x2, y2, z2 = getElementPosition(localPlayer) 
if(isLineOfSightClear(x, y, z, x2, y2, z2, true, true, false, true)) then 
local sx, sy = getScreenFromWorldPosition(x, y, z+2) 
if(sx) and (sy) then 
local distance = getDistanceBetweenPoints3D(x, y, z, x2, y2, z2) 
if(distance < 100) then 
dxDrawText("Pizz Job", sx, sy, sx, sy, tocolor(255, 255, 0, 1000), 2-(distance/100), "arial", "center", "center") 
dxDrawText("Pizz Job", sx, sy, sx, sy, tocolor(255, 255, 0, 1000), 2-(distance/100), "arial", "center", "center") 
end 
end 
end 
end) 
Link to comment

معليش سفاح ضهرت مشكله الان لو انا راكب السياره وخويي ركب السياره

ثم انا نزلت العلامه تختفي للكل اللي بتيم وراكبين السياره

يعني لو واحد نزل تختفي منه العلامه وتختفي من الكل مو منه لحاله :(

Edited by Guest
Link to comment

function pe () 
if guiGetVisible (GUIEditor.window) == true then 
else 
showCursor (true) 
guiSetVisible (GUIEditor.window,true) 
end 
end 
addEvent ("MinerPizz", true) 
addEventHandler ("MinerPizz",root, pe) 
  
addEvent ( "barco_set_locationPizz", true ) 
addEventHandler ( "barco_set_locationPizz", root, 
function ( x, y, z ) 
marker = createMarker ( x, y, z - 1, "cylinder", 2.5, 235, 141, 19, 153 ) 
blip = createBlipAttachedTo ( marker, 41 ) 
addEventHandler ( "onClientMarkerHit", marker, onBarcoStopHit ) 
end 
) 
  
function onBarcoStopHit ( hitPlayer ) 
if ( getElementType ( hitPlayer ) == "player" ) and ( hitPlayer == localPlayer ) then 
triggerServerEvent ( "pizza_finishPizz", localPlayer ) 
if isElement ( blip ) then 
destroyElement ( blip ) 
end 
if isElement ( marker ) then 
removeEventHandler ( "onClientMarkerHit", marker, onBarcoStopHit ) 
destroyElement ( marker ) 
end 
end 
end 
  
  
function destroy (  ) 
if isElement ( blip ) then 
destroyElement ( blip ) 
end 
if isElement ( marker ) then 
removeEventHandler ( "onClientMarkerHit", marker, onBarcoStopHit ) 
destroyElement ( marker ) 
end 
end 
  
addEventHandler ("onClientPlayerVehicleExit",localPlayer,destroy) 
addEventHandler ( "onClientPlayerWasted", localPlayer,destroy) 
  
GUIEditor_Button = {} 
GUIEditor_Grid = {} 
GUIEditor_Marker = {} 
GUIEditor_Window = {} 
vehicleId = {448}--1279.17859 -805.24109 86.12299 
GUIEditor_Marker[1] = createMarker(1224.5068359375, -900.4482421875, 42.898097991943-1,"cylinder",2,255,255,0,255) -- السيارة 
GUIEditor_Marker[2] = createMarker(1209.6396484375, -904.720703125, 43.020980834961,"cylinder",3,255,0,0,0) -- الكلام فوق البيد 
local x,y = guiGetScreenSize() 
local x = x - 208 
local y = y - 321 
GUIEditor_Window[1] = guiCreateWindow(432, 152, 211, 297,"Pizz Job",false) 
guiSetVisible(GUIEditor_Window[1],false) 
guiSetAlpha(GUIEditor_Window[1],1) 
guiWindowSetSizable(GUIEditor_Window[1],false) 
GUIEditor_Grid[1] = guiCreateGridList(9, 22, 192, 228,false,GUIEditor_Window[1]) 
guiGridListSetSelectionMode(GUIEditor_Grid[1],2) 
  
column = guiGridListAddColumn(GUIEditor_Grid[1],"vehicle name",0.9) 
GUIEditor_Button[2] = guiCreateButton(9, 255, 81, 33,"Select",false,GUIEditor_Window[1]) 
GUIEditor_Button[1] = guiCreateButton(127, 255, 74, 33,"Close",false,GUIEditor_Window[1]) 
  
  
  
for i,id in ipairs ( vehicleId ) do 
guiGridListSetItemText ( GUIEditor_Grid[1], guiGridListAddRow( GUIEditor_Grid[1] ), column, getVehicleNameFromModel( id ), false, false ) 
end 
------------------------------------------------------------------------------------------------------ 
addEventHandler ("onClientMarkerHit", GUIEditor_Marker[1], 
function( player ) 
if getPlayerTeam( player ) and getTeamName( getPlayerTeam( player ) ) == 'Pizz' and not isPedInVehicle( player ) and player == localPlayer then 
  
x999,y999,z999 = getElementPosition( localPlayer ) 
setElementFrozen ( localPlayer, true ) 
guiSetVisible(GUIEditor_Window[1],true) 
showCursor( true ) 
end 
end 
) 
  
addEventHandler('onClientGUIClick', root, 
function() 
if ( source == GUIEditor_Button[1] ) then 
guiSetVisible(GUIEditor_Window[1],false) 
showCursor( false ) 
setElementFrozen ( localPlayer, false ) 
elseif ( source == GUIEditor_Button[2] ) then 
local name = guiGridListGetItemText( GUIEditor_Grid[1], guiGridListGetSelectedItem ( GUIEditor_Grid[1] ), 1 ) 
triggerServerEvent('gvoaPizz', getLocalPlayer(), name) 
guiSetVisible(GUIEditor_Window[1],false) 
setElementFrozen ( localPlayer, false ) 
showCursor( false ) 
end 
end 
) 
------------------------------------------------------------------------------------------------------------- 
------------------------------------------------------------------------------------------------------------- 
addEventHandler("onClientRender", getRootElement(), 
function() 
local x, y, z = getElementPosition (GUIEditor_Marker[2]) 
local x2, y2, z2 = getElementPosition(localPlayer) 
if(isLineOfSightClear(x, y, z, x2, y2, z2, true, true, false, true)) then 
local sx, sy = getScreenFromWorldPosition(x, y, z+2) 
if(sx) and (sy) then 
local distance = getDistanceBetweenPoints3D(x, y, z, x2, y2, z2) 
if(distance < 100) then 
dxDrawText("Pizz Job", sx, sy, sx, sy, tocolor(255, 255, 0, 1000), 2-(distance/100), "arial", "center", "center") 
dxDrawText("Pizz Job", sx, sy, sx, sy, tocolor(255, 255, 0, 1000), 2-(distance/100), "arial", "center", "center") 
end 
end 
end 
end) 
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...