Raised This Month: $32 Target: $400
 8% 

Adding Triggered events...


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
jay7981
Junior Member
Join Date: Jan 2014
Old 06-24-2017 , 15:32   Adding Triggered events...
Reply With Quote #1

hey all, i know this plugin is no longer supported, but i have a question about adding some triggered events to the sma,

what i need is to be able to log every level up, and down separately , in the sma is this code is logging for GUNGAME_POINTS but i need to seperate and log a triggered event for each level up and down.

Code:
new teamName[10], key_GAINED_POINTS[18];

	// decide what to use based on split and such
	if(get_pcvar_num(gg_stats_split))
	{
		if(teamplay) key_GAINED_POINTS = "GAINED_POINTS_TP";
		else key_GAINED_POINTS = "GAINED_POINTS_REG";
	}
	else key_GAINED_POINTS = "GAINED_POINTS";
		
	for(i=0;i<playerNum;i++)
	{
		get_user_team(players[i],teamName,9);
			
		//if(players[i] == winner || (teamplay && _:cs_get_user_team(players[i]) == winningTeam))
		if(playerWins[i]) log_message("^"%s<%i><%s><%s>^" triggered ^"Won_GunGame^"",playerName[i],get_user_userid(players[i]),playerAuthid[i],teamName);

		if(stats_mode == 2 && playerPoints[i])
		{
			log_message("^"%s<%i><%s><%s>^" triggered ^"GunGame_Points^" amount ^"%i^"",playerName[i],get_user_userid(players[i]),playerAuthid[i],teamName,playerPoints[i]);
			gungame_print(players[i],0,1,"%L",players[i],key_GAINED_POINTS,playerPoints[i],playerTotalPoints[i],pointsExtraction[players[i]][0]);
		}
	}
i was thinking changing to this would work but it doesnt.

Code:
if(stats_mode == 2 && playerPoints[i])
		{
			log_message("^"%s<%i><%s><%s>^" triggered ^"GunGame_LevelUP^" amount ^"%i^"",playerName[i],get_user_userid(players[i]),playerAuthid[i],teamName,playerPoints[i]);
			gungame_print(players[i],0,1,"%L",players[i],key_GAINED_POINTS,playerPoints[i],playerTotalPoints[i],pointsExtraction[players[i]][0]);
		}
if(stats_mode == 2 && playerPoints[-i])
		{
			log_message("^"%s<%i><%s><%s>^" triggered ^"GunGame_LevelDown^" amount ^"%i^"",playerName[i],get_user_userid(players[i]),playerAuthid[i],teamName,playerPoints[i]);
			gungame_print(players[i],0,1,"%L",players[i],key_LOST_POINTS,playerPoints[i],playerTotalPoints[i],pointsExtraction[players[i]][0]);
		}
jay7981 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 09:13.


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