Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.
GTAONLINE.PL
Tematy otagowane jako: slothbota
1. export do slothbota
DB3:
[lua] call failed to call 'slothbot:spawnBot' [string "?"] [/lua]

server:
[lua] exports["slothbot"]:spawnBot (-755.00, -131.99, 65.83, 90, 117, 0, 0, nil, 31, "hunting", nil) [/lua]

funkcja w slothbocie:
[lua]
function spawnBot(x, y, z, rot, skin, interior, dimension, team, weapon, mode, modesubject)
--checks the function commands to see if all neccesary parts are filled, sets 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 ~= false) then
triggerEvent ( "onBotSpawned", slothbot )
--setTimer ( setElementData, 200, 1, slothbot, "slothbot", true ) -- makes it a bot

setTimer ( setElementData, 200, 1, slothbot, "AllowFire", true ) -- makes it...