AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   cs_get_user_money problem (https://forums.alliedmods.net/showthread.php?t=171760)

rainin 11-10-2011 14:44

cs_get_user_money problem
 
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.

tuty 11-10-2011 15:03

Re: cs_get_user_money problem
 
PHP Code:

DR_LIFE_COUNT You have %i lifes & %d Money


rainin 11-10-2011 15:12

Re: cs_get_user_money problem
 
Quote:

Originally Posted by tuty (Post 1594039)
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.

Arkshine 11-10-2011 15:28

Re: cs_get_user_money problem
 
Invalid player 3 , means the player was not connected anymore when the native has been called. Make sure the player is connected before.

tuty 11-10-2011 15:36

Re: cs_get_user_money problem
 
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"

rainin 11-10-2011 15:37

Re: cs_get_user_money problem
 
Not needed...

Arkshine 11-10-2011 15:48

Re: cs_get_user_money problem
 
How it's related the current thread ?

rainin 11-10-2011 15:50

Re: cs_get_user_money problem
 
Quote:

Originally Posted by Arkshine (Post 1594087)
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...

Arkshine 11-10-2011 15:53

Re: cs_get_user_money problem
 
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.

rainin 11-10-2011 16:23

Re: cs_get_user_money problem
 
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.


All times are GMT -4. The time now is 14:21.

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