I can't create any commands.
#12
(09-12-2014, 05:59 AM)LO1ZB Wrote: Why do you use the same function for a Hook and a command?
It is called first from the hook, then you after sending the message to the player, you are returning "true", which means "hook successfully executed", if you want that the command get executed, you have to return "false".

I saw it on a wiki example.

In other words, i have no idea what that line of code does it seems, as i thought it was needed to make the command(s) work.
If i change true to false, it executes both commands, on just 1 command..

Painfully obvious by now i am a scripting noob!

(09-12-2014, 06:22 AM)Seadragon91 Wrote: If you want to send a message to all players, you could use broadcast.
cRoot:Get():BroadcastChat()

So in stead of this:

-- RollJoint:
function RollJoint(Player, j)
Player:SendMessage("§b" .. Player:GetName() .. " is rolling a joint.")
return false
end

change it to this: ?

-- RollJoint:
function RollJoint(Player, j)
cRoot:Get():BroadcastChat("§b" .. Player:GetName() .. " is rolling a joint.")
return false
end
Reply
Thanks given by:


Messages In This Thread
I can't create any commands. - by Guandor - 09-06-2014, 12:09 PM
RE: I can't create any commands. - by Seadragon91 - 09-06-2014, 02:42 PM
RE: I can't create any commands. - by xoft - 09-06-2014, 06:49 PM
RE: I can't create any commands. - by Guandor - 09-07-2014, 04:42 AM
RE: I can't create any commands. - by Lo_Pan - 09-12-2014, 03:49 AM
RE: I can't create any commands. - by NiLSPACE - 09-12-2014, 03:55 AM
RE: I can't create any commands. - by Lo_Pan - 09-12-2014, 03:58 AM
RE: I can't create any commands. - by Seadragon91 - 09-12-2014, 04:47 AM
RE: I can't create any commands. - by Lo_Pan - 09-12-2014, 05:04 AM
RE: I can't create any commands. - by LO1ZB - 09-12-2014, 05:59 AM
RE: I can't create any commands. - by Lo_Pan - 09-12-2014, 07:15 AM
RE: I can't create any commands. - by LO1ZB - 09-12-2014, 07:36 AM
RE: I can't create any commands. - by Lo_Pan - 09-12-2014, 08:24 AM
RE: I can't create any commands. - by LO1ZB - 09-12-2014, 08:34 AM
RE: I can't create any commands. - by Lo_Pan - 09-12-2014, 08:52 AM
RE: I can't create any commands. - by LO1ZB - 09-12-2014, 09:25 AM
RE: I can't create any commands. - by Seadragon91 - 09-12-2014, 06:22 AM
RE: I can't create any commands. - by xoft - 09-12-2014, 07:37 PM
RE: I can't create any commands. - by xoft - 09-12-2014, 07:39 PM
RE: I can't create any commands. - by xoft - 09-12-2014, 07:45 PM
RE: I can't create any commands. - by Lo_Pan - 09-13-2014, 12:16 AM



Users browsing this thread: 2 Guest(s)