level show in the screen
#1

how can i script a level show in the screen ?
i want that it will work on the score of the player

Reply
#2

TextDrawCreate + TextDrawSetString.
Reply
#3

Click here! put that in a textdraw.
Reply
#4

how to put it?
Reply
#5

i did like that
PHP код:
new Text:himessage;
public 
OnGameModeInit()
{
himessage TextDrawCreate(1.05.6"Level");
}
public 
OnPlayerConnect(playerid)
{
       new 
newtext[41];
    
format(newtextsizeof(newtext), "Level: %i",PlayerLevel[playerid]);
    
TextDrawSetString(himessagenewtext);
       
TextDrawShowForPlayer(playeridhimessage); 
but its not working because it shows me level 0
and my level is 1337
Reply
#6

Because you didn't used GetPlayerScore.
Reply
#7

i dont need playerscore i need the player level that i script

I have command that working and shows the level
PHP код:
command(scoreplayeridparams[])
{
 new 
string[128];
 
format(stringsizeof(string), "Score: %i",PlayerLevel[playerid]);
 
SendClientMessage(playeridRedstring);
 return 
1;

Reply
#8

pawn Код:
CMD:score(playerid, params[])
{
    new string[128];
   
    format(string, sizeof(string), "Score: %i",PlayerLevel[playerid]); // Correct var?
    SendClientMessage(playerid, Red, string);
    return 1;
}
Reply
#9

the command is working
this not working

PHP код:
new Text:himessage;
public 
OnGameModeInit()
{
himessage TextDrawCreate(1.05.6"Level");
}
public 
OnPlayerConnect(playerid)
{
       new 
newtext[41];
    
format(newtextsizeof(newtext), "Level: %i",PlayerLevel[playerid]);
    
TextDrawSetString(himessagenewtext);
       
TextDrawShowForPlayer(playeridhimessage); 
Reply
#10

Are you getting errors? And the PlayerLevel is a known var?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)