SA-MP Forums Archive
Score=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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Score=money (/showthread.php?tid=241549)



Score=money - Ondracec - 18.03.2011

I need in the table when press tab this: players score=players money...So id=0 name=player score=his money ping=xx


Re: Score=money - Medal Of Honor team - 18.03.2011

pawn Код:
public OnPlayerUpdate(playerid)
{
    SetPlayerScore(playerid, GetPlayerMoney(playerid));
    return 1;
}



Re: Score=money - Haydz - 18.03.2011

This should work but i'm not 100% sure.

pawn Код:
#define GivePlayerMoney GivePlayerCash //So you can still use GivePlayerMoney(playerid, amount); and don't have to worry about changing all of them.
stock GivePlayerCash(playerid,amount)
{
    GivePlayerMoney(playerid, amount); //give the player the amount you put.
    SetPlayerScore(playerid, GetPlayerMoney(playerid)); //set there score to there current money.
    return 1;
}
also note if you have something like serverside money which changes the way you give money you could just put this in
pawn Код:
SetPlayerScore(playerid, GetPlayerMoney(playerid));
If you don't have anything like Server side money (anti cheat) just ignore what i said just above and use the first code i posted. Hopefully that should work.


Re: Score=money - xDeadlyBoy - 18.03.2011

Quote:
Originally Posted by Hayden_Bruin
Посмотреть сообщение
This should work but i'm not 100% sure.

pawn Код:
#define GivePlayerMoney GivePlayerCash //So you can still use GivePlayerMoney(playerid, amount); and don't have to worry about changing all of them.
stock GivePlayerCash(playerid,amount)
{
    GivePlayerMoney(playerid, amount); //give the player the amount you put.
    SetPlayerScore(playerid, GetPlayerMoney(playerid)); //set there score to there current money.
    return 1;
}
also note if you have something like serverside money which changes the way you give money you could just put this in
pawn Код:
SetPlayerScore(playerid, GetPlayerMoney(playerid));
If you don't have anything like Server side money (anti cheat) just ignore what i said just above and use the first code i posted. Hopefully that should work.
correction:
pawn Код:
stock GivePlayerCash(playerid,amount)
{
    #undef GivePlayerCash
    GivePlayerMoney(playerid, amount); //give the player the amount you put.
    #define GivePlayerCasg GivePlayerMoney
    SetPlayerScore(playerid, GetPlayerMoney(playerid)); //set there score to there current money.
    return 1;
}



Re: Score=money - Mike Garber - 18.03.2011

If you want player score to be money, expect people to think your script is a Godfather edit and they will ragequit because they think admins are abusive (setting their "Level") That's the situation on the server we're having right now.