PDA

View Full Version : problem with money


MonkZemun
16/10/2011, 10:23 AM
hi,i have a problem..look at picture im not speak good english to explain that problem:

http://img854.imageshack.us/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

[HiC]TheKiller
16/10/2011, 10:42 AM
It automatically takes away $100 on death. Just give the player $100 when the die. Not fully sure about the losing $500 though.

Stigg
16/10/2011, 11:00 AM
Update the stats on player death.

MonkZemun
16/10/2011, 11:04 AM
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..

MonkZemun
16/10/2011, 11:06 AM
here is OnPlayerDeath:

public OnPlayerDeath(playerid, killerid, reason)
{
SetPlayerScore(killerid, GetPlayerScore(killerid)+1);
GivePlayerMonez(killerid,1500);
GivePlayerMonez(playerid,-500);
PlayerInfo[killerid][pKills]++;
PlayerInfo[playerid][pDeaths]++;
return 1;
}

GivePlayerMonez is because i use anti money cheat.

SmiT
16/10/2011, 11:09 AM
Just as [HiC]TheKiller said, It automatically takes away $100 on death.

MonkZemun
16/10/2011, 11:14 AM
ok,so what about my first problem,do you know how to fix that?

SmiT
16/10/2011, 11:22 AM
Show us your code for that dialog part.

Mr_Scripter
16/10/2011, 11:23 AM
i don't know what your money problem is btw i love they way you talk

MonkZemun
16/10/2011, 11:26 AM
@Mr_Scripter
lol

@SmiT
COMMAND:stats(playerid, params[])
{
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(string1, sizeof 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]", admin, vip, money, level, kills, deaths, online);
format(stats, sizeof stats, "%s", string1);
ShowPlayerDialog(playerid,3,DIALOG_STYLE_MSGBOX,"Your account:",stats,"Ok","");
}
return 1;
}

SmiT
16/10/2011, 11:35 AM
new money = GetPlayerMoney( playerid );

Unte99
16/10/2011, 11:39 AM
I think he is telling that he doesn't want that player would loose 100$ on death. Well then i would suggest to make the player loose 400$ and then when he spawns, he will loose 100$, that's a total of 500$.

MonkZemun
16/10/2011, 12:44 PM
thank you guys,i found a solution for all..

+1 rep for all