AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   no (https://forums.alliedmods.net/showthread.php?t=249514)

Awesome_man 10-07-2014 01:37

no
 
no

zmd94 10-07-2014 03:18

Re: Code not working
 
Just try below:
PHP Code:

#include <amxmodx>
#include <dhudmessage>

public plugin_init ()
{
    
register_plugin("Welcome Message""""")    
}

public 
client_putinserver(id)
{
    if(
is_user_connected(id))
    {
        
set_task(5.0"welcome"id)
    }
}

public 
welcome(id)
{    
    
set_dhudmessage(02552120.270.3326.012.0)
    
show_dhudmessage(id"Welcome to ^nOnline gamers!")



aron9forever 10-07-2014 07:30

Re: Code not working
 
PHP Code:

#include <amxmodx>
#include <dhudmessage>

public plugin_init ()
{
    
register_plugin("Welcome Message""""")     
}

public 
client_putinserver(id)
{
    
set_task(5.0"welcome"id+1337)
}
public 
client_disconnect(id)
{
remove_task(id+1337)
}
public 
welcome(id)
{    
    
set_dhudmessage(02552120.270.3326.012.0)
    
show_dhudmessage(id-1377"Welcome to ^nOnline gamers!"


so you don't get run time errors

Awesome_man 10-07-2014 09:00

Re: Code not working
 
Quote:

Originally Posted by aron9forever (Post 2208178)
PHP Code:

#include <amxmodx>
#include <dhudmessage>

public plugin_init ()
{
    
register_plugin("Welcome Message""""")     
}

public 
client_putinserver(id)
{
    
set_task(5.0"welcome"id+1337)
}
public 
client_disconnect(id)
{
remove_task(id+1337)
}
public 
welcome(id)
{    
    
set_dhudmessage(02552120.270.3326.012.0)
    
show_dhudmessage(id-1377"Welcome to ^nOnline gamers!"


so you don't get run time errors

It's crashing server again n again

aron9forever 10-07-2014 09:08

Re: Code not working
 
show_dhudmessage(id-1377, "Welcome to ^nOnline gamers!")

->>
show_dhudmessage(id-1337, "Welcome to ^nOnline gamers!")

I can't help it I'm only human

zmd94 10-07-2014 09:51

Re: Code not working
 
Quote:

Originally Posted by zmd94 (Post 2208132)
Just try below:
PHP Code:

#include <amxmodx>
#include <dhudmessage>

public plugin_init ()
{
    
register_plugin("Welcome Message""""")    
}

public 
client_putinserver(id)
{
    if(
is_user_connected(id))
    {
        
set_task(5.0"welcome"id)
    }
}

public 
welcome(id)
{    
    
set_dhudmessage(02552120.270.3326.012.0)
    
show_dhudmessage(id"Welcome to ^nOnline gamers!")




HamletEagle 10-07-2014 11:57

Re: Code not working
 
Remove this damm task, right after showing the hud message.

YamiKaitou 10-07-2014 12:02

Re: Code not working
 
Quote:

Originally Posted by HamletEagle (Post 2208257)
Remove this damm task, right after showing the hud message.

Why? It gets removed automatically already

aron9forever 10-07-2014 12:59

Re: Code not working
 
Quote:

Originally Posted by zmd94 (Post 2208218)
.

u don't get it
player can disconnect while task is undergoing

Decak 10-07-2014 16:05

Re: Code not working
 
Why complicate? Is not this enough for what you need?
Code:

#include <amxmodx>

public plugin_init() {
    register_plugin("Welcome Message", "1.0", "Author")
}

public client_putinserver(id) {
    set_task(5.0, "Hud", id)
}

public Hud(id) {
    if(is_user_connected(id)) {
    set_hudmessage(255, 170, 0, 0.33, 0.19, 0, 6.0, 12.0)
    show_hudmessage(id, "Welcome to ^nOnline Gamers!")
}
}



All times are GMT -4. The time now is 17:45.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.