Raised This Month: $ Target: $400
 0% 

How to get playername (optimize this?)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
colossus
Member
Join Date: Sep 2013
Old 09-09-2013 , 07:07   How to get playername (optimize this?)
Reply With Quote #1

How to optimize getname last ct?

funcion: GetCTLastName()

Code:
/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <cstrike> #define PLUGIN "Get Name Last CT" #define VERSION "1.0" #define AUTHOR "colossus" new g_maxplayers new szName[33][32] new szText[32] public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)         // Add your code here...     register_srvcmd("function", "GoFunction")         g_maxplayers = get_maxplayers() } public client_putinserver(id) {     get_user_name(id, szName[id], charsmax(szName[])) } public GoFunction() {     if(fnGetCTs() == 1)     {         GetCTLastName()     } } fnGetCTs() {     static iCTs, id     iCTs = 0         for (id = 1; id <= g_maxplayers; id++)     {         if(!is_user_alive(id))             continue                     if (cs_get_user_team(id) != CS_TEAM_CT)             continue                     iCTs++     }         return iCTs; } GetCTLastName() {     for(new id = 1; id <= g_maxplayers; id++)     {         if(!is_user_alive(id))             continue                     if (cs_get_user_team(id) != CS_TEAM_CT)             continue                             formatex(szText, charsmax(szText), "%s", szName[id])     } }
colossus 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 18:54.


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