Jump to content

استفسار بسيط !


Mando

Recommended Posts

جـرب *

 local pickups = { 
[1]={ -1397.3532714844, - 327.68801879883, 14 }, 
[2]={ 2162.0393066406, 1680.4851074219, 10.8203125 }, 
[3]={ 1816.2468261719, -1902.5074462891, 13.564742088318 }, 
} 
  
local dropoffss = { 
[1]={ 2079.2690429688, 1519.7746582031, 10.82003125, }, 
[2]={ 1481.6596679688, -1737.782470703,13.546875, }, 
[3]={ -1997.6879882813, 283.61083984375, 33.614753723145, }, 
} 
  
local pedCus = { 
[1]={ 9 }, 
[2]={ 13 }, 
[3]={ 31 }, 
[4]={ 41 }, 
[5]={ 56 }, 
[6]={ 0 }, 
[7]={ 14 }, 
[8]={ 15 }, 
[9]={ 19 }, 
[10]={ 18 }, 
} 
  
Teame = createTeam("CilivianWorks", 255,255,0) 
  
taxiTeams = { [Teame] = true } 
taxiVehs = { [420] = true } 
  
function teamSet ( ) 
    local team = getTeamFromName ( "CilivianWorks" ) 
    if team then 
        setPlayerTeam ( source, team ) 
        setElementData( source, "Occupation", "TaxiDriver", true ) 
        setPlayerNametagColor ( source, 255,255,0 ) 
            setElementModel(source, 57) 
            outputChatBox("You are now employed as a Taxi Driver!", source, 255, 0, 0, true) 
        else 
            local teamw = getTeamFromName ( "Taxi Driver" ) 
            if teamw then 
            cancelEvent() 
            outputChatBox("You are already a Taxi driver!", source, 255, 255, 0, true) 
        end 
    end 
end 
addEvent ( "sTeame", true) 
addEventHandler ( "sTeame", root, teamSet ) 
  
markers = { } 
blips = { } 
peds = { } 
mposi = { } 
mposii = {} 
  
  
  
  
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 [ source ] = createBlipAttachedTo ( markers [ source ], 60 ) 
    addEventHandler ( "onMarkerHit", markers [ thePlayer ], warpit ) 
    end 
  
