TextDraw update - 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 update (
/showthread.php?tid=369276)
TextDraw update -
Korisnik - 16.08.2012
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.
Re: TextDraw update -
[MM]RoXoR[FS] - 16.08.2012
pawn Код:
format(str, sizeof(str), "Minigun: %d Trkanje: %d Kros: %d Bombe: %d VS: %d VDM: %d", mg, racing, kros, bomb, vs, vdm);