devil666 Posted March 20, 2009 Share Posted March 20, 2009 Im having a problem with a Vote Kick Script i Made and i dose not give a Error or any thang it just dont kick people here is what i have! function KickPlayer ( Player ) username = getClientName ( Player ) if ( VoteKick ~= nil ) then executeCommandHandler ( VoteKick.. username ) end end addCommandHandler( "Kick", KickPlayer ) some one Please help Me please Link to comment
eAi Posted March 20, 2009 Share Posted March 20, 2009 http://development.mtasa.com/index.php? ... erFromNick not getClientName. Link to comment
50p Posted March 20, 2009 Share Posted March 20, 2009 What VoteKick is? Is it "/votekick" or "/votekick "? Or maybe something else? Link to comment
devil666 Posted March 20, 2009 Author Share Posted March 20, 2009 it is /votekick o0o0o and that for that help but now im getting bad argument @ getPlayerFromNick Link to comment
50p Posted March 20, 2009 Share Posted March 20, 2009 I still don't know whether it's "/votekick" or "/votekick " because that's HUGE difference. If you do VoteKick..username and VoteKick = "/votekick" then it will be "/votekickSomename" which is completely different command. Pay attention to your scripts and even what I'm asking you for since repeating the same question is just wasting time for me You shouldn't concatenate command with username anyway. Just tend to read wiki and you'll have answers to your questions faster then waiting for us to answer your questions. executeCommandHandler ( string commandName, player thePlayer, [ string args ] ) Required Arguments * commandName: The name of the command you wish to execute. This is what must be typed into the console to trigger the function. * thePlayer: The player that will be presented as executer of the command to the handler function(s) of the command * args: Additional parameters that will be passed to the handler function(s) of the command that is called. I'm not going to quote wiki anymore... just get used to wiki and add it to your favourites (bookmarks). We are giving answers to all of the scripting questions from wiki. Link to comment
devil666 Posted March 20, 2009 Author Share Posted March 20, 2009 see that is the thang i just started scripting and idk what wiki is Link to comment
50p Posted March 20, 2009 Share Posted March 20, 2009 The wiki is an online encyclopedia where everyone can modify pages. http://development.mtasa.com/index.php?title=Main_Page Use it as usually as you need scripting help. It tells you what functions you can use in your scripts. Here is a "Programming in Lua" online book: http://www.lua.org/pil/index.html read this to learn Lua syntax. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now