What's wrong with my code?
#1
What's wrong with this code?
Code:
function Initialize(Plugin)
       PLUGIN = Plugin

    Plugin:SetName( "MoreCommands" )
    Plugin:SetVersion( 1 )

       PluginManager = cRoot:Get():GetPluginManager()

       PluginManager:BindCommand("/kill",    "morecommands.kill",    HandleKillCommand,    " - Kill some player");
       LOG("Initialized " .. PLUGIN:GetName() .. " v" .. PLUGIN:GetVersion())
    return true
end

function HandleKillCommand( Split, Player )
       local OtherPlayer = OtherPlayer:GetName()

       if Split[2] == nil then
           Player:SendMessage( cChatColor.Green .. "Usage: /kill [Player]" )
       end
       if OtherPlayer == Split[2] then
        OtherPlayer:TakeDamage( 100 , Player )    
           return true
    end
end
Reply
Thanks given by:


Messages In This Thread
What's wrong with my code? - by tonibm19 - 04-28-2013, 09:04 PM
RE: What's wrong with my code? - by NiLSPACE - 04-28-2013, 09:46 PM
RE: What's wrong with my code? - by xoft - 04-28-2013, 11:40 PM
RE: What's wrong with my code? - by tonibm19 - 04-29-2013, 04:14 AM
RE: What's wrong with my code? - by NiLSPACE - 04-29-2013, 04:20 AM
RE: What's wrong with my code? - by tonibm19 - 04-29-2013, 04:24 AM
RE: What's wrong with my code? - by xoft - 04-29-2013, 04:38 AM
RE: What's wrong with my code? - by tonibm19 - 04-29-2013, 04:41 AM



Users browsing this thread: 1 Guest(s)