AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [HELP] Money in Name (https://forums.alliedmods.net/showthread.php?t=237674)

extream87 03-28-2014 09:06

[HELP] Money in Name
 
I want to incorporate you can see the money in name if you are only teammate.
I want do until the end of buytime if a player spends money the money value in name change.
Code:
/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <cstrike> #include <fakemeta> #include <hamsandwich> #define PLUGIN "Money in Name" #define VERSION "1.0" #define AUTHOR "extream87" public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)         RegisterHam(Ham_Spawn, "player", "fwHamPlayerSpawnPost", 1)     register_forward(FM_ClientUserInfoChanged, "fw_ClientInfoChanged") } public fwHamPlayerSpawnPost(id) {       money_in_name(id) } stock money_in_name(id) {     new szName[32]     get_user_name(id, szName, charsmax(szName))     new iLen = strlen(szName)           new iPos = iLen - 1     if( szName[iPos] == '>' )     {           for( new i = 1; i < 13; i++)         {           if( szName[iPos - i] == '<' )         {               iLen = iPos - i             szName[iLen] = '^0'             break         }         }     }           format(szName[iLen], charsmax(szName) - iLen, szName[iLen-1] == ' ' ? "<%d$>" : " <%d$>", cs_get_user_money(id))     set_user_info(id, "name", szName) } public fw_ClientInfoChanged(id, buffer) {     if(!is_user_connected(id))         return FMRES_IGNORED         static OldName[32], NewName[32]         get_user_name(id, OldName, charsmax(OldName))         engfunc(EngFunc_InfoKeyValue, buffer, "name", NewName, charsmax(NewName))         if (equal(NewName, OldName))         return FMRES_IGNORED         return FMRES_SUPERCEDE }

rspause 04-01-2014 13:36

Re: [HELP] Money in Name
 
Nice, i need this too

Blizzard_87 04-01-2014 19:10

Re: [HELP] Money in Name
 
I don't think you can change a players name different just for a specific team and not the other.

Altho you could do similar with StatusValue. When looking at a player you could show a text message showing there current money.


All times are GMT -4. The time now is 06:03.

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