SA-MP Forums Archive
Show player score? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Show player score? (/showthread.php?tid=151553)



Show player score? - XxerykxX - 30.05.2010

Hello. Is there Function like ShowPlayerScore ? I mean like to have textdraw saying:

Drift Score: [Score]

If yes how do you make it?


Re: Show player score? - dice7 - 30.05.2010

No there isn't. You'll need to create your own textdraw


Re: Show player score? - Antonio [G-RP] - 30.05.2010

Simply Create a textdraw, then on it have this:

playerscore = GetPlayerScore(playerid);

TextDrawCreate(x,y,"Your score is %d",playerscore);


Re: Show player score? - Carlton - 30.05.2010

Quote:
Originally Posted by Antonio (eternalrp.webatu.com)
Simply Create a textdraw, then on it have this:

playerscore = GetPlayerScore(playerid);

TextDrawCreate(x,y,"Your score is %d",playerscore);
pawn Код:
public OnPlayerSpawn(playerid) {
  new string[46];
  format(string, sizeof(string), "Your score is %d", GetPlayerScore(playerid));
  TextDrawSetString(MyTextdraw, string);
  TextDrawHideForPlayer(playerid, MyTextdraw);
  TextDrawShowForPlayer(playerid, MyTextdraw);
  return 1;
}
You will have to create your textdraw in OnGameMode/OnFilterScript Init. Make sure you assign a different textdraw to each player.

Example:

pawn Код:
for(new i = 0; i < GetMaxPlayers(); i ++ ) {
   TextDrawCreate(MyScoreTextDraw[i], ...);
   etc..
}



Re: Show player score? - olabv - 13.12.2010

this is nice


Re: Show player score? - WillyP - 13.12.2010

Quote:
Originally Posted by olabv
Посмотреть сообщение
this is nice
Nice 7 month bump, retard. You're talking BS saying 'nice' to two consecutive topics that I have seen. GTFO.


Re: Show player score? - Alex_Valde - 13.12.2010

Quote:
Originally Posted by olabv
Посмотреть сообщение
this is nice
HAHAHAHA...I really can't believe!


Re: Show player score? - __ - 14.12.2010

Quote:
Originally Posted by [FU]Victious
Посмотреть сообщение
Nice 7 month bump, retard. You're talking BS saying 'nice' to two consecutive topics that I have seen. GTFO.
Do you have to rage and use profane words in every single post that you create?