Jump to content

تصحيح كود بسيط


Recommended Posts

انا عملت مود و كل اشي بس في مشكلة لما ياخذ الوظيفة و السيارة و يجيلو علامة بالخرية لازم يرحلها

بس المشكلة انو العلامة بتظهر عند الكل انا بدي ياها تظهر عند الشخص الي بالطيارة بس ممكن مساعدة ؟

function startJob ( thePlayer ) 
    local x, y, z = unpack ( pickups [ math.random ( #pickups ) ] ) 
    markers [ thePlayer ] = createMarker ( x, y, z, "cylinder", 5.0, 255, 0, 0, 0 ) 
    mposi = { getElementPosition( markers [ thePlayer ] ) } 
    local skins = unpack ( pedCus [ math.random ( #pedCus ) ] ) 
    peds [ thePlayer ] = createPed( skins, x, y, z )   
    blips [ thePlayer ] = createBlipAttachedTo ( markers [ thePlayer ], 58 ) 
    addEventHandler ( "onMarkerHit", markers [ thePlayer ], warpit ) 
    end 

Link to comment

هذا دليل انكم تآخذون الاكواد على الطاير ! ليه ما تاخذ من وقت دقيقه وتدخل الويكي وتشوف السينتاكس؟

blip createBlipAttachedTo ( element elementToAttachTo, [int icon=0, int size=2, int r=255, int g=0, int b=0,  
int a=255, int ordering=0, float visibleDistance=99999.0, visibleTo = getRootElement()] ) 

visibleTo: What elements can see the blip. Defaults to visible to everyone. See visibility.

Link to comment
انا عملت مود و كل اشي بس في مشكلة لما ياخذ الوظيفة و السيارة و يجيلو علامة بالخرية لازم يرحلها

بس المشكلة انو العلامة بتظهر عند الكل انا بدي ياها تظهر عند الشخص الي بالطيارة بس ممكن مساعدة ؟

function startJob ( thePlayer ) 
    local x, y, z = unpack ( pickups [ math.random ( #pickups ) ] ) 
    markers [ thePlayer ] = createMarker ( x, y, z, "cylinder", 5.0, 255, 0, 0, 0 ) 
    mposi = { getElementPosition( markers [ thePlayer ] ) } 
    local skins = unpack ( pedCus [ math.random ( #pedCus ) ] ) 
    peds [ thePlayer ] = createPed( skins, x, y, z )   
    blips [ thePlayer ] = createBlipAttachedTo ( markers [ thePlayer ], 58 ) 
    addEventHandler ( "onMarkerHit", markers [ thePlayer ], warpit ) 
    end 

:?::roll:

Link to comment

اممم بدآل مآتسآعدون الرجآل تطقطقون عليه :/

مو غريبهه اي واحد مبتدآ بيكون حاط كودد مخربطط :/

مآفيهه انسآن مآصآرت لهه : /

على العمومم

يآصآحب الموضوع وش تبي بزبط انا اسويهه لكك

Link to comment

انا زبطتهآ لكك انكك تآخذ موتر اول ماتضغط الزر

ويوديكك لمكآن

+

يحط علامةة في الخريطةة

Cilent

  
  
local Blip = {} 
  
addEventHandler("onClientGUIClick",root, 
    function ( ) 
        if ( source == GUIEditor_Button[1] ) then 
           triggerServerEvent ( 'tr1, localPlayer ) 
          Blip = createBlip ( 3729.4753417969, -1065.9661865234, 18.897346496582, 55 ) 
        guiSetVisible ( GUIEditor_Window[1], false )   
       showCursor(false)   
       guiSetInputEnabled(false) 
            end 
        end 
    ) 
 

Server

local enksar = {} 
  
addEvent("tr1", true) 
addEventHandler("tr1",root,function() 
    if isElement(enksar[source]) then destroyElement(enksar[source]) end 
          local x, y, z = getElementPosition ( source ) 
          enksar[source] = createVehicle ( 459, 3477.0383300781, -1120.0672607422, 19.0672607422 ) 
         warpPedIntoVehicle ( source, enksar[source] ) 
         setElementRotation(enksar[source], 0,0,270 ) 
end 
 ) 

Link to comment
انا زبطتهآ لكك انكك تآخذ موتر اول ماتضغط الزر

ويوديكك لمكآن

+

يحط علامةة في الخريطةة

Cilent

  
  
local Blip = {} 
  
addEventHandler("onClientGUIClick",root, 
    function ( ) 
        if ( source == GUIEditor_Button[1] ) then 
           triggerServerEvent ( 'tr1, localPlayer ) 
          Blip = createBlip ( 3729.4753417969, -1065.9661865234, 18.897346496582, 55 ) 
        guiSetVisible ( GUIEditor_Window[1], false )   
       showCursor(false)   
       guiSetInputEnabled(false) 
            end 
        end 
    ) 
  
  
 

Server

local enksar = {} 
  
addEvent("tr1", true) 
addEventHandler("tr1",root,function() 
    if isElement(enksar[source]) then destroyElement(enksar[source]) end 
          local x, y, z = getElementPosition ( source ) 
          enksar[source] = createVehicle ( 459, 3477.0383300781, -1120.0672607422, 19.0672607422 ) 
         warpPedIntoVehicle ( source, enksar[source] ) 
         setElementRotation(enksar[source], 0,0,270 ) 
end 
 ) 

:bazooka::bazooka::bazooka::bazooka::bazooka::bazooka::bazooka::bazooka::bazooka::bazooka::bazooka::bazooka::bazooka::bazooka::bazooka: :bazooka:

Link to comment
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

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