Raised This Month: $ Target: $400
 0% 

Get playing time (being in CT or T team)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Mlk27
Veteran Member
Join Date: May 2008
Old 02-05-2009 , 05:57   Re: Get playing time (being in CT or T team)
Reply With Quote #1

what about this..does this work?

Code:
#include <amxmodx> new g_MaxPlayers new playtime[33] new bool:g_spectator[33] public plugin_init() {     register_event("TeamInfo", "eTeamInfo", "a")     set_task(1.0, "CountPlayTime", _, _, _, "b")     g_MaxPlayers = get_maxplayers() } public client_disconnect(id) {     playtime[id] = 0 } public eTeamInfo() {     new id = read_data(1)     new client_team[2] ; read_data(2, client_team, charsmax(client_team))         switch(client_team[0])     {         case 'C': g_spectator[id] = false         case 'T': g_spectator[id] = false         case 'S': g_spectator[id] = true     } } public CountPlayTime() {     for(new id; id <= g_MaxPlayers; id++)     {         if(is_user_connected(id) && !g_spectator[id])             playtime[id]++     } }


any better idea?
Mlk27 is offline
Old 02-05-2009, 08:09
SnoW
This message has been deleted by SnoW. Reason: Bah, maybe I'll just delete this.
anakin_cstrike
Veteran Member
Join Date: Nov 2007
Location: Romania
Old 02-05-2009 , 08:15   Re: Get playing time (being in CT or T team)
Reply With Quote #3

PHP Code:
for(new id=1
__________________

anakin_cstrike 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 01:48.


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