AlliedModders

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

FloorenTIbraimi 09-29-2014 15:22

NEED HELP
 
PHP Code:

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "RULES"
#define VERSION "1.0"
#define AUTHOR "FloorenTIbraimi"

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
         
register_event("ResetHUD""spawn""b")
}

public 
spawn(id)
{
    
set_hudmessage(02550, -1.0, -1.0)
    
show_hudmessage(id"Rules")
}

public 
spawn(id)
{
    
set_hudmessage(02550, -1.0, -1.0)
    
show_hudmessage(id"Dont Spam Becaus You Will Get GAG")
}
public 
spawn(id)
{
    
set_hudmessage(02550, -1.0, -1.0)
    
show_hudmessage(id"Don't ads your server here")
}
public 
spawn(id)
{
        
set_hudmessage(02550, -1.0, -1.0)
        
show_hudmessage(id"Dont Push With Admin")
}
public 
spawn(id)
{
    
set_hudmessage(02550, -1.0, -1.0)
    
show_hudmessage(id"If You Had Problem With Admin Contact On Facebook")


I Want To Add rules When i Write /rules to show On Left Rules HELP PLS !!! I Think i forgot this
PHP Code:

    register_clcmd"say /rules""ClientCommand_Test" ); 


sory for my bad english!!!

zmd94 09-29-2014 23:11

Re: NEED HELP
 
Please use RegisterHam(Ham_Spawn, "player", "fw_PlayerRespawn", 1).

FloorenTIbraimi 09-30-2014 08:02

Re: NEED HELP
 
PHP Code:

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "RULES"
#define VERSION "1.0"
#define AUTHOR "FloorenTIbraimi"

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
         
register_event("ResetHUD""spawn""b")
         
RegisterHam(Ham_Spawn"player""fw_PlayerRespawn"1).
}

public 
spawn(id)
{
    
set_hudmessage(02550, -1.0, -1.0)
    
show_hudmessage(id"Rules")
}

public 
spawn(id)
{
    
set_hudmessage(02550, -1.0, -1.0)
    
show_hudmessage(id"Dont Spam Becaus You Will Get GAG")
}
public 
spawn(id)
{
    
set_hudmessage(02550, -1.0, -1.0)
    
show_hudmessage(id"Don't ads your server here")
}
public 
spawn(id)
{
        
set_hudmessage(02550, -1.0, -1.0)
        
show_hudmessage(id"Dont Push With Admin")
}
public 
spawn(id)
{
    
set_hudmessage(02550, -1.0, -1.0)
    
show_hudmessage(id"If You Had Problem With Admin Contact On Facebook")


LIKE THIS ?

RateX 09-30-2014 10:31

Re: NEED HELP
 
Quote:

Originally Posted by FloorenTIbraimi (Post 2205221)
LIKE THIS ?

delete register_event and replace "spawn" with Ham_Spawn function you registered(fw_PlayerRespawn)

zmd94 09-30-2014 11:30

Re: NEED HELP
 
Just use below. ;)

New update!
PHP Code:

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "RULES"
#define VERSION "1.0"
#define AUTHOR "FloorenTIbraimi"

public plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_clcmd"say /rules""show_rules" )
}

public 
show_rules(id)
{
    if (
is_user_alive(id))
    {
        
set_hudmessage(02550, -1.0, -1.0)
        
show_hudmessage(id"Rules")
        
set_task(3.0"message2"id)
    }
}

public 
message2(id)
{
    if (
is_user_alive(id))
    {
        
set_hudmessage(02550, -1.0, -1.0)
        
show_hudmessage(id"Don't spam because you will get GAG")
        
set_task(3.0"message3"id)
    }
}

public 
message3(id)
{
    if (
is_user_alive(id))
    {
        
set_hudmessage(02550, -1.0, -1.0)
        
show_hudmessage(id"Don't ads your server here")
        
set_task(3.0"message4"id)
    }
}

public 
message4(id)
{
    if (
is_user_alive(id))
    {
        
set_hudmessage(02550, -1.0, -1.0)
        
show_hudmessage(id"Don't push with admin")
        
set_task(3.0"message5"id)
    }
}

public 
message5(id)
{
    if (
is_user_alive(id))
    {
        
set_hudmessage(02550, -1.0, -1.0)
        
show_hudmessage(id"If you had problem with admin, just contact via FB!")
    }



wickedd 09-30-2014 12:41

Re: NEED HELP
 
@zmd94
That's not what he asked for.

zmd94 10-01-2014 06:02

Re: NEED HELP
 
I have updated the code. When a player type /rules in chat, he will get the hud message. ;)

http://img.ctrlv.in/img/14/10/01/542bd013b7820.jpg

Kuma77 10-02-2014 09:25

Re: NEED HELP
 
you can also make rules motd !

zmd94 10-02-2014 09:28

Re: NEED HELP
 
Yes, thats right Kuma77. ;)

Kuma77 10-02-2014 09:33

Re: NEED HELP
 
#FloorenTIbraimi SLOVED ?


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

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