Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2013-07-10, 12:30


panmajster







Wiek: 42
Na forum: 4786 dni
Posty: 154
Nick w MP: NieWazne

Piwa: 124

Respekt: 50

Witajcie.

Mam system na prac? w taxi i tam boty si? pojawiaj? w jaki? tam miejscach, a jak zrobi? w systemie pracy kierowcy autobusu ?eby boty wszystkie by?y wy?wietlone ?

Oto kod z tych bot?w [chyba] :


function startJob thePlayer )
    local xyunpack pickups math.random #pickups ) ] )
    markers thePlayer ] = createMarker xyz"cylinder"5.025500)
    mposi = { getElementPositionmarkers thePlayer ] ) }
    local skins unpack pedCus math.random #pedCus ) ] )
    peds thePlayer ] = createPedskinsxy)  
    blips thePlayer ] = createBlipAttachedTo markers thePlayer ], 58 )
    addEventHandler "onMarkerHit"markers thePlayer ], warpit )
    end
 
function inVEH thePlayer )
    if ( getElementType thePlayer ) == "player" and isPedInVehicle thePlayer ) ) then
        if ( getElementModel source ) == 431 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 ) == 431 then
            setTimer warpPedIntoVehicle20001peds thePlayer ], vehiclee)
            destroyJob thePlayer )
            local xyunpack dropoffss math.random #dropoffss ) ] )
            markers thePlayer ] = createMarker xy1"cylinder"5.02550050 )
            mposii = { getElementPositionmarkers thePlayer ] ) }
            blips thePlayer ] = createBlipAttachedTo markers thePlayer ], 41 )
            addEventHandler "onMarkerHit"markers thePlayer ], pickmeup )
            end
            end
        end


Jaki? timer trzeba usun?? ? Chodzi o to aby wszystkie boty by?y, a nie ?eby si? spawnowa?y w r??nych miejscach.

Pozdrawiam :)

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-07-10, 19:37


luki123luki123

Place Game






Wiek: 28
Na forum: 5275 dni
Posty: 1948
Nick w MP: LuKiO

Piwa: 6101

Respekt: 611
Respekt: 611Respekt: 611

function startJob thePlayer )
    local xyunpack pickups math.random #pickups ) ] )
    markers thePlayer ] = createMarker xyz"cylinder"5.025500)
    mposi = { getElementPositionmarkers thePlayer ] ) }
    local skins unpack pedCus math.random #pedCus ) ] )
    peds thePlayer ] = createPedskinsxy)  
    blips thePlayer ] = createBlipAttachedTo markers thePlayer ], 58 )
    addEventHandler "onMarkerHit"markers thePlayer ], warpit )
    end
 
function inVEH thePlayer )
    if ( getElementType thePlayer ) == "player" and isPedInVehicle thePlayer ) ) then
        if ( getElementModel source ) == 431 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 ) == 431 then
            setTimer warpPedIntoVehicle20001vehiclee)
            destroyJob thePlayer )
            local xyunpack dropoffss math.random #dropoffss ) ] )
            markers thePlayer ] = createMarker xy1"cylinder"5.02550050 )
            mposii = { getElementPositionmarkers thePlayer ] ) }
            blips thePlayer ] = createBlipAttachedTo markers thePlayer ], 41 )
            addEventHandler "onMarkerHit"markers thePlayer ], pickmeup )
            end
            end
        end


Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-07-10, 22:03


panmajster







Wiek: 42
Na forum: 4786 dni
Posty: 154
Nick w MP: NieWazne

Piwa: 124

Respekt: 50

Teraz boty spawnuj? si? nie wiadomo gdzie, i dalej tylko 1 a nie wszystkie ;(

Postaw piwo autorowi tego posta
 

 
Tagi: praca :: kierowcy :: autobusu
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » Praca kierowcy autobusu Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku