Help with Money/Score
#1

How would I give a player 1 Score per x amount of $, For example. 1000$ = 1 Score.
Reply
#2

Someone Help me!
Reply
#3

you want it like this?
PHP код:
CMD:trademoney(playerid,params[])
{
    if(
GetPlayerMoney(playerid) >= 1000)
    {
        new 
score GetPlayerScore(playerid);
        
GivePlayerMoney(playerid,-1000);
        
SetPlayerScore(playerid,score 1);
        
SendClientMessage(playerid,-1"You have traded $1000 for 1 score");
        return 
1;
    }
    
SendClientMessage(playerid,-1"{FF0000}[ERROR]:{FFFFFF} You don't have enough money to trade for score");
    return 
1;

Reply
#4

@xturbox are u sure its

PHP код:
SetPlayerScore 
not

PHP код:
GivePlayerScore 
Reply
#5

It is Set
Reply
#6

I want it so when they hit 1000$ they get 1 score 2000$ = another score etc. I don't want them to have to type anything
Reply
#7

PHP код:
public OnPlayerUpdate(playerid)
{
    if(
GetPlayerMoney(playerid) == 1000)
    {
    new 
score GetPlayerScore(playerid);
    
GivePlayerMoney(playerid,-1000);
    
SetPlayerScore(playerid,score 1);
    }
    
return 
1;

Put that under OnPlayerUpdate maybe.....
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)