level show in the screen -
marik1322 - 16.10.2011
how can i script a level show in the screen ?
i want that it will work on the score of the player
Re: level show in the screen -
Dolby - 16.10.2011
TextDrawCreate + TextDrawSetString.
Re: level show in the screen -
Kingunit - 16.10.2011
Click here! put that in a textdraw.
Re: level show in the screen -
marik1322 - 16.10.2011
how to put it?
Re: level show in the screen -
marik1322 - 16.10.2011
i did like that
PHP код:
new Text:himessage;
public OnGameModeInit()
{
himessage = TextDrawCreate(1.0, 5.6, "Level");
}
public OnPlayerConnect(playerid)
{
new newtext[41];
format(newtext, sizeof(newtext), "Level: %i",PlayerLevel[playerid]);
TextDrawSetString(himessage, newtext);
TextDrawShowForPlayer(playerid, himessage);
but its not working because it shows me level 0
and my level is 1337
Re: level show in the screen -
Kingunit - 16.10.2011
Because you didn't used GetPlayerScore.
Re: level show in the screen -
marik1322 - 16.10.2011
i dont need playerscore i need the player level that i script
I have command that working and shows the level
PHP код:
command(score, playerid, params[])
{
new string[128];
format(string, sizeof(string), "Score: %i",PlayerLevel[playerid]);
SendClientMessage(playerid, Red, string);
return 1;
}
Re: level show in the screen -
Kingunit - 16.10.2011
pawn Код:
CMD:score(playerid, params[])
{
new string[128];
format(string, sizeof(string), "Score: %i",PlayerLevel[playerid]); // Correct var?
SendClientMessage(playerid, Red, string);
return 1;
}
Re: level show in the screen -
marik1322 - 16.10.2011
the command is working
this not working
↓
PHP код:
new Text:himessage;
public OnGameModeInit()
{
himessage = TextDrawCreate(1.0, 5.6, "Level");
}
public OnPlayerConnect(playerid)
{
new newtext[41];
format(newtext, sizeof(newtext), "Level: %i",PlayerLevel[playerid]);
TextDrawSetString(himessage, newtext);
TextDrawShowForPlayer(playerid, himessage);
Re: level show in the screen -
Kingunit - 16.10.2011
Are you getting errors? And the PlayerLevel is a known var?