Score
#1

i've made a score textdraw that appears top of the screen but its not working :S

Onplayerspawn :
Код:
public OnPlayerSpawn(playerid)
{
  if(gTeam[playerid] == TEAM_LS)
  	{
  		SetPlayerColor(playerid,COLOR_GREEN);
  	}
  	else
  	{
  	if(gTeam[playerid] == TEAM_LV)
  	{
  		SetPlayerColor(playerid,COLOR_YELLOW);
  	}
  }
  return 1;
}
Onplayerrequestclass :

Код:
public OnPlayerRequestClass(playerid, classid)
{
  iSpawnSet[playerid] = 0;
	SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
 	SetPlayerCameraPos(playerid, 1961.1343,1342.7173,15.3746);
	SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
	SetupPlayerForClassSelection(playerid);
	switch (classid)
	{
		case 0:
		{
			GameTextForPlayer(playerid, "~g~Los Santos", 1000, 3);
			SetPlayerColor(playerid,COLOR_GREEN);
			gTeam[playerid] = TEAM_LS;
		}
		case 1:
		{
			GameTextForPlayer(playerid, "~Y~Las Venturas", 1000, 3);
			SetPlayerColor(playerid,COLOR_YELLOW);
			gTeam[playerid] = TEAM_LV;
		}
}
return 1;
}
Ongamemodeinit (the textdraw part) :

Код:
Textdraw2 = TextDrawCreate(394.000000,1.000000,"LS:[%s]|| LV:[%s]");
    new string[128];
	format(string, sizeof(string), "LS: %d || LV: %d", lsscore, lvscore);
	TextDrawSetString(Textdraw2, string);
    TextDrawShowForAll(Textdraw2);
	TextDrawAlignment(Textdraw2,0);
	TextDrawBackgroundColor(Textdraw2,0x0000ffcc);
 	TextDrawFont(Textdraw2,3);
	TextDrawLetterSize(Textdraw2,0.399999,1.100000);
	TextDrawColor(Textdraw2,0xffffffff);
	TextDrawSetOutline(Textdraw2,1);
	TextDrawSetProportional(Textdraw2,1);
	TextDrawSetShadow(Textdraw2,1);
can anyone help me?
Reply


Messages In This Thread
Score - by hvampire - 02.02.2010, 17:56
Re: Score - by Toribio - 02.02.2010, 18:00
Re: Score - by hvampire - 02.02.2010, 18:03
Re: Score - by LuxurioN™ - 02.02.2010, 18:12
Re: Score - by hvampire - 02.02.2010, 18:20
Re: Score - by LuxurioN™ - 02.02.2010, 18:33
Re: Score - by hvampire - 02.02.2010, 19:20
Re: Score - by LuxurioN™ - 02.02.2010, 19:21
Re: Score - by hvampire - 02.02.2010, 19:25
Re: Score - by LuxurioN™ - 02.02.2010, 19:27

Forum Jump:


Users browsing this thread: 1 Guest(s)