Textdraw team names - 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)
+--- Thread: Textdraw team names (
/showthread.php?tid=540095)
Textdraw team names -
YanLanger - 02.10.2014
Hello! Does anyone know how can i make textdraw team names,
EXAMPLE: I am cop so under the money it says POLICE TEAM (In blue ofc)
And if i am civilian it says "CIVILIAN" in white.
Oh and please make it a tutorial.
Thanks.
Re: Textdraw team names -
Eth - 02.10.2014
Tutorial on how to make an updated textdraw:
first at the top of your script:
pawn Код:
new Text:TeamText[MAX_PLAYERS];//The textdraw we are going to updat
Onplayerconnect:
pawn Код:
TeamText[playerid] = TextDrawCreate(1.500000, 432.000000, "");//We create the textdraw at X and Y you can change it if you want
TextDrawBackgroundColor(TeamText[playerid], 255);//We set the background of the textdraw to 225 which is black I guess
TextDrawFont(TeamText[playerid], 1);//We change the text font to 1
TextDrawColor(TeamText[playerid], -1);//We change the textdraw color to -1 which is white, we will change it soon
now On player spawn:
pawn Код:
if(gTeam[playerid] == TEAM_COPS)//IF THE TEAM IS COPS you can change the TEAM_COPS to the cops team
{
TextDrawSetString(TeamText[playerid],"Cops");//we set the textdraw text to Cops
TextDrawColor(TeamText[playerid],0x3A47DEFF);//we change the text color to blue
}
else if(gTeam[playerid] == TEAM_CAV)//IF THE TEAM IS CAV you can change the TEAM_CAV to the robbers team
{
TextDrawSetString(TeamText[playerid],"Cavillian");//we set the textdraw text to Cavillian
TextDrawColor(TeamText[playerid],-1);//we change the text color to white
}
Re: Textdraw team names -
mant - 02.10.2014
Aedy Le 3amak Abrahem +Rep Yad
We ana Hadek