Jump to content

Little help.


Sparrow

Recommended Posts

Hello all,

Now I do this script, it's accepting servre rules before start playing IG, I got this probleme when I start the script.

[2011-12-06 20:12:27] WARNING: rules\rules_s.lua:43: Bad argument @ 'addEventHandler' [Expected function at argument 3, got nil]

This is server side of the script (rules_s):

function acceptRules(button,state) 
    if button == "left" and state == "up" then 
        guiSetVisible(rulesWindow, false) 
         
        showCursor(false,false) 
         
        outputChatBox("You successfully accept our rules, enjoy playing.") 
  
        if rulesWarningTimer then 
            killTimer(rulesWarningTimer) 
            rulesWarningTimer = nil 
        end 
    end 
end 
  
function inactivePlayer(status) 
    if status == 1 then 
  
        outputChatBox("Please accept our rules or you will be kicked.") 
  
        rulesWarningTimer = setTimer(inactivePlayer,30000,1,2) 
  
    elseif status == 2 then 
  
        outputChatBox("Second Warning: Please accept our rules you will be kicked.") 
  
        rulesWarningTimer = setTimer(inactivePlayer,30000,1,3)   
  
   
    elseif status == 3 then 
  
        outputChatBox("Last Warning: Please accept our rules you will be kicked.") 
  
        rulesWarningTimer = setTimer(inactivePlayer,30000,1,3)  
  
    elseif status == 4 then 
        triggerServerEvent("clientKickInactivePlayer",getLocalPlayer()) 
    end 
end 
  
  
addEvent("clientKickInactivePlayer",true) 
addEventHandler("clientKickInactivePlayer",root,kickInactivePlayer) 

Thank you for your help.

Link to comment
Hello all,

Now I do this script, it's accepting servre rules before start playing IG, I got this probleme when I start the script.

[2011-12-06 20:12:27] WARNING: rules\rules_s.lua:43: Bad argument @ 'addEventHandler' [Expected function at argument 3, got nil]

This is server side of the script (rules_s):

function acceptRules(button,state) 
    if button == "left" and state == "up" then 
        guiSetVisible(rulesWindow, false) 
         
        showCursor(false,false) 
         
        outputChatBox("You successfully accept our rules, enjoy playing.") 
  
        if rulesWarningTimer then 
            killTimer(rulesWarningTimer) 
            rulesWarningTimer = nil 
        end 
    end 
end 
  
function inactivePlayer(status) 
    if status == 1 then 
  
        outputChatBox("Please accept our rules or you will be kicked.") 
  
        rulesWarningTimer = setTimer(inactivePlayer,30000,1,2) 
  
    elseif status == 2 then 
  
        outputChatBox("Second Warning: Please accept our rules you will be kicked.") 
  
        rulesWarningTimer = setTimer(inactivePlayer,30000,1,3)   
  
   
    elseif status == 3 then 
  
        outputChatBox("Last Warning: Please accept our rules you will be kicked.") 
  
        rulesWarningTimer = setTimer(inactivePlayer,30000,1,3)  
  
    elseif status == 4 then 
        triggerServerEvent("clientKickInactivePlayer",getLocalPlayer()) 
    end 
end 
  
  
addEvent("clientKickInactivePlayer",true) 
addEventHandler("clientKickInactivePlayer",root,kickInactivePlayer) 

Thank you for your help.

is this server side?

triggerServerEvent 

is this server side?

getLocalPlayer() 

is this server side?

guiSetVisible(rulesWindow, false) 

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