Jump to content

Notifications script problem. Help pls


ferijani11

Recommended Posts

Simple notification window. To show notification just use function showBox (string type, string message). Script allow three types of notification:

-error

-warning

-info

example:

showBox ("info","Just some information")

Every type has different icon and header, time which window is showing depends on length of message. You can use function while another window is showing, it will simply add it to queue.

PSD included

Link to comment
  • 1 month later...
Simple notification window. To show notification just use function showBox (string type, string message). Script allow three types of notification:

-error

-warning

-info

example:

showBox ("info","Just some information")

Every type has different icon and header, time which window is showing depends on length of message. You can use function while another window is showing, it will simply add it to queue.

PSD included

Already Been Tested that and Grab However No Script With That Code. For It So many problems with this script

Link to comment
function shout(player, cmd, ...) 
local accountname = getAccountName(getPlayerAccount(player)) 
    if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Owner" )) or isObjectInACLGroup ( "user." ..accountname, aclGetGroup ( "Admin" ))  then 
        players = getElementsByType ( "player" )  
         
        for k,v in pairs(players) do   
                local message = table.concat({...}," ") 
                exports["notification"]:showBox(v, "info",message) -- put here your resource near "notification" 
        end 
    end 
end 
addCommandHandler("notificate", shout) 

I used this on my server to notificate everyone ( server-side)

Usage: /notificate The text what you want to be displayed.

For client side:

exports["notification"]:showBox("info""Sometimes I dream about cheeeese") -- put here your resource near "notification" 

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...