Jump to content

[HELP] with code


mohammed21999

Recommended Posts

function maintance () 
local players = getElementsByType ( "player" ) 
for theKey,thePlayer in ipairs(players) do 
 banPlayer(getPlayerFromName ( players ), false, false, true, getRootElement(), "banned for maintaince")  
 end 
end 
addCommandHandler("maintainceban", adminrules) 

guys where's the problem here?

Try this:

function maintance () 
local players = getElementsByType ( "player" ) 
for theKey,thePlayer in ipairs(players) do 
 banPlayer(thePlayer, false, false, true, getRootElement(), "banned for maintaince") 
 end 
end 
addCommandHandler("maintainceban", adminrules) 

Link to comment
function maintance () 
local players = getElementsByType ( "player" ) 
for theKey,thePlayer in ipairs(players) do 
 banPlayer(getPlayerFromName ( players ), false, false, true, getRootElement(), "banned for maintaince")  
 end 
end 
addCommandHandler("maintainceban", adminrules) 

guys where's the problem here?

Try this:

function maintance () 
local players = getElementsByType ( "player" ) 
for theKey,thePlayer in ipairs(players) do 
 banPlayer(thePlayer, false, false, true, getRootElement(), "banned for maintaince") 
 end 
end 
addCommandHandler("maintainceban", adminrules) 

You are missing function's parameters.

function maintance (thePlayer, command, arg1, arg2) -- You just gonna use thePlayer, does not necessary implement any other. 

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