Jump to content

HELP-ME ! :(


Dinossauro

Recommended Posts

Posted

Hello

A user, Twix!, Made a script that works the way then.

Players write: / exit and 5 seconds later come out!

function KickPlayer(thePlayer,reason) 
    kickPlayer ( thePlayer, "Console", reason ) 
end 
  
function kickPlayerHandler ( sourcePlayer, commandname, kickedname, reason ) 
    local reason = "You came out successfully." 
    outputChatBox ( "You will leave the server, in 5 seconds" ) 
    setTimer ( KickPlayer, 5000, 1, sourcePlayer,reason ) 
end 
addCommandHandler ( "exit", kickPlayerHandler) 

So I wanted someone writing / exit, munitions weapons were stored.

And who wrote / reconnect and / quit, did not have the ammunition stored.

Help me!

Posted

Just a note, you should use an isElement check on 'thePlayer' in the KickPlayer function. You will get errors if you begin the timer and then the player quits.

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