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: 43
Na forum: 4928 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 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
 
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 ( 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 ], 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: 5416 dni
Posty: 1948
Nick w MP: LuKiO

Piwa: 6103

Respekt: 611
Respekt: 611Respekt: 611

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
 
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 ( warpPedIntoVehicle, 2000, 1, 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 ], 41 )
            addEventHandler ( "onMarkerHit", markers [ thePlayer ], pickmeup )
            end
            end
        end


Postaw piwo autorowi tego posta
 

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


panmajster







Wiek: 43
Na forum: 4928 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 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