Raised This Month: $51 Target: $400
 12% 

Hats


Post New Thread Reply   
 
Thread Tools Display Modes
RTG
Senior Member
Join Date: Aug 2010
Location: CZ
Old 01-21-2012 , 13:37   Re: Hats
Reply With Quote #721

Hello, i have not read the whole topic. However could you help me with the ini file? I know what it mean "T" , "C" , but dont know the "0" ... and the "A" is admin? thx
RTG is offline
Send a message via ICQ to RTG Send a message via AIM to RTG
SGT
Senior Member
Join Date: Sep 2011
Old 01-21-2012 , 13:58   Re: Hats
Reply With Quote #722

0 is everybody, so both teams could use it. a is admin.
SGT is offline
RTG
Senior Member
Join Date: Aug 2010
Location: CZ
Old 01-22-2012 , 12:52   Re: Hats
Reply With Quote #723

ok thank you, and is there any way to disable completely any hat?
RTG is offline
Send a message via ICQ to RTG Send a message via AIM to RTG
makavelli
Senior Member
Join Date: Nov 2006
Location: Belgium
Old 01-24-2012 , 19:35   Re: Hats
Reply With Quote #724

Why does my amxstudio compiler crashes when i try to compile this?
i tryed to change the random on join value to 0 and changed the admin flags,
is this done on purpose? that there are to many errors in it so that the compiler just crashes?

Last edited by makavelli; 01-25-2012 at 05:49.
makavelli is offline
SGT
Senior Member
Join Date: Sep 2011
Old 01-24-2012 , 21:46   Re: Hats
Reply With Quote #725

Quote:
Originally Posted by RTG View Post
ok thank you, and is there any way to disable completely any hat?
In hatslist.ini put a ";" in front of the hat you want to disable.

;hat1
hat2

hat1 will be disabled in that case.
SGT is offline
RTG
Senior Member
Join Date: Aug 2010
Location: CZ
Old 01-25-2012 , 14:48   Re: Hats
Reply With Quote #726

SGT thank you so much
makavelli compile it on your server, not in amxstudio, and you shall see an output from console.. btw random hats on join is changed by cvar in amxx.cfg lol
RTG is offline
Send a message via ICQ to RTG Send a message via AIM to RTG
makavelli
Senior Member
Join Date: Nov 2006
Location: Belgium
Old 01-25-2012 , 16:59   Re: Hats
Reply With Quote #727

Quote:
Originally Posted by RTG View Post
SGT thank you so much
makavelli compile it on your server, not in amxstudio, and you shall see an output from console.. btw random hats on join is changed by cvar in amxx.cfg lol
what do you mean compile on my server?

I just checked, I dont see any cvars from an external plugin only the cvars from amx super.
or can I make my own cfg file for a specifik plugin?
makavelli is offline
RTG
Senior Member
Join Date: Aug 2010
Location: CZ
Old 01-25-2012 , 17:57   Re: Hats
Reply With Quote #728

you have to write those cvars into amxx.cfg, then you can find them in there

and to compile pluginm on your server place the SMA into the /addons/amxmodx/scripting and execute something like compile.sh or amxxpc or anything else, to compile it
here is topic about it http://forums.alliedmods.net/showthread.php?t=130511
RTG is offline
Send a message via ICQ to RTG Send a message via AIM to RTG
makavelli
Senior Member
Join Date: Nov 2006
Location: Belgium
Old 01-25-2012 , 18:20   Re: Hats
Reply With Quote #729

Quote:
Originally Posted by RTG View Post
you have to write those cvars into amxx.cfg, then you can find them in there

and to compile pluginm on your server place the SMA into the /addons/amxmodx/scripting and execute something like compile.sh or amxxpc or anything else, to compile it
here is topic about it http://forums.alliedmods.net/showthread.php?t=130511
Oh ok thx
and, the compiling worked, turns out there where no ; at end of lines

also can you tell me how I can code: remove all hats when a new round has started I tryed it like this but hell im just a newbie so i wasnt really expecting that it would work pronto :p
PHP Code:
public  round_end ()
{
    
Set_Hat(000); //Set_hat (index, imoddelnum, targetter)


Last edited by makavelli; 01-25-2012 at 19:10.
makavelli is offline
makavelli
Senior Member
Join Date: Nov 2006
Location: Belgium
Old 01-29-2012 , 07:08   Re: Hats
Reply With Quote #730

I'm trying to add a task to remove all players hats on start of new round with a cvar check;
this is how far i have come, need some help for the task:
(When i type amx_plugincvarmenu in console the cvars from the hatsplugin are not showed in the list)

PHP Code:
new P_ResetHats;
public 
plugin_init() {
    
register_logevent("EventNewRound"2"1=Round_Start"); // changed event_roundstart into eventnewround since i dont need the forcehat ability
    
register_logevent("EventRoundEnd"2"1&Restart_Round");
    
register_logevent("EventRoundEnd"2"1=Game_Commencing");
    
register_logevent("EventRoundEnd"2"1=Round_End");

    
P_ResetHats        register_cvar("hat_reset""1");    //0=dont reset on round start, 1= reset on round start
}
public  
EventRoundEnd ()
{
    static 
iPlayers[32], iNumiPlayer;
    
get_players(iPlayersiNum); 
    for (new 
0get_maxplayers(); ++i)
    {
        if (
is_user_connected (i) && g_HatEnt[i] > 0
        {
            if (
get_pcvar_num(P_ResetHats) != 0
            {
                
Set_Hat(iPlayer00);
            }
        }
    }
    return 
PLUGIN_CONTINUE;

With this I cant even open the hatsmenu when I type /hat or /hats :s can someone pls help me on this?
(added the complete hats plugin in case the problem is not here)
Attached Files
File Type: sma Get Plugin or Get Source (hatsplugin.sma - 520 views - 12.9 KB)

Last edited by makavelli; 01-29-2012 at 07:15.
makavelli is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:43.


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