Help in dialog
#1

How Do Rank in dialog?

in this dialog:


PHP код:
public OnPlayerUpdateplayerid )
{
    new 
string128 ];
    new 
score;
    
score GetPlayerScore(playerid);
    
formatstringsizeof string"Score:~r~ %d"score );
    
TextDrawSetString(Textdraw0string);
    new 
cash;
    
cash GetPlayerMoneyplayerid );
    
formatstringsizeof string"Money:~r~ %d"cash );
    
TextDrawSetString(Textdraw1string );
    if(
GetPlayerScore(playerid) >= 1000rankplayerid ] = 6;
    else if(
GetPlayerScore(playerid) >= 700rankplayerid ] = 5;    
    else if(
GetPlayerScore(playerid) >= 500rankplayerid ] = 4;
    else if(
GetPlayerScore(playerid) >= 200rankplayerid ] = 3;
    else if(
GetPlayerScore(playerid) >= 100rankplayerid ] = 2;
    else if(
GetPlayerScore(playerid) >= 50rankplayerid ] = 1;
    else if(
GetPlayerScore(playerid) >= 0rankplayerid ] = 0;
    
formatstringsizeof string"Rank:~r~ %d"rankplayerid ] );
    
TextDrawSetStringTextdraw2string );
    return 
1;

Reply
#2

What is it exactly you're trying to solve?
Reply
#3

First of all, TextDrawSetString is not used for dialogs.

Then, have a look here and Strcat
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)