AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Ham_Spawn not working? (https://forums.alliedmods.net/showthread.php?t=298811)

xXSnowGamingXx 06-23-2017 09:31

Ham_Spawn not working?
 
PHP Code:

RegisterHam(Ham_Spawn"player""fwHamPlayerSpawnPost"1); 

PHP Code:

public fwHamPlayerSpawnPost(id)
{
    if(
is_user_alive(id))
    {
        
client_printc(id"Type /rs to reset your score");
                
set_user_maxspeed(id381);
    }


But it does not display this message... Why? And it does not change the speed too

Craxor 06-23-2017 09:40

Re: Ham_Spawn not working?
 
client_printc ?

xXSnowGamingXx 06-23-2017 09:56

Re: Ham_Spawn not working?
 
PHP Code:

stock client_printc(const id, const input[], any: ...)
{
    new 
count 1players32 ]
    static 
msg191 ]
    
vformat(msg190input3)
    
    
replace_all(msg190"!g""^x04")       // Green Color
    
replace_all(msg190"!n""^x01")       // Default Color
    
replace_all(msg190"!t""^x03")       // Team Color
    
    
if( id )
    {
        
players] = id;
    }
    else
    {
        
get_players(playerscount"ch")
    }
    {
        for( new 
0counti++ )
        {
            if( 
is_user_connected(players]) )
            {
                
message_begin(MSG_ONE_UNRELIABLEget_user_msgid("SayText"), _players])
                
write_byte(players])
                
write_string(msg)
                
message_end()
            }
        }
    }



Craxor 06-23-2017 10:38

Re: Ham_Spawn not working?
 
try this and tell me if is printing the message:
PHP Code:

#include <amxmodx>
#include <hamsandwich>

public plugin_init( )
{
    
RegisterHamHam_Spawn"player""ham_test_post");
}

public 
ham_test_post( const id )
{
    if( 
is_user_alive(id) )
    {
        
client_printidprint_chat"I'm spawned!" );
    }



xXSnowGamingXx 06-23-2017 11:16

Re: Ham_Spawn not working?
 
Does not work

Craxor 06-23-2017 11:50

Re: Ham_Spawn not working?
 
It means you may have ham module disabled because for me is working, type 'meta list' in the server console and print here the output.

OciXCrom 06-23-2017 12:35

Re: Ham_Spawn not working?
 
Or it simply means you didn't add the plugin.

Craxor 06-23-2017 12:38

Re: Ham_Spawn not working?
 
I don't think, he says mine and also his plugin doesn't work, he can do a mistake with one plugin but with two :) ?

abdobiskra 06-23-2017 12:51

Re: Ham_Spawn not working?
 
Note : if u try it in first spawn did not work

Craxor 06-23-2017 12:52

Re: Ham_Spawn not working?
 
do you mean my code :O ? It works in all ever spawns.


All times are GMT -4. The time now is 23:11.

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