Score=money
#1

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

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

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.
Reply
#4

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;
}
Reply
#5

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)