Wysłany: 2013-07-10, 12:30
panmajster
Wiek: 42 Na forum: 4787 dni Posty: 154
Nick w MP: NieWazne
Piwa : 124
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
Wysłany: 2013-07-10, 19:37
luki123luki123
Place Game
Wiek: 28 Na forum: 5275 dni Posty: 1948
Nick w MP: LuKiO
Piwa : 6101
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
Wysłany: 2013-07-10, 22:03
panmajster
Wiek: 42 Na forum: 4787 dni Posty: 154
Nick w MP: NieWazne
Piwa : 124
Teraz boty spawnuj? si? nie wiadomo gdzie, i dalej tylko 1 a nie wszystkie
Tagi: praca :: kierowcy :: autobusu
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: