08.07.2010, 13:44
Alright, I am having trouble with setting a string in two textdraws!
Here is what I have:
So each time the player does something good in the team, the whole team will get cash that can't be accessed yet.
But the Textdraws will show how much both team have earnt.
That is being called on each time they player does something for the team.
Updates the textdraws I thought!
T1Cash and T2Cash are like
Now this is the bit which sets the teams cash!
Anyone got any ideas on how I can fix this?
Here is what I have:
pawn Код:
//Under OnGamemodeInit
Textdraw0 = TextDrawCreate(4.000000,287.000000,"_");
TextDrawAlignment(Textdraw0,0);
TextDrawBackgroundColor(Textdraw0,0x000000ff);
TextDrawFont(Textdraw0,3);
TextDrawLetterSize(Textdraw0,0.399999,1.300000);
TextDrawColor(Textdraw0,0x0000ffff);
TextDrawSetProportional(Textdraw0,1);
TextDrawSetShadow(Textdraw0,2);
Textdraw1 = TextDrawCreate(4.000000,304.000000,"_");
TextDrawAlignment(Textdraw1,0);
TextDrawBackgroundColor(Textdraw1,0x000000ff);
TextDrawFont(Textdraw1,3);
TextDrawLetterSize(Textdraw1,0.399999,1.300000);
TextDrawColor(Textdraw1,0x0000ffff);
TextDrawSetProportional(Textdraw1,1);
TextDrawSetShadow(Textdraw1,2);
But the Textdraws will show how much both team have earnt.
pawn Код:
public UpdateTeamCash()
{
new string1[60];
new string2[60];
format(string1, sizeof(string1), "Team 1 Cash: %s", T1Cash);
format(string2, sizeof(string2), "Team 2 Cash: %s", T2Cash);
TextDrawSetString(Textdraw0,string1);
TextDrawSetString(Textdraw1,string2);
return 1;
}
Updates the textdraws I thought!
T1Cash and T2Cash are like
pawn Код:
//On Top of Script
new T1Cash = 0;
new T2Cash = 0;
pawn Код:
if(gTeam[playerid] == 0)
{
T1Cash = T1Cash+1000;
}
else if(gTeam[playerid] == 1)
{
T2Cash = T2Cash+1000;
}
SendClientMessage(playerid, COLOR_YELLOW, "$1000 has been added to your teams cash!.");
}