Raised This Month: $ Target: $400
 0% 

cs_get_user_money problem


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
rainin
Member
Join Date: Apr 2011
Location: Estonia
Old 11-10-2011 , 14:44   cs_get_user_money problem
Reply With Quote #1

Hello. I have a problem with the cs_get_user_money...

Code:
PHP Code:
public Showlifesid ) {
    
   new 
szMoney cs_get_user_money(id);    
    
   
set_hudmessage012800.040.7102.52.50.50.5);
   
   if( 
g_Lifesid ] > )
      
ShowSyncHudMsgidg_iHudSync2"%L"id"DR_LIFE_COUNT"g_Lifesid ], szMoney);
   else
      
ShowSyncHudMsgidg_iHudSync2"%L"id"DR_LIFE_NO" );
      
   
set_task0.8"Showlifes"id );

Lang:
PHP Code:
DR_LIFE_COUNT You have %i lifes & %s Money
Error:
PHP Code:
L 11/10/2011 21:24:45: [CSTRIKEInvalid player 3
L 11
/10/2011 21:24:45: [AMXXDisplaying debug trace (plugin "dr.amxx")
L 11/10/2011 21:24:45: [AMXXRun time error 10native error (native "cs_get_user_money")
L 11/10/2011 21:24:45: [AMXX]    [0dr.sma::Showlifes (line 583
Hope someone can help me.
rainin is offline
Send a message via MSN to rainin
tuty
Veteran Member
Join Date: Jul 2008
Location: UK
Old 11-10-2011 , 15:03   Re: cs_get_user_money problem
Reply With Quote #2

PHP Code:
DR_LIFE_COUNT You have %i lifes & %d Money
__________________
tuty is offline
Send a message via ICQ to tuty Send a message via AIM to tuty
rainin
Member
Join Date: Apr 2011
Location: Estonia
Old 11-10-2011 , 15:12   Re: cs_get_user_money problem
Reply With Quote #3

Quote:
Originally Posted by tuty View Post
PHP Code:
DR_LIFE_COUNT You have %i lifes & %d Money
Doesn't help... still have those error logs and doesn't show me the money.
rainin is offline
Send a message via MSN to rainin
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 11-10-2011 , 15:28   Re: cs_get_user_money problem
Reply With Quote #4

Invalid player 3 , means the player was not connected anymore when the native has been called. Make sure the player is connected before.
__________________
Arkshine is offline
tuty
Veteran Member
Join Date: Jul 2008
Location: UK
Old 11-10-2011 , 15:36   Re: cs_get_user_money problem
Reply With Quote #5

and fix what i gave you, cuz yours is shown as a string, but money are in digits so you must use "%d" or "%i"
__________________
tuty is offline
Send a message via ICQ to tuty Send a message via AIM to tuty
rainin
Member
Join Date: Apr 2011
Location: Estonia
Old 11-10-2011 , 15:37   Re: cs_get_user_money problem
Reply With Quote #6

Not needed...

Last edited by rainin; 11-10-2011 at 16:25.
rainin is offline
Send a message via MSN to rainin
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 11-10-2011 , 15:48   Re: cs_get_user_money problem
Reply With Quote #7

How it's related the current thread ?
__________________
Arkshine is offline
rainin
Member
Join Date: Apr 2011
Location: Estonia
Old 11-10-2011 , 15:50   Re: cs_get_user_money problem
Reply With Quote #8

Quote:
Originally Posted by Arkshine View Post
How it's related the current thread ?
Cause there i use cs_set_user_money()

Mby it causes smt...

But im not sure, i'm beginner at PAWN.

The problem is in the cs_get_user_money... it doesn't get the value for some reason...

Last edited by rainin; 11-10-2011 at 15:51.
rainin is offline
Send a message via MSN to rainin
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 11-10-2011 , 15:53   Re: cs_get_user_money problem
Reply With Quote #9

Beginner by making such plugin ? So you have copied-pasted. You should start to the learn the very basic of Pawn before.

Anyway, what is the problem ? You say nothing. If unrelated to the current thread, you should make a new thread.
__________________

Last edited by Arkshine; 11-10-2011 at 15:53.
Arkshine is offline
rainin
Member
Join Date: Apr 2011
Location: Estonia
Old 11-10-2011 , 16:23   Re: cs_get_user_money problem
Reply With Quote #10

The problem is that the hudmessage shows wrong amount of money.

Example: i set money to 10000, but in the hudmessage there will be 0 money.
rainin is offline
Send a message via MSN to rainin
Reply


Thread Tools
Display Modes

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 14:21.


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