Jump to content

Asking About Infos


Best-Killer

Recommended Posts

Hey Guys ,

can anyone give me examples for make script (infos)

example (script)

./infohelp , after that command showing a message in topbar : /spam /insult /caps ,, after that the play can use spam or insult or caps ..... when use /spam it's showing message mainchat to all player Infos: Stop Spamming .......... ect

please help me

Link to comment
More info of what you want maybe
example (script) 
  
./infohelp , after that command showing a message in topbar : /spam /insult /caps ,, after that the play can use spam or insult or caps ..... when use /spam it's showing message mainchat to all player Infos: Stop Spamming .......... ect  
 

Link to comment

For topbar - It depends on the script, or you can make gui come up from a certain amount of time.

For /caps or what not

For caps-

function Caps () 
outputchatbox("Info: Please turn off your caps") 
end 
  
addcommandhandler("caps", Caps 

For spam

function Spam () 
outputchatbox("Info: Please stop spamming chat") 
end 
  
addcommandhandler("spam", Spam 

and so on

Link to comment
For topbar - It depends on the script, or you can make gui come up from a certain amount of time.

For /caps or what not

For caps-

function Caps () 
outputchatbox("Info: Please turn off your caps") 
end 
  
addcommandhandler("caps", Caps 

For spam

function Spam () 
outputchatbox("Info: Please stop spamming chat") 
end 
  
addcommandhandler("spam", Spam 

and so on

Thanks You

But Bro i want players can not use the commands without using /infohelp first

Link to comment

Create a table

  
playerinfos = {} 
  
function infostuff () 
playerinfos[source] = {} 
local localplayerinfos = playerinfos[source] 
localplayerinfos["infos"] = true 
outputChatBox ( "/Spam /Caps ...Etc.. <--- Input chat message you want", source ) 
end 
  
addCommandHandler("infohelp", infostff ) 
  
function spam () 
local localplayerinfos = playerinfos[source] 
if localplayerinfos["infos"]  
then 
outputChatBox ( "Info: Stop spamming chat" ) 
end 
end 
  
addCommandHandler ("spam", spam) 
  
function caps () 
local localplayerinfos = playerinfos[source] 
if localplayerinfos["infos"]  
then 
outputChatBox ( "Info: Please turn caps lock off" ) 
end 
end 
  
addCommandHandler ("caps", caps) 
  
--- Add in the other chat messages with the format I put --- 
  

Questions?

Link to comment
Create a table
  
playerinfos = {} 
  
function infostuff () 
playerinfos[source] = {} 
local localplayerinfos = playerinfos[source] 
localplayerinfos["infos"] = true 
outputChatBox ( "/Spam /Caps ...Etc.. <--- Input chat message you want", source ) 
end 
  
addCommandHandler("infohelp", infostff ) 
  
function spam () 
local localplayerinfos = playerinfos[source] 
if localplayerinfos["infos"]  
then 
outputChatBox ( "Info: Stop spamming chat" ) 
end 
end 
  
addCommandHandler ("spam", spam) 
  
function caps () 
local localplayerinfos = playerinfos[source] 
if localplayerinfos["infos"]  
then 
outputChatBox ( "Info: Please turn caps lock off" ) 
end 
end 
  
addCommandHandler ("caps", caps) 
  
--- Add in the other chat messages with the format I put --- 
  

Questions?

not work :P

ERROR: Testinginfos/client.lua:15: attempt toindex local 'localplayerinfos(a nil value)

Link to comment
      
    playerinfos = {} 
      
    function infostuff () 
    playerinfos[source] = {} 
    local localplayerinfos = playerinfos[source] 
    localplayerinfos["infos"] = true 
    outputChatBox ( "/Spam /Caps ...Etc.. <--- Input chat message you want", source ) 
    end 
      
    addCommandHandler("infohelp", infostuff ) 
      
    function spam () 
    local localplayerinfos = playerinfos[source] 
    if localplayerinfos["infos"] 
    then 
    outputChatBox ( "Info: Stop spamming chat" ) 
    end 
    end 
      
    addCommandHandler ("spam", spam) 
      
    function caps () 
    local localplayerinfos = playerinfos[source] 
    if localplayerinfos["infos"] 
    then 
    outputChatBox ( "Info: Please turn caps lock off" ) 
    end 
    end 
      
    addCommandHandler ("caps", caps) 
      
    --- Add in the other chat messages with the format I put --- 
      

Try that, made a typo

Link to comment

Try this

local iHelp = false 
  
function infoHelp() 
    iHelp = true 
    outputchatbox("/spam /insult /caps ..") 
end 
addcommandhandler("infohelp", infoHelp 
  
function Caps() 
    if infoAllow == true then 
        outputchatbox("Info: Please turn off your caps") 
    else 
        outputchatbox("You are not allowed to use this | Type /infohelp") 
    end 
end 
  
addcommandhandler("caps", Caps 
  
function Spam() 
    if infoAllow == true then 
        outputchatbox("Info: Please stop spamming chat") 
    else 
        outputchatbox("You are not allowed to use this | Type /infohelp") 
    end 
end 
  
addcommandhandler("spam", Spam) 
  
function Insult() 
    if infoAllow == true then 
        outputchatbox("Info: Please don't insult BITCH !") 
    else 
        outputchatbox("You are not allowed to use this | Type /infohelp") 
    end 
end 
  
addcommandhandler("insult", Insult) 

Not tested.

Link to comment
Try this
local iHelp = false 
  
function infoHelp() 
    iHelp = true 
    outputchatbox("/spam /insult /caps ..") 
end 
addcommandhandler("infohelp", infoHelp 
  
function Caps() 
    if infoAllow == true then 
        outputchatbox("Info: Please turn off your caps") 
    else 
        outputchatbox("You are not allowed to use this | Type /infohelp") 
    end 
end 
  
addcommandhandler("caps", Caps 
  
function Spam() 
    if infoAllow == true then 
        outputchatbox("Info: Please stop spamming chat") 
    else 
        outputchatbox("You are not allowed to use this | Type /infohelp") 
    end 
end 
  
addcommandhandler("spam", Spam) 
  
function Insult() 
    if infoAllow == true then 
        outputchatbox("Info: Please don't insult BITCH !") 
    else 
        outputchatbox("You are not allowed to use this | Type /infohelp") 
    end 
end 
  
addcommandhandler("insult", Insult) 

Not tested.

Your forgot 2x ")"

local iHelp = false 
  
function infoHelp() 
    iHelp = true 
    outputchatbox("/spam /insult /caps ..") 
end 
addcommandhandler("infohelp", infoHelp) 
  
function Caps() 
    if infoAllow == true then 
        outputchatbox("Info: Please turn off your caps") 
    else 
        outputchatbox("You are not allowed to use this | Type /infohelp") 
    end 
end 
  
addcommandhandler("caps", Caps) 
  
function Spam() 
    if infoAllow == true then 
        outputchatbox("Info: Please stop spamming chat") 
    else 
        outputchatbox("You are not allowed to use this | Type /infohelp") 
    end 
end 
  
addcommandhandler("spam", Spam) 
  
function Insult() 
    if infoAllow == true then 
        outputchatbox("Info: Please don't insult BITCH !") 
    else 
        outputchatbox("You are not allowed to use this | Type /infohelp") 
    end 
end 
  
addcommandhandler("insult", Insult) 

Link to comment
  
    playerInfos = {} 
      
    function infostuff () 
    playerInfos[source] = {} 
    local localplayerinfos = playerInfos[source] 
    localplayerinfos["infos"] = true 
    outputChatBox ( "/Spam /Caps ...Etc.. <--- Input chat message you want", source ) 
    end 
      
    addCommandHandler("infohelp", infostuff ) 
      
    function spam () 
    local localplayerinfos = playerInfos[source] 
    if localplayerinfos["infos"] 
    then 
    outputChatBox ( "Info: Stop spamming chat" ) 
    end 
    end 
      
    addCommandHandler ("spam", spam) 
      
    function caps () 
    local localplayerinfos = playerInfos[source] 
    if localplayerinfos["infos"] 
    then 
    outputChatBox ( "Info: Please turn caps lock off" ) 
    end 
    end 
      
    addCommandHandler ("caps", caps) 
      
    --- Add in the other chat messages with the format I put --- 
      

Fixed a few errors, try this (Server sided)

Link to comment
local iHelp = false 
  
function infoHelp() 
    iHelp = true 
    outputchatbox("/spam /insult /caps ..") 
end 
addCommandHandler("infohelp", infoHelp) 
  
function Caps() 
    if infoAllow == true then 
        outputchatbox("Info: Please turn off your caps") 
    else 
        outputchatbox("You are not allowed to use this | Type /infohelp") 
    end 
end 
  
addCommandHandler("caps", Caps) 
  
function Spam() 
    if infoAllow == true then 
        outputchatbox("Info: Please stop spamming chat") 
    else 
        outputchatbox("You are not allowed to use this | Type /infohelp") 
    end 
end 
  
addCommandHandler("spam", Spam) 
  
function Insult() 
    if infoAllow == true then 
        outputchatbox("Info: Please don't insult BITCH !") 
    else 
        outputchatbox("You are not allowed to use this | Type /infohelp") 
    end 
end 
  
addCommandHandler("insult", Insult) 

Should work ...

Link to comment
  
    playerInfos = {} 
      
    function infostuff () 
    playerInfos[source] = {} 
    local localplayerinfos = playerInfos[source] 
    localplayerinfos["infos"] = true 
    outputChatBox ( "/Spam /Caps ...Etc.. <--- Input chat message you want", source ) 
    end 
      
    addCommandHandler("infohelp", infostuff ) 
      
    function spam () 
    local localplayerinfos = playerInfos[source] 
    if localplayerinfos["infos"] 
    then 
    outputChatBox ( "Info: Stop spamming chat" ) 
    end 
    end 
      
    addCommandHandler ("spam", spam) 
      
    function caps () 
    local localplayerinfos = playerInfos[source] 
    if localplayerinfos["infos"] 
    then 
    outputChatBox ( "Info: Please turn caps lock off" ) 
    end 
    end 
      
    addCommandHandler ("caps", caps) 
      
    --- Add in the other chat messages with the format I put --- 
      

Fixed a few errors, try this (Server sided)

Not work

Try this
local iHelp = false 
  
function infoHelp() 
    iHelp = true 
    outputchatbox("/spam /insult /caps ..") 
end 
addcommandhandler("infohelp", infoHelp 
  
function Caps() 
    if infoAllow == true then 
        outputchatbox("Info: Please turn off your caps") 
    else 
        outputchatbox("You are not allowed to use this | Type /infohelp") 
    end 
end 
  
addcommandhandler("caps", Caps 
  
function Spam() 
    if infoAllow == true then 
        outputchatbox("Info: Please stop spamming chat") 
    else 
        outputchatbox("You are not allowed to use this | Type /infohelp") 
    end 
end 
  
addcommandhandler("spam", Spam) 
  
function Insult() 
    if infoAllow == true then 
        outputchatbox("Info: Please don't insult BITCH !") 
    else 
        outputchatbox("You are not allowed to use this | Type /infohelp") 
    end 
end 
  
addcommandhandler("insult", Insult) 

Not tested.

Worked But when i use /infohelp then /spam or /insult or anything it's showing to me

: You are not allowed to use this | Type /infohelp

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...