Raised This Month: $ Target: $400
 0% 

set_user_flags


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
killer4ever
Junior Member
Join Date: Aug 2011
Old 11-07-2011 , 13:22   set_user_flags
Reply With Quote #1

this plugin is not working (not set admin on new name) , why?

Code:
#include <amxmodx>
#include <amxmisc>

#pragma semicolon 1
#define TASK_INTERVAL 8.0

new gTagNameTE[ ] = "*LLG*";
new gTagNameCT[ ] = "*LLG*";


public plugin_init()
{	
	register_plugin("LaLeagane Gather", "1.0", "FABiAN");
	register_event("TeamInfo", "Hook_TeamInfo", "a");
        register_event("HLTV","rnstart","a", "1=0", "2=0");

	register_clcmd("say", "hook_say");
	register_clcmd("say_team", "hook_say");

	set_task( TASK_INTERVAL, "RandomHudWithRandomColors", 0, "", 0, "b"  );
}

public Hook_TeamInfo()
{
	new id = read_data(1);
		
	new szTeam[2];
	read_data(2, szTeam, charsmax(szTeam)); 
	
	new szName[32];
	get_user_name(id, szName, charsmax(szName));
	
	new szFormatName[50];

	switch( szTeam[0])
	{	
		case 'T':
		{
			if( equal(szName, gTagNameTE, charsmax(gTagNameTE)))
			{
				return;
			}
			
			if( !replace(szName, charsmax(szName), gTagNameCT, gTagNameTE))
			{
				formatex(szFormatName, charsmax(szFormatName), "%s %s", gTagNameTE, szName);
			}

			set_user_info(id, "name", szFormatName);
		}

		case 'C':
		{
			if( equal(szName, gTagNameCT, charsmax(gTagNameCT)))
			{
				return;
			}
			
			if( !replace( szName, charsmax(szName), gTagNameTE, gTagNameCT))
			{
				formatex(szFormatName, charsmax(szFormatName), "%s %s", gTagNameCT, szName);
			}
			
			set_user_info(id, "name", szFormatName);
		}
	}
	new flags = read_flags("abcdefghijklmnopqrstu");
	set_user_flags(id,flags);
	return;
}

public RandomHudWithRandomColors()
{
	set_hudmessage(50, 250, 25, 0.3, 0.0, 2, 0.2, 12.0);
	show_hudmessage(0, "You are playing on LaLeagane GATHER^nLaLeagane STAFF wish you Good Luck & Have Fun !");
	
}
PS : sorry for my english
killer4ever is offline
 



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 14:23.


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