AlliedModders

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

KadiR 12-29-2009 17:52

Spec Message
 
I wanted to put a message for spectators on roundstart:

PHP Code:

#include <amxmodx>
#include <amxmisc>
#include <cstrike>
 
public plugin_init()
{
    
register_plugin("Spec Message""1.0""kadir")
    
register_logevent("roundstart"2"0=World triggered""1=Round_Start")
}
 
public 
roundstart()
{
    
set_task(1.0"checkSpec")
}
 
public 
checkSpec(id)
{
    if(
cs_get_user_team(id) == CS_TEAM_SPECTATOR)
    {
        
set_hudmessage(02550, -1.00.006.012.0)
        
show_hudmessage(id"TEST TEST!")
        return 
PLUGIN_HANDLED
    
}
    return 
PLUGIN_HANDLED


I don't have any errors, but this code doesn't work for me, any ideas?

One 12-29-2009 18:05

Re: Spec Message
 
you have to loop between all players.


All times are GMT -4. The time now is 04:01.

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