TextDraw update
#1

I want to make dm and racing zones, and to show in textdraw how many player play in each.

Here is my code:

command:
Код:
CMD:minigun(playerid, params[])
{
	new msg[80];
	if(gMinigun[playerid] == 0)
	{
		mg ++;
		gMinigun[playerid] = 1;
		format(msg, sizeof(msg), "%s je uљao na (/minigun).", GetName(playerid));
		SendClientMessageToAll(COLOR_SERVER, msg);
	}
	else if(gMinigun[playerid] == 1)
	{
		mg --;
		gMinigun[playerid] = 0;
		format(msg, sizeof(msg), "%s je napustio (/minigun).",GetName(playerid));
		SendClientMessageToAll(COLOR_SERVER, msg);
	}
	return 1;
}
and rest
Код:
public OnPlayerUpdate(playerid)
{
	new str[150];
	TextDrawHideForAll(Textdraw1);
	format(str, sizeof(str), "Minigun: 0 Trkanje: 0 Kros: 0 Bombe: 0 VS: 0 VDM: 0", mg, racing, kros, bomb, vs, vdm);
	TextDrawSetString(Textdraw1, str);
	TextDrawShowForAll(Textdraw1);
	return 1;
}
it doesn't show any errors or warnings, it shows the textdraw, but dont update it.
Reply
#2

pawn Код:
format(str, sizeof(str), "Minigun: %d Trkanje: %d Kros: %d Bombe: %d VS: %d VDM: %d", mg, racing, kros, bomb, vs, vdm);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)