Jump to content

ارجو المساعده فى اسرع وقت


Recommended Posts

سعدونى بسرعه لو سمحتو

انا اريد عندما اللاعب يحصل عالى الوظفيه هو فقط من يستطع رأية الماركرس و البلب

لكن اللاعبين الاخرين لا يرون ذلك الا اذا دخلو الوظيفة

ياريت تسعدونى بسرعه وتضحو لى ما هى الاخطاء فى الاسكربت التى تم تعدلها

  
  
local Markers = { 
[1]={ 1819.35986, -2430.48096, 13.55469 }, 
[2]={ -1306.38330, -249.23454, 14.14844 }, 
[3]={ 365.97522, 2536.92969, 16.66176 }, 
[4]={ 1557.38379, 1392.78687, 10.85596 } 
} 
  
  
  
local Markere = { 
[1]={ 1983.82495, -2627.80347, 12.54688 }, 
[2]={ -1275.60242, 19.60469, 13.14844 }, 
[3]={ 268.06848, 2464.47119, 15.47656 }, 
[4]={ 11533.20911, 1775.58008, 9.82031 } 
} 
  
  
  
local pedCus = { 
[1]={ 9 }, 
[2]={ 10 }, 
[3]={ 14 } 
} 
  
theteam = createTeam("Driver", 255, 255, 0) 
  
Teams = { [theteam] = true } 
Vehs = { [487 or 593] = true } 
  
function Teamin ( ) 
    local team = getTeamFromName ( "Driver" ) 
    if team then 
        setPlayerTeam ( source, team ) 
        setPlayerNametagColor ( source, 0, 255, 0 ) 
     
        outputChatBox("انت الان طيار", source) 
    end      
end 
  
addEvent ( "JoTeam", true) 
addEventHandler ( "JoTeam", root, Teamin ) 
  
  
---------------------------- 
  
function enterVehicle ( thePlayer, seat, jacked ) 
    if getElementType ( thePlayer ) == "player" then 
        if ( Vehs[getElementModel ( source )] ) and ( not Teams[getPlayerTeam( thePlayer )] ) then  
        removePedFromVehicle( thePlayer ) 
        outputChatBox("الطيار فقط من يستطع القياده", thePlayer) 
              end 
    end 
end 
addEventHandler ( "onVehicleEnter", getRootElement(), enterVehicle ) 
------------------------------ 
  
markert = { } 
blipt = { } 
pedt = { } 
cuss = { } 
cuse = {} 
  
  
function startJob ( thePlayer ) 
    local x, y, z = unpack ( Markers [ math.random ( #Markers ) ] ) 
    markert [ thePlayer ] = createMarker ( x, y, z, "cylinder", 5.0, 255, 0, 0, 0 ) 
    cuss = { getElementPosition( markert [ thePlayer ] ) } 
    local skins = unpack ( pedCus [ math.random ( #pedCus ) ] ) 
    pedt [ thePlayer ] = createPed( skins, x, y, z )  
  
    blipt [ thePlayer ] = createBlipAttachedTo ( markert [ thePlayer ], 58 ) 
    addEventHandler ( "onMarkerHit", markert [ thePlayer ], warpit ) 
    end 
     
function inVEH ( thePlayer ) 
    if ( getElementType ( thePlayer ) == "player" and isPedInVehicle ( thePlayer ) ) then 
        if ( getElementModel ( source ) == 487 or 593) then 
            startJob ( thePlayer ) 
        end 
    end 
end 
addEventHandler ( "onVehicleEnter", getRootElement(), inVEH ) 
  
function warpit ( thePlayer ) 
  
 if ( getElementType ( thePlayer ) == "player" and isPedInVehicle ( thePlayer ) ) then 
       local vehiclee = getPedOccupiedVehicle ( thePlayer ) 
        if ( getElementModel ( vehiclee ) == 487 or 593 ) then 
            setTimer ( warpPedIntoVehicle, 500, 1, pedt [ thePlayer ], vehiclee, 2 ) 
            destroyJob ( thePlayer ) 
            local x, y, z = unpack ( Markere [ math.random ( #Markere ) ] ) 
            markert [ thePlayer ] = createMarker ( x, y, z - 1, "cylinder", 5.0, 255, 0, 0, 50 ) 
             
            cuse = { getElementPosition( markert [ thePlayer ] ) } 
            blipt [ thePlayer ] = createBlipAttachedTo ( markert [ thePlayer ], 56 ) 
            addEventHandler ( "onMarkerHit", markert [ thePlayer ], pickmeup ) 
            end 
            end 
        end 
         
function pickmeup ( thePlayer ) 
    if ( getElementType ( thePlayer ) == "player" and isPedInVehicle ( thePlayer ) ) then 
        destroyJob ( thePlayer ) 
        local mx, my, mz = unpack ( cuss ) 
        local mmx, mmy, mmz = unpack ( cuse ) 
        local money = getDistanceBetweenPoints2D ( mx, my, mmx, mmy ) 
        finalmoney = 2 * math.floor ( money ) 
        if finalmoney then 
        setTimer( givePlayerMoney, 500, 1, thePlayer, finalmoney ) 
        setTimer ( 
            function ( ) 
                if ( isElement ( pedt [ thePlayer ] ) ) then 
                    destroyElement ( pedt [ thePlayer ] ) 
                end 
                startJob ( thePlayer ) 
            end 
            ,500, 1 
        ) 
            end 
        end 
    end 
  
     
function deleteOnExit ( thePlayer ) 
    if ( isElement ( markert [ thePlayer ] ) ) then 
        destroyElement ( markert [ thePlayer ] ) 
    end 
    if ( isElement ( blipt [ thePlayer ] ) ) then 
        destroyElement ( blipt [ thePlayer ] ) 
    end 
    if ( isElement ( pedt [ thePlayer ] ) ) then 
        destroyElement ( pedt [ thePlayer ] ) 
    end 
end 
addEventHandler ( "onVehicleExit", getRootElement(), deleteOnExit ) 
  
  
function destroyJob ( thePlayer ) 
    if ( isElement ( markert [ thePlayer ] ) ) then 
        destroyElement ( markert [ thePlayer ] ) 
    end 
    if ( isElement ( blipt [ thePlayer ] ) ) then 
        destroyElement( blipt [ thePlayer ] ) 
    end 
end 
-------------------------------------------------------- 
  
addEvent("driver1",true) 
addEventHandler("driver1",root, 
function () 
  
setPedSkin ( source, 253 ) 
  
end 
) 
----------------------------------- 
addEvent("driver2",true) 
addEventHandler("driver2",root, 
function () 
  
setPedSkin ( source, 297 ) 
  
end 
) 
  
----------------------- 
addEvent("car1",true) 
addEventHandler("car1",root, 
function () 
  
if ( isElement ( vehicle ) ) then destroyElement ( vehicle ) end 
vehicle = createVehicle ( 487, 1948.95215, -2284.68774, 13.54688 ) 
warpPedIntoVehicle ( source, vehicle ) 
end 
) 
  
------------------------------------ 
addEvent("car2",true) 
addEventHandler("car2",root, 
function () 
  
if ( isElement ( vehicle ) ) then destroyElement ( vehicle ) end 
vehicle = createVehicle ( 593, 1948.95215, -2284.68774, 13.54688 ) 
warpPedIntoVehicle ( source, vehicle ) 
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...