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

Wysłany: 2019-03-09, 16:02


BoomEq







Wiek: 35
Na forum: 3522 dni
Posty: 101
Nick w MP: BoomEqqq

Piwa: 20

Respekt: 70

DB3:
 call failed to call 'slothbot:spawnBot' [string "?"


server:
 exports["slothbot"]:spawnBot (-755.00, -131.9965.839011700nil31"hunting"nil


funkcja w slothbocie:
 
function spawnBot(xyzrotskininteriordimensionteamweaponmodemodesubject)
--checks the function commands to see if all neccesary parts are filledsets defaults if not or returns false.
    if not x then return false end
    if not y then return false end
    if not z then return false end
    if not rot then return false end
    if not skin then skin 0 end
    if not interior then interior 0 end
    if not dimension then dimension 0 end
    if isElement(team) == false then team nil end
    if not weapon then weapon 0 end
    if not mode then mode "hunting" end
    if not modesubject then modesubject nil end
    if mode == "following" then
        if not modesubject then return false end
    end
    if mode == "chasing" then
        if not modesubject then return false end
    end
    local slothbot createPed (tonumber(skin),tonumber(x),tonumber(y),tonumber(z))--spawns the ped
    setElementData(slothbot,"slothbot",true)
    if (slothbot ~= falsethen
        triggerEvent "onBotSpawned"slothbot )        
        --setTimer setElementData2001slothbot"slothbot"true ) -- makes it a bot
        
        setTimer setElementData2001slothbot"AllowFire"true ) -- makes it able to shoot when it wants
        setTimer assigncontroller3001slothbot ) --sets the bots controller
        setTimer giveWeapon8001slothbottonumber(weapon), 99999true ) --gives the weapon
        setElementData(slothbot"BotWeapon"tonumber(weapon))
        if team ~= nil then
            setElementData(slothbot"BotTeam"team)
        end
        setTimer setElementInterior1001slothbottonumber(interior)) --sets interior
        setTimer setElementDimension1001slothbottonumber(dimension)) --sets dimension
        
        --sets the mode
        if mode == "waiting" then
            setTimer setElementData6001slothbot"status""waiting")
        elseif mode == "following" then
            setTimer setElementData4001slothbot"leader"modesubject )
            setTimer setElementData6001slothbot"status""following")
        elseif mode == "chasing" then
            setTimer setElementData4001slothbot"target"modesubject )
            setTimer setElementData6001slothbot"status""chasing")
        elseif mode == "guarding" then
            setTimer setBotGuard4001slothbotxyz)
        else
            setTimer setElementData6001slothbot"status""hunting")
        end
        return slothbot
    end
end
 


Co jest zle?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2019-03-12, 20:08


borsuk







Wiek: 17
Na forum: 3547 dni
Posty: 468

Piwa: 15622

Respekt: 412
Respekt: 412

Ostrzeżeń: 80%
Napewno dobry side i skrypt uruchomiony? Np. funkcja jest z cside to nie mozesz jej uzyc w sside, te? kiedy? na tym si? wywali?em i szuka?em b?edu kilka minut

Postaw piwo autorowi tego posta
 

 
Wysłany: 2019-03-13, 20:37


BoomEq







Wiek: 35
Na forum: 3522 dni
Posty: 101
Nick w MP: BoomEqqq

Piwa: 20

Respekt: 70

Dobra ju? sam ogarn??em, mo?na close

Postaw piwo autorowi tego posta
 

 
Tagi: export :: slothbota
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