Raised This Month: $51 Target: $400
 12% 

[SOLVED] Points


Post New Thread Reply   
 
Thread Tools Display Modes
extream87
Senior Member
Join Date: Aug 2011
Old 03-02-2014 , 19:24   Re: [HELP] Points
Reply With Quote #11

Is not working property. The setted values are not 100, 500 and 1000. If you choose 100 nothing happens, if you choose 1000 the player receive +- 30 points.

And the same problem.
If i open the menu and i give you points your name are good.

BlackRose [1001]

If i choose me to give me points my name are not good:

extream87 [1] [1001]
extream87 is offline
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 03-02-2014 , 20:18   Re: [HELP] Points
Reply With Quote #12

I've already done this for you also. And optimised it too.

https://forums.alliedmods.net/showpo...8&postcount=23

Or didn't you test it?
__________________
Blizzard_87 is offline
extream87
Senior Member
Join Date: Aug 2011
Old 03-03-2014 , 03:58   Re: [HELP] Points
Reply With Quote #13

Yes but have the same problem check:

If you have 100 points and i give you more 100 your name is: Blizzard_87 [200] -- ok!

If i have 100 points and i give me 100 points my name is setted to: extream87 [100] [200] -- not good!

extream87 is offline
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 03-03-2014 , 04:36   Re: [HELP] Points
Reply With Quote #14

That has nothing to do with my code you have another bit of code which changes players name. Stop changing player name and test.
__________________
Blizzard_87 is offline
extream87
Senior Member
Join Date: Aug 2011
Old 03-03-2014 , 04:41   Re: [HELP] Points
Reply With Quote #15

It works, but i want points in name.
The problem happens if you try to put points in the menu caller (admin)

Code:
stock points_in_name(id)  {      new szName[32]      get_user_name(id, szName, charsmax(szName))      new iLen = strlen(szName)            /* Finds and removes "<####>" */      new iPos = iLen - 1      if( szName[iPos] == '>' )      {          for( new i = 1; i < 6; i++)          {              if( szName[iPos - i] == '<' )              {                  iLen = iPos - i                  szName[iLen] = '^0'                  break              }          }      }            format(szName[iLen], charsmax(szName) - iLen, szName[iLen-1] == ' ' ? "<%d>" : " <%d>", points[id])      set_user_info(id, "name", szName)  } public fw_ClientInfoChanged(id, buffer) {        if(!is_user_connected(id) || !get_pcvar_num(g_CvarActive))         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  }

Edit:
It's the devil?
Im my other server with same amxx and metamod version works like a charm. And in test server not work -.-'

Last edited by extream87; 03-03-2014 at 05:20.
extream87 is offline
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 03-03-2014 , 05:32   Re: [HELP] Points
Reply With Quote #16

both servers running same AMXX version?
__________________
Blizzard_87 is offline
extream87
Senior Member
Join Date: Aug 2011
Old 03-03-2014 , 05:35   Re: [HELP] Points
Reply With Quote #17

Yes -.-' is fuck*** strange.

How can i transform this message:
Code:
ColorChat( player, GREEN, "^x04You Recieved ^x03%d ^x04Points", iPoints );

To this:

Code:
ColorChat( player, GREEN, "^x04You Recieved ^x03%d ^x04Points from admin %s", iPoints );

Last edited by extream87; 03-03-2014 at 05:36.
extream87 is offline
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 03-03-2014 , 06:12   Re: [HELP] Points
Reply With Quote #18

show whole code because you are trying to pass a string without the holding variable...
__________________
Blizzard_87 is offline
extream87
Senior Member
Join Date: Aug 2011
Old 03-03-2014 , 06:13   Re: [HELP] Points
Reply With Quote #19

Done

Thanks all.
Thank you in advance to Blizzard_87

Last edited by extream87; 03-03-2014 at 07:06.
extream87 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 06:35.


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