function inVEH ( thePlayer ) 
    if ( getElementType ( thePlayer ) == "player" and isPedInVehicle ( thePlayer ) ) then 
        if ( getElementModel ( source ) == 420 ) 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 ) == 420 ) then 
            setTimer ( warpPedIntoVehicle, 2000, 1, peds [ thePlayer ], vehiclee, 2 ) 
            destroyJob ( thePlayer ) 
            local x, y, z = unpack ( dropoffss [ math.random ( #dropoffss ) ] ) 
            markers [ thePlayer ] = createMarker ( x, y, z - 1, "cylinder", 5.0, 255, 0, 0, 50 ) 
            mposii = { getElementPosition( markers [ thePlayer ] ) } 
            blips [ source ] = createBlipAttachedTo ( blips [ source ], 19 ) 
            addEventHandler ( "onMarkerHit", markers [ thePlayer ], pickmeup ) 
            end 
            end 
        end 
  
  
function pickmeup ( thePlayer ) 
    if ( getElementType ( thePlayer ) == "player" and isPedInVehicle ( thePlayer ) ) then 
        destroyJob ( thePlayer ) 
        local mx, my, mz = unpack ( mposi ) 
        local mmx, mmy, mmz = unpack ( mposii ) 
        local money = getDistanceBetweenPoints2D ( mx, my, mmx, mmy ) 
        finalmoney = math.floor ( money ) 
        if finalmoney then 
        setTimer( givePlayerMoney, 3000, 1, source, finalmoney ) 
        setTimer( outputChatBox, 3000, 1, source, "You have earned ".. money .."!", 0, 144, 0) 
        setTimer ( 
            function ( ) 
                if ( isElement ( peds [ thePlayer ] ) ) then 
                    destroyElement ( peds [ thePlayer ] ) 
                end 
                startJob ( thePlayer ) 
            end 
            ,3000, 1 
        ) 
            end 
        end 
    end 
  
function deleteOnExit ( thePlayer ) 
    if ( isElement ( markers [ thePlayer ] ) ) then 
        destroyElement ( markers [ thePlayer ] ) 
    end 
    if ( isElement ( blips [ source ] ) ) then 
        destroyElement ( blips [ source ] ) 
    end 
    if ( isElement ( peds [ thePlayer ] ) ) then 
        destroyElement ( peds [ thePlayer ] ) 
    end 
end 
addEventHandler ( "onVehicleExit", getRootElement(), deleteOnExit ) 
  
  
function destroyJob ( thePlayer ) 
    if ( isElement ( markers [ thePlayer ] ) ) then 
        destroyElement ( markers [ thePlayer ] ) 
    end 
    if ( isElement ( blips [ source ] ) ) then 
        destroyElement( blips [ source ] ) 
    end 
end 
  
function consoleSetPlayerPosition ( source, commandName, posX, posY, posZ ) 
    setElementPosition ( source, posX, posY, posZ ) 
end 
addCommandHandler ( "setpos", consoleSetPlayerPosition  ) 

* #

Link to comment

العلامات المفروض على اللاعب او البيدا او السيارة او الماركر بالضبط؟

جرب ذا

local pickups = { 
[1]={ -1397.3532714844, - 327.68801879883, 14 }, 
[2]={ 2162.0393066406, 1680.4851074219, 10.8203125 }, 
[3]={ 1816.2468261719, -1902.5074462891, 13.564742088318 }, 
} 
  
local dropoffss = { 
[1]={ 2079.2690429688, 1519.7746582031, 10.82003125, }, 
[2]={ 1481.6596679688, -1737.782470703,13.546875, }, 
[3]={ -1997.6879882813, 283.61083984375, 33.614753723145, }, 
} 
  
local pedCus = { 
[1]={ 9 }, 
[2]={ 13 }, 
[3]={ 31 }, 
[4]={ 41 }, 
[5]={ 56 }, 
[6]={ 0 }, 
[7]={ 14 }, 
[8]={ 15 }, 
[9]={ 19 }, 
[10]={ 18 }, 
} 
  
Teame = createTeam("CilivianWorks", 255,255,0) 
  
taxiTeams = { [Teame] = true } 
taxiVehs = { [420] = true } 
  
function teamSet ( ) 
    local team = getTeamFromName ( "CilivianWorks" ) 
    if team then 
        setPlayerTeam ( source, team ) 
        setElementData( source, "Occupation", "TaxiDriver", true ) 
        setPlayerNametagColor ( source, 255,255,0 ) 
            setElementModel(source, 57) 
            outputChatBox("You are now employed as a Taxi Driver!", source, 255, 0, 0, true) 
        else 
            local teamw = getTeamFromName ( "Taxi Driver" ) 
            if teamw then 
            cancelEvent() 
            outputChatBox("You are already a Taxi driver!", source, 255, 255, 0, true) 
        end 
    end 
end 
addEvent ( "sTeame", true) 
addEventHandler ( "sTeame", root, teamSet ) 
  
markers = { } 
blips = { } 
peds = { } 
mposi = { } 
mposii = {} 
  
  
  
  
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 ], 60 ) 
    addEventHandler ( "onMarkerHit", markers [ thePlayer ], warpit ) 
    end 
  
function inVEH ( thePlayer ) 
    if ( getElementType ( thePlayer ) == "player" and isPedInVehicle ( thePlayer ) ) then 
        if ( getElementModel ( source ) == 420 ) 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 ) == 420 ) then 
            setTimer ( warpPedIntoVehicle, 2000, 1, peds [ thePlayer ], vehiclee, 2 ) 
            destroyJob ( thePlayer ) 
            local x, y, z = unpack ( dropoffss [ math.random ( #dropoffss ) ] ) 
            markers [ thePlayer ] = createMarker ( x, y, z - 1, "cylinder", 5.0, 255, 0, 0, 50 ) 
            mposii = { getElementPosition( markers [ thePlayer ] ) } 
            blips [ thePlayer ] = createBlipAttachedTo ( markers [ thePlayer ], 19 ) 
            addEventHandler ( "onMarkerHit", markers [ thePlayer ], pickmeup ) 
            end 
            end 
        end 
  
  
function pickmeup ( thePlayer ) 
    if ( getElementType ( thePlayer ) == "player" and isPedInVehicle ( thePlayer ) ) then 
        destroyJob ( thePlayer ) 
        local mx, my, mz = unpack ( mposi ) 
        local mmx, mmy, mmz = unpack ( mposii ) 
        local money = getDistanceBetweenPoints2D ( mx, my, mmx, mmy ) 
        finalmoney = math.floor ( money ) 
        if finalmoney then 
        setTimer( givePlayerMoney, 3000, 1, source, finalmoney ) 
        setTimer( outputChatBox, 3000, 1, "You have earned "..finalmoney.."!", thePlayer, 0, 144, 0) 
        setTimer ( 
            function ( ) 
                if ( isElement ( peds [ thePlayer ] ) ) then 
                    destroyElement ( peds [ thePlayer ] ) 
                end 
                startJob ( thePlayer ) 
            end 
            ,3000, 1 
        ) 
            end 
        end 
    end 
  
function deleteOnExit ( thePlayer ) 
    if ( isElement ( markers [ thePlayer ] ) ) then 
        destroyElement ( markers [ thePlayer ] ) 
    end 
    if ( isElement ( blips [ thePlayer ] ) ) then 
        destroyElement ( blips [ thePlayer ] ) 
    end 
    if ( isElement ( peds [ thePlayer ] ) ) then 
        destroyElement ( peds [ thePlayer ] ) 
    end 
end 
addEventHandler ( "onVehicleExit", getRootElement(), deleteOnExit ) 
  
  
function destroyJob ( thePlayer ) 
    if ( isElement ( markers [ thePlayer ] ) ) then 
        destroyElement ( markers [ thePlayer ] ) 
    end 
    if ( isElement ( blips [ thePlayer ] ) ) then 
        destroyElement( blips [ thePlayer ] ) 
    end 
end 
  
function consoleSetPlayerPosition ( source, commandName, posX, posY, posZ ) 
    setElementPosition ( source, posX, posY, posZ ) 
end 
addCommandHandler ( "setpos", consoleSetPlayerPosition  ) 

Link to comment

عندك اخطاء كثير بالأرقمنت

جرب الحين

local pickups = { 
[1]={ -1397.3532714844, - 327.68801879883, 14 }, 
[2]={ 2162.0393066406, 1680.4851074219, 10.8203125 }, 
[3]={ 1816.2468261719, -1902.5074462891, 13.564742088318 }, 
} 
  
local dropoffss = { 
[1]={ 2079.2690429688, 1519.7746582031, 10.82003125, }, 
[2]={ 1481.6596679688, -1737.782470703,13.546875, }, 
[3]={ -1997.6879882813, 283.61083984375, 33.614753723145, }, 
} 
  
local pedCus = { 
[1]={ 9 }, 
[2]={ 13 }, 
[3]={ 31 }, 
[4]={ 41 }, 
[5]={ 56 }, 
[6]={ 0 }, 
[7]={ 14 }, 
[8]={ 15 }, 
[9]={ 19 }, 
[10]={ 18 }, 
} 
  
Teame = createTeam("CilivianWorks", 255,255,0) 
  
taxiTeams = { [Teame] = true } 
taxiVehs = { [420] = true } 
  
function teamSet ( ) 
    local team = getTeamFromName ( "CilivianWorks" ) 
    if team then 
        setPlayerTeam ( source, team ) 
        setElementData( source, "Occupation", "TaxiDriver", true ) 
        setPlayerNametagColor ( source, 255,255,0 ) 
            setElementModel(source, 57) 
            outputChatBox("You are now employed as a Taxi Driver!", source, 255, 0, 0, true) 
        else 
            local teamw = getTeamFromName ( "Taxi Driver" ) 
            if teamw then 
            cancelEvent() 
            outputChatBox("You are already a Taxi driver!", source, 255, 255, 0, true) 
        end 
    end 
end 
addEvent ( "sTeame", true) 
addEventHandler ( "sTeame", root, teamSet ) 
  
markers = { } 
blips = { } 
peds = { } 
mposi = { } 
mposii = {} 
  
  
  
  
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 ], 60 ) 
    addEventHandler ( "onMarkerHit", markers [ thePlayer ], warpit ) 
    end 
  
function inVEH ( thePlayer ) 
    if ( getElementType ( thePlayer ) == "player" and isPedInVehicle ( thePlayer ) ) then 
        if ( getElementModel ( source ) == 420 ) 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 ) == 420 ) then 
            setTimer ( warpPedIntoVehicle, 2000, 1, peds [ thePlayer ], vehiclee, 2 ) 
            destroyJob ( thePlayer ) 
            local x, y, z = unpack ( dropoffss [ math.random ( #dropoffss ) ] ) 
            markers [ thePlayer ] = createMarker ( x, y, z - 1, "cylinder", 5.0, 255, 0, 0, 50 ) 
            mposii = { getElementPosition( markers [ thePlayer ] ) } 
            blips [ thePlayer ] = createBlipAttachedTo ( markers [ thePlayer ], 19 ) 
            addEventHandler ( "onMarkerHit", markers [ thePlayer ], pickmeup ) 
            end 
            end 
        end 
  
  
function pickmeup ( thePlayer ) 
    if ( getElementType ( thePlayer ) == "player" and isPedInVehicle ( thePlayer ) ) then 
        destroyJob ( thePlayer ) 
        local mx, my, mz = unpack ( mposi ) 
        local mmx, mmy, mmz = unpack ( mposii ) 
        local money = getDistanceBetweenPoints2D ( mx, my, mmx, mmy ) 
        finalmoney = math.floor ( money ) 
        if finalmoney then 
        setTimer( givePlayerMoney, 3000, 1, thePlayer, finalmoney ) 
        setTimer( outputChatBox, 3000, 1, "You have earned "..finalmoney.."!", thePlayer, 0, 144, 0) 
        setTimer ( 
            function ( ) 
                if ( isElement ( peds [ thePlayer ] ) ) then 
                    destroyElement ( peds [ thePlayer ] ) 
                    peds [ thePlayer ] = nil 
                end 
                startJob ( thePlayer ) 
            end 
            ,3000, 1 
        ) 
            end 
        end 
    end 
  
function deleteOnExit ( thePlayer ) 
    if ( isElement ( markers [ thePlayer ] ) ) then 
        destroyElement ( markers [ thePlayer ] ) 
        markers [ thePlayer ] = nik 
    end 
    if ( isElement ( blips [ thePlayer ] ) ) then 
        destroyElement ( blips [ thePlayer ] ) 
        blips [ thePlayer ] = nil 
    end 
    if ( isElement ( peds [ thePlayer ] ) ) then 
        destroyElement ( peds [ thePlayer ] ) 
        peds [ thePlayer ] = nil 
    end 
end 
addEventHandler ( "onVehicleExit", getRootElement(), deleteOnExit ) 
  
  
function destroyJob ( thePlayer ) 
    if ( isElement ( markers [ thePlayer ] ) ) then 
        destroyElement ( markers [ thePlayer ] ) 
        markers [ thePlayer ] = nil 
         
    end 
    if ( isElement ( blips [ thePlayer ] ) ) then 
        destroyElement( blips [ thePlayer ] ) 
        blips [ thePlayer ] = nil 
    end 
end 
  
function consoleSetPlayerPosition ( source, commandName, posX, posY, posZ ) 
    setElementPosition ( source, posX, posY, posZ ) 
end 
addCommandHandler ( "setpos", consoleSetPlayerPosition  ) 

EDIT: انسخ الكود مره ثانية سويت تعديل

Link to comment
عندك اخطاء كثير بالأرقمنت

جرب الحين

local pickups = { 
[1]={ -1397.3532714844, - 327.68801879883, 14 }, 
[2]={ 2162.0393066406, 1680.4851074219, 10.8203125 }, 
[3]={ 1816.2468261719, -1902.5074462891, 13.564742088318 }, 
} 
  
local dropoffss = { 
[1]={ 2079.2690429688, 1519.7746582031, 10.82003125, }, 
[2]={ 1481.6596679688, -1737.782470703,13.546875, }, 
[3]={ -1997.6879882813, 283.61083984375, 33.614753723145, }, 
} 
  
local pedCus = { 
[1]={ 9 }, 
[2]={ 13 }, 
[3]={ 31 }, 
[4]={ 41 }, 
[5]={ 56 }, 
[6]={ 0 }, 
[7]={ 14 }, 
[8]={ 15 }, 
[9]={ 19 }, 
[10]={ 18 }, 
} 
  
Teame = createTeam("CilivianWorks", 255,255,0) 
  
taxiTeams = { [Teame] = true } 
taxiVehs = { [420] = true } 
  
function teamSet ( ) 
    local team = getTeamFromName ( "CilivianWorks" ) 
    if team then 
        setPlayerTeam ( source, team ) 
        setElementData( source, "Occupation", "TaxiDriver", true ) 
        setPlayerNametagColor ( source, 255,255,0 ) 
            setElementModel(source, 57) 
            outputChatBox("You are now employed as a Taxi Driver!", source, 255, 0, 0, true) 
        else 
            local teamw = getTeamFromName ( "Taxi Driver" ) 
            if teamw then 
            cancelEvent() 
            outputChatBox("You are already a Taxi driver!", source, 255, 255, 0, true) 
        end 
    end 
end 
addEvent ( "sTeame", true) 
addEventHandler ( "sTeame", root, teamSet ) 
  
markers = { } 
blips = { } 
peds = { } 
mposi = { } 
mposii = {} 
  
  
  
  
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 ], 60 ) 
    addEventHandler ( "onMarkerHit", markers [ thePlayer ], warpit ) 
    end 
  
function inVEH ( thePlayer ) 
    if ( getElementType ( thePlayer ) == "player" and isPedInVehicle ( thePlayer ) ) then 
        if ( getElementModel ( source ) == 420 ) 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 ) == 420 ) then 
            setTimer ( warpPedIntoVehicle, 2000, 1, peds [ thePlayer ], vehiclee, 2 ) 
            destroyJob ( thePlayer ) 
            local x, y, z = unpack ( dropoffss [ math.random ( #dropoffss ) ] ) 
            markers [ thePlayer ] = createMarker ( x, y, z - 1, "cylinder", 5.0, 255, 0, 0, 50 ) 
            mposii = { getElementPosition( markers [ thePlayer ] ) } 
            blips [ thePlayer ] = createBlipAttachedTo ( markers [ thePlayer ], 19 ) 
            addEventHandler ( "onMarkerHit", markers [ thePlayer ], pickmeup ) 
            end 
            end 
        end 
  
  
function pickmeup ( thePlayer ) 
    if ( getElementType ( thePlayer ) == "player" and isPedInVehicle ( thePlayer ) ) then 
        destroyJob ( thePlayer ) 
        local mx, my, mz = unpack ( mposi ) 
        local mmx, mmy, mmz = unpack ( mposii ) 
        local money = getDistanceBetweenPoints2D ( mx, my, mmx, mmy ) 
        finalmoney = math.floor ( money ) 
        if finalmoney then 
        setTimer( givePlayerMoney, 3000, 1, thePlayer, finalmoney ) 
        setTimer( outputChatBox, 3000, 1, "You have earned "..finalmoney.."!", thePlayer, 0, 144, 0) 
        setTimer ( 
            function ( ) 
                if ( isElement ( peds [ thePlayer ] ) ) then 
                    destroyElement ( peds [ thePlayer ] ) 
                end 
                startJob ( thePlayer ) 
            end 
            ,3000, 1 
        ) 
            end 
        end 
    end 
  
function deleteOnExit ( thePlayer ) 
    if ( isElement ( markers [ thePlayer ] ) ) then 
        destroyElement ( markers [ thePlayer ] ) 
    end 
    if ( isElement ( blips [ thePlayer ] ) ) then 
        destroyElement ( blips [ thePlayer ] ) 
    end 
    if ( isElement ( peds [ thePlayer ] ) ) then 
        destroyElement ( peds [ thePlayer ] ) 
    end 
end 
addEventHandler ( "onVehicleExit", getRootElement(), deleteOnExit ) 
  
  
function destroyJob ( thePlayer ) 
    if ( isElement ( markers [ thePlayer ] ) ) then 
        destroyElement ( markers [ thePlayer ] ) 
    end 
    if ( isElement ( blips [ thePlayer ] ) ) then 
        destroyElement( blips [ thePlayer ] ) 
    end 
end 
  
function consoleSetPlayerPosition ( source, commandName, posX, posY, posZ ) 
    setElementPosition ( source, posX, posY, posZ ) 
end 
addCommandHandler ( "setpos", consoleSetPlayerPosition  ) 

مشكور يا TAPL

بس اول لما وصلت الراجل حصلت علي 180

انا عايزه 2000 او الي 1000

عشوائي تقدر ؟

Link to comment
local pickups = { 
[1]={ -1397.3532714844, - 327.68801879883, 14 }, 
[2]={ 2162.0393066406, 1680.4851074219, 10.8203125 }, 
[3]={ 1816.2468261719, -1902.5074462891, 13.564742088318 }, 
} 
  
local dropoffss = { 
[1]={ 2079.2690429688, 1519.7746582031, 10.82003125, }, 
[2]={ 1481.6596679688, -1737.782470703,13.546875, }, 
[3]={ -1997.6879882813, 283.61083984375, 33.614753723145, }, 
} 
  
local pedCus = { 
[1]={ 9 }, 
[2]={ 13 }, 
[3]={ 31 }, 
[4]={ 41 }, 
[5]={ 56 }, 
[6]={ 0 }, 
[7]={ 14 }, 
[8]={ 15 }, 
[9]={ 19 }, 
[10]={ 18 }, 
} 
  
Teame = createTeam("CilivianWorks", 255,255,0) 
  
taxiTeams = { [Teame] = true } 
taxiVehs = { [420] = true } 
  
function teamSet ( ) 
    local team = getTeamFromName ( "CilivianWorks" ) 
    if team then 
        setPlayerTeam ( source, team ) 
        setElementData( source, "Occupation", "TaxiDriver", true ) 
        setPlayerNametagColor ( source, 255,255,0 ) 
            setElementModel(source, 57) 
            outputChatBox("You are now employed as a Taxi Driver!", source, 255, 0, 0, true) 
        else 
            local teamw = getTeamFromName ( "Taxi Driver" ) 
            if teamw then 
            cancelEvent() 
            outputChatBox("You are already a Taxi driver!", source, 255, 255, 0, true) 
        end 
    end 
end 
addEvent ( "sTeame", true) 
addEventHandler ( "sTeame", root, teamSet ) 
  
markers = { } 
blips = { } 
peds = { } 
mposi = { } 
mposii = {} 
  
  
  
  
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 ], 60 ) 
    addEventHandler ( "onMarkerHit", markers [ thePlayer ], warpit ) 
    end 
  
function inVEH ( thePlayer ) 
    if ( getElementType ( thePlayer ) == "player" and isPedInVehicle ( thePlayer ) ) then 
        if ( getElementModel ( source ) == 420 ) 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 ) == 420 ) then 
            setTimer ( warpPedIntoVehicle, 2000, 1, peds [ thePlayer ], vehiclee, 2 ) 
            destroyJob ( thePlayer ) 
            local x, y, z = unpack ( dropoffss [ math.random ( #dropoffss ) ] ) 
            markers [ thePlayer ] = createMarker ( x, y, z - 1, "cylinder", 5.0, 255, 0, 0, 50 ) 
            mposii = { getElementPosition( markers [ thePlayer ] ) } 
            blips [ thePlayer ] = createBlipAttachedTo ( markers [ thePlayer ], 19 ) 
            addEventHandler ( "onMarkerHit", markers [ thePlayer ], pickmeup ) 
            end 
            end 
        end 
  
  
function pickmeup ( thePlayer ) 
    if ( getElementType ( thePlayer ) == "player" and isPedInVehicle ( thePlayer ) ) then 
        destroyJob ( thePlayer ) 
        local mx, my, mz = unpack ( mposi ) 
        local mmx, mmy, mmz = unpack ( mposii ) 
        local money = math.random(1000, 2000) 
        if money then 
        setTimer( givePlayerMoney, 3000, 1, thePlayer, money ) 
        setTimer( outputChatBox, 3000, 1, "You have earned "..money.."!", thePlayer, 0, 144, 0) 
        setTimer ( 
            function ( ) 
                if ( isElement ( peds [ thePlayer ] ) ) then 
                    destroyElement ( peds [ thePlayer ] ) 
                    peds [ thePlayer ] = nil 
                end 
                startJob ( thePlayer ) 
            end 
            ,3000, 1 
        ) 
            end 
        end 
    end 
  
function deleteOnExit ( thePlayer ) 
    if ( isElement ( markers [ thePlayer ] ) ) then 
        destroyElement ( markers [ thePlayer ] ) 
        markers [ thePlayer ] = nik 
    end 
    if ( isElement ( blips [ thePlayer ] ) ) then 
        destroyElement ( blips [ thePlayer ] ) 
        blips [ thePlayer ] = nil 
    end 
    if ( isElement ( peds [ thePlayer ] ) ) then 
        destroyElement ( peds [ thePlayer ] ) 
        peds [ thePlayer ] = nil 
    end 
end 
addEventHandler ( "onVehicleExit", getRootElement(), deleteOnExit ) 
  
  
function destroyJob ( thePlayer ) 
    if ( isElement ( markers [ thePlayer ] ) ) then 
        destroyElement ( markers [ thePlayer ] ) 
        markers [ thePlayer ] = nil 
        
    end 
    if ( isElement ( blips [ thePlayer ] ) ) then 
        destroyElement( blips [ thePlayer ] ) 
        blips [ thePlayer ] = nil 
    end 
end 
  
function consoleSetPlayerPosition ( source, commandName, posX, posY, posZ ) 
    setElementPosition ( source, posX, posY, posZ ) 
end 
addCommandHandler ( "setpos", consoleSetPlayerPosition  ) 

Link to comment
      local pickups = { 
    [1]={ -1397.3532714844, - 327.68801879883, 14 }, 
    [2]={ 2162.0393066406, 1680.4851074219, 10.8203125 }, 
    [3]={ 1816.2468261719, -1902.5074462891, 13.564742088318 }, 
    } 
      
    local dropoffss = { 
    [1]={ 2079.2690429688, 1519.7746582031, 10.82003125, }, 
    [2]={ 1481.6596679688, -1737.782470703,13.546875, }, 
    [3]={ -1997.6879882813, 283.61083984375, 33.614753723145, }, 
    } 
      
    local pedCus = { 
    [1]={ 9 }, 
    [2]={ 13 }, 
    [3]={ 31 }, 
    [4]={ 41 }, 
    [5]={ 56 }, 
    [6]={ 0 }, 
    [7]={ 14 }, 
    [8]={ 15 }, 
    [9]={ 19 }, 
    [10]={ 18 }, 
    } 
      
    Teame = createTeam("CilivianWorks", 255,255,0) 
      
    taxiTeams = { [Teame] = true } 
    taxiVehs = { [420] = true } 
      
    function teamSet ( ) 
        local team = getTeamFromName ( "CilivianWorks" ) 
        if team then 
            setPlayerTeam ( source, team ) 
            setElementData( source, "Occupation", "TaxiDriver", true ) 
            setPlayerNametagColor ( source, 255,255,0 ) 
                setElementModel(source, 57) 
                outputChatBox("You are now employed as a Taxi Driver!", source, 255, 0, 0, true) 
            else 
                local teamw = getTeamFromName ( "Taxi Driver" ) 
                if teamw then 
                cancelEvent() 
                outputChatBox("You are already a Taxi driver!", source, 255, 255, 0, true) 
            end 
        end 
    end 
    addEvent ( "sTeame", true) 
    addEventHandler ( "sTeame", root, teamSet ) 
      
    markers = { } 
    blips = { } 
    peds = { } 
    mposi = { } 
    mposii = {} 
      
      
      
      
    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 ], 60 ) 
        addEventHandler ( "onMarkerHit", markers [ thePlayer ], warpit ) 
        end 
      
    function inVEH ( thePlayer ) 
        if ( getElementType ( thePlayer ) == "player" and isPedInVehicle ( thePlayer ) ) then 
            if ( getElementModel ( source ) == 420 ) 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 ) == 420 ) then 
                setTimer ( warpPedIntoVehicle, 2000, 1, peds [ thePlayer ], vehiclee, 2 ) 
                destroyJob ( thePlayer ) 
                local x, y, z = unpack ( dropoffss [ math.random ( #dropoffss ) ] ) 
                markers [ thePlayer ] = createMarker ( x, y, z - 1, "cylinder", 5.0, 255, 0, 0, 50 ) 
                mposii = { getElementPosition( markers [ thePlayer ] ) } 
                blips [ thePlayer ] = createBlipAttachedTo ( markers [ thePlayer ], 19 ) 
                addEventHandler ( "onMarkerHit", markers [ thePlayer ], pickmeup ) 
                end 
                end 
            end 
      
      
    function pickmeup ( thePlayer ) 
        if ( getElementType ( thePlayer ) == "player" and isPedInVehicle ( thePlayer ) ) then 
            destroyJob ( thePlayer ) 
            local mx, my, mz = unpack ( mposi ) 
            local mmx, mmy, mmz = unpack ( mposii ) 
            local money = math.random(1000, 2000) 
            if money then 
            setTimer( givePlayerMoney, 3000, 1, thePlayer, money ) 
            setTimer( outputChatBox, 3000, 1, "You have earned "..money.."!", thePlayer, 0, 144, 0) 
            setTimer ( 
                function ( ) 
                    if ( isElement ( peds [ thePlayer ] ) ) then 
                        destroyElement ( peds [ thePlayer ] ) 
                        peds [ thePlayer ] = nil 
                    end 
                    startJob ( thePlayer ) 
                end 
                ,3000, 1 
            ) 
                end 
            end 
        end 
      
    function deleteOnExit ( thePlayer ) 
        if ( isElement ( markers [ thePlayer ] ) ) then 
            destroyElement ( markers [ thePlayer ] ) 
            markers [ thePlayer ] = nik -- Here 
        end 
        if ( isElement ( blips [ thePlayer ] ) ) then 
            destroyElement ( blips [ thePlayer ] ) 
            blips [ thePlayer ] = nil 
        end 
        if ( isElement ( peds [ thePlayer ] ) ) then 
            destroyElement ( peds [ thePlayer ] ) 
            peds [ thePlayer ] = nil 
        end 
    end 
    addEventHandler ( "onVehicleExit", getRootElement(), deleteOnExit ) 
      
      
    function destroyJob ( thePlayer ) 
        if ( isElement ( markers [ thePlayer ] ) ) then 
            destroyElement ( markers [ thePlayer ] ) 
            markers [ thePlayer ] = nil 
            
        end 
        if ( isElement ( blips [ thePlayer ] ) ) then 
            destroyElement( blips [ thePlayer ] ) 
            blips [ thePlayer ] = nil 
        end 
    end 
      
    function consoleSetPlayerPosition ( source, commandName, posX, posY, posZ ) 
        setElementPosition ( source, posX, posY, posZ ) 
    end 
    addCommandHandler ( "setpos", consoleSetPlayerPosition  )  

تنيه بسيط بسطر 120

المفروض تكون كذا

markers [ thePlayer ] = nil 

بسطر 120 صايره كذا

markers [ thePlayer ] = nik 

Link to comment
      local pickups = { 
    [1]={ -1397.3532714844, - 327.68801879883, 14 }, 
    [2]={ 2162.0393066406, 1680.4851074219, 10.8203125 }, 
    [3]={ 1816.2468261719, -1902.5074462891, 13.564742088318 }, 
    } 
      
    local dropoffss = { 
    [1]={ 2079.2690429688, 1519.7746582031, 10.82003125, }, 
    [2]={ 1481.6596679688, -1737.782470703,13.546875, }, 
    [3]={ -1997.6879882813, 283.61083984375, 33.614753723145, }, 
    } 
      
    local pedCus = { 
    [1]={ 9 }, 
    [2]={ 13 }, 
    [3]={ 31 }, 
    [4]={ 41 }, 
    [5]={ 56 }, 
    [6]={ 0 }, 
    [7]={ 14 }, 
    [8]={ 15 }, 
    [9]={ 19 }, 
    [10]={ 18 }, 
    } 
      
    Teame = createTeam("CilivianWorks", 255,255,0) 
      
    taxiTeams = { [Teame] = true } 
    taxiVehs = { [420] = true } 
      
    function teamSet ( ) 
        local team = getTeamFromName ( "CilivianWorks" ) 
        if team then 
            setPlayerTeam ( source, team ) 
            setElementData( source, "Occupation", "TaxiDriver", true ) 
            setPlayerNametagColor ( source, 255,255,0 ) 
                setElementModel(source, 57) 
                outputChatBox("You are now employed as a Taxi Driver!", source, 255, 0, 0, true) 
            else 
                local teamw = getTeamFromName ( "Taxi Driver" ) 
                if teamw then 
                cancelEvent() 
                outputChatBox("You are already a Taxi driver!", source, 255, 255, 0, true) 
            end 
        end 
    end 
    addEvent ( "sTeame", true) 
    addEventHandler ( "sTeame", root, teamSet ) 
      
    markers = { } 
    blips = { } 
    peds = { } 
    mposi = { } 
    mposii = {} 
      
      
      
      
    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 ], 60 ) 
        addEventHandler ( "onMarkerHit", markers [ thePlayer ], warpit ) 
        end 
      
    function inVEH ( thePlayer ) 
        if ( getElementType ( thePlayer ) == "player" and isPedInVehicle ( thePlayer ) ) then 
            if ( getElementModel ( source ) == 420 ) 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 ) == 420 ) then 
                setTimer ( warpPedIntoVehicle, 2000, 1, peds [ thePlayer ], vehiclee, 2 ) 
                destroyJob ( thePlayer ) 
                local x, y, z = unpack ( dropoffss [ math.random ( #dropoffss ) ] ) 
                markers [ thePlayer ] = createMarker ( x, y, z - 1, "cylinder", 5.0, 255, 0, 0, 50 ) 
                mposii = { getElementPosition( markers [ thePlayer ] ) } 
                blips [ thePlayer ] = createBlipAttachedTo ( markers [ thePlayer ], 19 ) 
                addEventHandler ( "onMarkerHit", markers [ thePlayer ], pickmeup ) 
                end 
                end 
            end 
      
      
    function pickmeup ( thePlayer ) 
        if ( getElementType ( thePlayer ) == "player" and isPedInVehicle ( thePlayer ) ) then 
            destroyJob ( thePlayer ) 
            local mx, my, mz = unpack ( mposi ) 
            local mmx, mmy, mmz = unpack ( mposii ) 
            local money = math.random(1000, 2000) 
            if money then 
            setTimer( givePlayerMoney, 3000, 1, thePlayer, money ) 
            setTimer( outputChatBox, 3000, 1, "You have earned "..money.."!", thePlayer, 0, 144, 0) 
            setTimer ( 
                function ( ) 
                    if ( isElement ( peds [ thePlayer ] ) ) then 
                        destroyElement ( peds [ thePlayer ] ) 
                        peds [ thePlayer ] = nil 
                    end 
                    startJob ( thePlayer ) 
                end 
                ,3000, 1 
            ) 
                end 
            end 
        end 
      
    function deleteOnExit ( thePlayer ) 
        if ( isElement ( markers [ thePlayer ] ) ) then 
            destroyElement ( markers [ thePlayer ] ) 
            markers [ thePlayer ] = nik -- Here 
        end 
        if ( isElement ( blips [ thePlayer ] ) ) then 
            destroyElement ( blips [ thePlayer ] ) 
            blips [ thePlayer ] = nil 
        end 
        if ( isElement ( peds [ thePlayer ] ) ) then 
            destroyElement ( peds [ thePlayer ] ) 
            peds [ thePlayer ] = nil 
        end 
    end 
    addEventHandler ( "onVehicleExit", getRootElement(), deleteOnExit ) 
      
      
    function destroyJob ( thePlayer ) 
        if ( isElement ( markers [ thePlayer ] ) ) then 
            destroyElement ( markers [ thePlayer ] ) 
            markers [ thePlayer ] = nil 
            
        end 
        if ( isElement ( blips [ thePlayer ] ) ) then 
            destroyElement( blips [ thePlayer ] ) 
            blips [ thePlayer ] = nil 
        end 
    end 
      
    function consoleSetPlayerPosition ( source, commandName, posX, posY, posZ ) 
        setElementPosition ( source, posX, posY, posZ ) 
    end 
    addCommandHandler ( "setpos", consoleSetPlayerPosition  )  

تنيه بسيط بسطر 120

المفروض تكون كذا

markers [ thePlayer ] = nil 

بسطر 120 صايره كذا

markers [ thePlayer ] = nik 

نسور بيكون في فرق ؟؟

Link to comment
اذا ما تعلمها الحين متى يتعلمها -_-

nil = يعني لا شيء

يعني عندك جدول وتخليه يساوي ولا شيء يعني كأنك تحذفه

طيب الحين

يصير شيء لو خليته كذا ماغيرته ؟

شكرآ علي المساعدة

Link to comment
اذا ما تعلمها الحين متى يتعلمها -_-

nil = يعني لا شيء

يعني عندك جدول وتخليه يساوي ولا شيء يعني كأنك تحذفه

طيب الحين

يصير شيء لو خليته كذا ماغيرته ؟

شكرآ علي المساعدة

ياخي وش بينقص منك لو غيرته ؟ :|

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...