SA-MP Forums Archive
problem with money - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: problem with money (/showthread.php?tid=290577)



problem with money - MonkZemun - 16.10.2011

hi,i have a problem..look at picture im not speak good english to explain that problem:

/imageshack/img854/4290/80642458.png

and the second problem is:

i put when i die i lost 500$,but problem is when i kill myself i lost 500$ and when i spawn i lost 100$..i don't know why 100$..i check the script and im not found something like GivePlayerMoney(playerid,-100);...please help me


Re: problem with money - [HiC]TheKiller - 16.10.2011

It automatically takes away $100 on death. Just give the player $100 when the die. Not fully sure about the losing $500 though.


Re: problem with money - Stigg - 16.10.2011

Update the stats on player death.


Re: problem with money - MonkZemun - 16.10.2011

its not a problem $500 i make when player die to lose $500 thats ok but problem is $100...im not make that player lose $100..
damn im not speak good english sorry..


Re: problem with money - MonkZemun - 16.10.2011

here is OnPlayerDeath:
PHP код:
public OnPlayerDeath(playeridkilleridreason)
{
    
SetPlayerScore(killeridGetPlayerScore(killerid)+1);
    
GivePlayerMonez(killerid,1500);
    
GivePlayerMonez(playerid,-500);
    
PlayerInfo[killerid][pKills]++;
    
PlayerInfo[playerid][pDeaths]++;
    return 
1;

GivePlayerMonez is because i use anti money cheat.


Re: problem with money - SmiT - 16.10.2011

Just as [HiC]TheKiller said, It automatically takes away $100 on death.


Re: problem with money - MonkZemun - 16.10.2011

ok,so what about my first problem,do you know how to fix that?


Re: problem with money - SmiT - 16.10.2011

Show us your code for that dialog part.


Re: problem with money - Mr_Scripter - 16.10.2011

i don't know what your money problem is btw i love they way you talk


Re: problem with money - MonkZemun - 16.10.2011

@Mr_Scripter
lol

@SmiT
PHP код:
COMMAND:stats(playeridparams[])
{
    if(
IsPlayerConnected(playerid))
     {
         new 
admin PlayerInfo[playerid][pAdmin];
          new 
vip PlayerInfo[playerid][pVIP];
        new 
money PlayerInfo[playerid][pCash];
        new 
level PlayerInfo[playerid][pScore];
        new 
kills PlayerInfo[playerid][pKills];
        new 
deaths PlayerInfo[playerid][pDeaths];
        new 
online PlayerInfo[playerid][pOnline];
        new 
string1[1024],stats[1024];
        
format(string1sizeof string1"{44A1D0}AdminLevel: {FFFFFF}[%d] {44A1D0}VIP: {FFFFFF}[%d] {44A1D0}Money: {FFFFFF}[$%d] {44A1D0}Score: {FFFFFF}[%d] {44A1D0}Kills: {FFFFFF}[%d] {44A1D0}Deaths: {FFFFFF}[%d] {44A1D0}OnlineMinutes: {FFFFFF}[%d]"adminvipmoneylevelkillsdeathsonline);
        
format(statssizeof stats"%s"string1);
        
ShowPlayerDialog(playerid,3,DIALOG_STYLE_MSGBOX,"Your account:",stats,"Ok","");
    }
    return 
1;