AlliedModders

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

Aur3kas 06-13-2010 16:26

please help
 
Hi,maybe you can fix the code and make the top of the HUD message to be viewable only by terrorists, and that the write /demo open demo motd lang.

code:
Code:

#include <amxmodx>
#include <amxmisc>

public admin_motd(id,level,cid) {

    if (!cmd_access(id,level,cid,1))
    return PLUGIN_CONTINUE
   
    show_motd(id,"demo.txt","Demo")
    return PLUGIN_CONTINUE 
}

public plugin_init() {

    register_plugin("say /demo","1.1","Pa1n")
    register_clcmd("say /demo","admin_motd",0,"- Shows the MOTD.")
}

public Message () (
  set_hudmessage (255, 0, 0, 0.33, 0.27, 0, 6.0, 12.0)
  show_hudmessage (0, "DEMO TEXT TEXT TEXT TEXT")
)


infek 06-13-2010 16:59

Re: please help
 
try this
PHP Code:

#include <amxmodx>
#include <amxmisc>
 
public plugin_init() 
{
    
register_plugin("say /demo","1.1","Pa1n")
    
register_clcmd("say /demo","admin_motd",0,"- Shows the MOTD.")
}
 
public 
admin_motd(id,level,cid
{
    if (!
cmd_access(id,level,cid,1))
    return 
PLUGIN_CONTINUE
 
    show_motd
(id,"demo.txt","Demo")
    return 
PLUGIN_CONTINUE   
}
public 
Message(id
{
 if (
get_user_team(id) == 1// 1 = T, 2 = CT
 
{
  
set_hudmessage (255000.330.2706.012.0)
  
show_hudmessage (0"DEMO TEXT TEXT TEXT TEXT")
 }



Aur3kas 06-14-2010 06:49

Re: please help
 
Quote:

Originally Posted by infek (Post 1207938)
try this
PHP Code:

#include <amxmodx>
#include <amxmisc>
 
public plugin_init() 
{
    
register_plugin("say /demo","1.1","Pa1n")
    
register_clcmd("say /demo","admin_motd",0,"- Shows the MOTD.")
}
 
public 
admin_motd(id,level,cid
{
    if (!
cmd_access(id,level,cid,1))
    return 
PLUGIN_CONTINUE
 
    show_motd
(id,"demo.txt","Demo")
    return 
PLUGIN_CONTINUE   
}
public 
Message(id
{
 if (
get_user_team(id) == 1// 1 = T, 2 = CT
 
{
  
set_hudmessage (255000.330.2706.012.0)
  
show_hudmessage (0"DEMO TEXT TEXT TEXT TEXT")
 }



thanks :)


All times are GMT -4. The time now is 14:44.

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