09-12-2014, 07:45 PM
Your callback is wrong. The first parameter the command callback receives is the Split - the text that the player entered, split at each space. The second parameter is the cPlayer object.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | -- PluginInfo function PluginInfo(a_Split, a_Player) a_Player:SendMessage( "§eSTONED v1.0.0.3" ) return true end -- RollJoint: function RollJoint(a_Split, a_Player) if (a_Split[2] ~= nil ) then -- The player gave us a parameter for the command: cRoot:Get():BroadcastChat( "§b" .. a_Player:GetName() .. " is rolling a joint with an extra " .. a_Split[2] .. " inside." ) else -- There was no parameter, so it's a simple joint: cRoot:Get():BroadcastChat( "§b" .. a_Player:GetName() .. " is rolling a joint." ) end return true end -- SmokeJoint: function SmokeJoint(a_Split, a_Player) cRoot:Get():BroadcastChat( "§b" .. a_Player:GetName() .. " is smoking a joint." ) return true end |