Old 03-28-2009   #1
Ghost Dog 13
Registered User
 
Join Date: Mar 2009
Posts: 8
Ghost Dog 13 is an unknown quantity at this point
Help... Newbie in Scripting of Lua! :P

Hey Guys....

I need your help....

I want to create 2 simple commands...

1 must be "/l text" and will apear as ("User" says: text)
(Commands "l" and "local")

And the other must be

Command= "/p text" and apear as (User: )
Commands "p" and "public")

I tried creating them by jacking the "me" command but no success lol...

Here's what I currently Use:

Code:
function Chat(PlayerID,Text)
	outputChatBox( .. getPlayerName(PlayerID) .. " says: " .. Text,255,0,255,255)
end
addCommand("l","L",1)
But it wont apear in game :/

Last edited by Ghost Dog 13; 03-28-2009 at 06:36 PM..
Ghost Dog 13 is offline   Reply With Quote
Old 03-28-2009   #2
tuntis
tuntis.net
 
Join Date: Jan 2009
Location: Finland
Posts: 31
tuntis is on a distinguished roadtuntis is on a distinguished roadtuntis is on a distinguished road
Try

Code:
outputChatBox(getPlayerName(PlayerID) .. " says: " .. Text,255,0,255,255)
Also, change addCommand to this:

Code:
addCommand("l", "Chat")
tuntis is offline   Reply With Quote
Old 03-28-2009   #3
[LCK]G0LdzEr0
Registered User
 
Join Date: Mar 2009
Location: Poland, Częstochowa
Posts: 13
[LCK]G0LdzEr0 is an unknown quantity at this point
Overwrite L in addCommand to: Chat
[LCK]G0LdzEr0 is offline   Reply With Quote
Old 03-28-2009   #4
Ghost Dog 13
Registered User
 
Join Date: Mar 2009
Posts: 8
Ghost Dog 13 is an unknown quantity at this point
Ok thanks for the help... let me see if it works

Edit: Works!!! Wooot thanks


Is it possible to add ID Listing before the : ? so when someone says something... it will be in chatbox like "Admin (0): text" ???

Here's what I use atm.
Code:
function Chat(PlayerID,Text)
        outputChatBox(getPlayerName(PlayerID) .. ": " .. Text,36,100,219,255)
end
addCommand("p", "Chat")

Last edited by Ghost Dog 13; 03-28-2009 at 07:07 PM.. Reason: auto-merged double post
Ghost Dog 13 is offline   Reply With Quote
Old 03-28-2009   #5
Mantis
Music=Life
 
Join Date: Mar 2009
Posts: 46
Mantis is on a distinguished roadMantis is on a distinguished roadMantis is on a distinguished roadMantis is on a distinguished road
Code:
function Chat(PlayerID,Text)
        outputChatBox(getPlayerName(PlayerID) ..  "[ID:" .. PlayerID .. "] : " .. Text,36,100,219,255)
end
addCommand("p", "Chat")
Hmm, give that a try, not had chance to try it, but I think thats it.
Mantis is offline   Reply With Quote
Old 03-29-2009   #6
Ghost Dog 13
Registered User
 
Join Date: Mar 2009
Posts: 8
Ghost Dog 13 is an unknown quantity at this point
wow

Thank You so much mate

Yeh Worked

"Name[ID:X] : Text..."

I'll change it A litle so it will apear as "Name (ID): Text..."


Can't Wat till the text draw funcrion in wiki be filled I need them!!



Sorry But I don't want others learn who I really am.. and what my project is
Ghost Dog 13 is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -6. The time now is 03:40 PM.