Jump to content

[HELP]Define arguments in a command


Recommended Posts

Hello, Im trying to mading a script who creates bots whit the weapon who copies you in the comand this is the script

function SpawnHunter ( player, wep ) 
wep = tonumber(wep) 
if wep then 
local x,y,z = getElementPosition ( player ) 
local accountname = getAccountName ( getPlayerAccount ( player ) ) 
    if isObjectInACLGroup ( "user.".. accountname, aclGetGroup ( "Admin" ) ) then 
exports [ "slothbot" ]:spawnBot ( x, y, z, 90, 288, 0, 0, locos, wep, "guarding", true ) 
end 
end 
end 
addCommandHandler("spawnbot", SpawnHunter) 
  

But doesnt work. Thanks a lot.

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...