Jump to content

Peds Loading Problem


3B00DG4MER

Recommended Posts

Hi guys,

I tried to make Peds in different Interiors, but it's load only the interior that i'm in

Server File:

  
bots = {} 
function bots.load() 
    for i,v in ipairs(getElementsByType("ped")) do 
        if v:getData("ped:type") == "bot" then 
            v:destroy() 
        end 
    end 
    local query = SQL.Query("SELECT * FROM `bots`") 
    for i=1,#query do 
        local bot = createPed(query[i].skin,query[i].x,query[i].y,query[i].z,query[i].rot,false) 
        bot:setInterior(query[i].int) 
        bot:setDimension(query[i].dim) 
        bot:setData("ped:type","bot") 
        bot:setData("bot:name",query[i].name) 
        bot:setData("bot:isJob",IntToBool(query[i].isjob)) 
     end 
    if #query == 0 then 
        outputDebugString("- SAF - : No bot has been added to the server",3) 
        outputDebugString("- SAF - : Please Check if there's any problem with your MySQL Server",3) 
    else 
        outputDebugString("- SAF - : "..#query.." bot(s) has been added to the server",3) 
    end 
    return query 
end 
bots.load() 
  
  

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...