Help me with the score textdraw please. - 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: Help me with the score textdraw please. (
/showthread.php?tid=74353)
Help me with the score textdraw please. -
GammerZ - 21.04.2009
I am editing area51 and y want to add a score textdraw for the teams.
This is my code..
Код:
new Text:Textdraw0;
new SwatScore;
new DrugScore;
new Text:Textdraw1;
new Text:Textdraw2;
new Text:Textdraw3;
Ongamemodeinit
Код:
public OnGameModeInit()
{
SetGameModeText("Area 51 Break-in");
ShowNameTags(1);
ShowPlayerMarkers(0);
DisableInteriorEnterExits();
AllowInteriorWeapons(1);
SetWorldTime(0);
Textdraw0 = TextDrawCreate(447.000000,228.000000,"Swat");
Textdraw1 = TextDrawCreate(447.000000,247.000000,"Narcos");
Textdraw2 = TextDrawCreate(535.000000,229.000000,"=");
Textdraw3 = TextDrawCreate(556.000000,247.000000,"=");
TextDrawAlignment(Textdraw0,1);
TextDrawAlignment(Textdraw1,0);
TextDrawAlignment(Textdraw2,0);
TextDrawAlignment(Textdraw3,0);
TextDrawBackgroundColor(Textdraw0,0x000000ff);
TextDrawBackgroundColor(Textdraw1,0x000000ff);
TextDrawBackgroundColor(Textdraw2,0x000000ff);
TextDrawBackgroundColor(Textdraw3,0x000000ff);
TextDrawFont(Textdraw0,3);
TextDrawLetterSize(Textdraw0,0.899999,1.400000);
TextDrawFont(Textdraw1,3);
TextDrawLetterSize(Textdraw1,0.899999,1.400000);
TextDrawFont(Textdraw2,3);
TextDrawLetterSize(Textdraw2,0.799999,1.400000);
TextDrawFont(Textdraw3,3);
TextDrawLetterSize(Textdraw3,0.799999,1.500000);
TextDrawColor(Textdraw0,0x0000ffcc);
TextDrawColor(Textdraw1,0x00ff0066);
TextDrawColor(Textdraw2,0xffffffff);
TextDrawColor(Textdraw3,0xffffffff);
TextDrawSetOutline(Textdraw0,1);
TextDrawSetOutline(Textdraw1,1);
TextDrawSetOutline(Textdraw2,1);
TextDrawSetOutline(Textdraw3,1);
TextDrawSetProportional(Textdraw0,1);
TextDrawSetProportional(Textdraw1,1);
TextDrawSetProportional(Textdraw2,1);
TextDrawSetProportional(Textdraw3,1);
TextDrawSetShadow(Textdraw0,1);
TextDrawSetShadow(Textdraw1,1);
TextDrawSetShadow(Textdraw2,1);
TextDrawSetShadow(Textdraw3,1);
return 1;
}
OnPlayerconnect...
Код:
public OnPlayerConnect(playerid)
{
GameTextForPlayer(playerid,"~w~Welcome to ~r~Area 51",4000,3);
SetPlayerColor(playerid,COLOR_GREY);
TextDrawShowForPlayer(playerid,Textdraw0);
TextDrawShowForPlayer(playerid,Textdraw1);
TextDrawShowForPlayer(playerid,Textdraw2);
TextDrawShowForPlayer(playerid,Textdraw3);
return 1;
}
And Onplayerdeath y put this..
Код:
public OnPlayerDeath(playerid, killerid, reason)
{
new string[100];
DrugScore += 1;
if (killerid != INVALID_PLAYER_ID)
{
if (gTeam[playerid] == gTeam[killerid])
{
SetPlayerScore(killerid, GetPlayerScore(killerid) - 1);
}
else
{
SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);
}
if(gTeam[killerid] == TEAM_SWAT)
{
SwatScore += 1;
format(string,sizeof(string),"=%d", SwatScore);
TextDrawSetString(Textdraw2, string);
}
if(gTeam[killerid] == TEAM_DEFENCE)
{
DrugScore += 1;
format(string,sizeof(string),"=%d", DrugScore);
TextDrawSetString(Textdraw3, string);
}
}
SendDeathMessage(killerid, playerid, reason);
SetPlayerColor(playerid,COLOR_GREY);
return 1;
}
So when the team swat kill someone, will won 1 score and it will show the teamsґs score on the textdraw, but it not working, can someone help me please?
sorry for my bad english
Re: Help me with the score textdraw please. -
GammerZ - 21.04.2009
Actualized,
please help me
Re: Help me with the score textdraw please. -
GammerZ - 22.04.2009
can someone help me? thx