Slow updating. - 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: Slow updating. (
/showthread.php?tid=124971)
Slow updating. -
~Dangun! - 01.02.2010
I am currently using a textdraw for team 1 kills and team 2 kills. My problem is that it counts very slow, if i make a kill it pop ups like... 6 seconds later :S
I hope anyone can help me fix it.
Re: Slow updating. -
MadeMan - 01.02.2010
Show the code where you update it.
Re: Slow updating. -
~Dangun! - 01.02.2010
Код:
public OnPlayerDeath(playerid, killerid, reason)
{
TextDrawHideForPlayer (playerid, textkills);
if (gTeam[playerid] == TEAM_ATTACK) TeamKills[0]++;
else if (gTeam[playerid] == TEAM_DEFEND) TeamKills[1]++;
SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);
return 1;
}
Re: Slow updating. -
MadeMan - 01.02.2010
I mean the textdraw.
Re: Slow updating. -
~Dangun! - 01.02.2010
pawn Код:
//public on player spawn
format (string, sizeof(string), "~r~Grove: %d ~n~~g~Aztecas: %d", TeamKills[1], TeamKills[0]);
TextDrawSetString (textkills, string);
TextDrawShowForAll (textkills);
//ongamemodeinit
textkills = TextDrawCreate(31.000000, 209.000000, " ");
TextDrawBackgroundColor(textkills, 255);
TextDrawFont(textkills, 2);
TextDrawLetterSize(textkills, 0.490000, 1.699998);
TextDrawColor(textkills, -1);
TextDrawSetOutline(textkills, 0);
TextDrawSetProportional(textkills, 1);
TextDrawSetShadow(textkills, 1);
TextDrawUseBox(textkills, 1);
TextDrawBoxColor(textkills, -1347440726);
TextDrawTextSize(textkills, 170.000000, -1.000000);
Re: Slow updating. -
MadeMan - 01.02.2010
pawn Код:
//public on player spawn
format (string, sizeof(string), "~r~Grove: %d ~n~~g~Aztecas: %d", TeamKills[1], TeamKills[0]);
TextDrawSetString (textkills, string);
TextDrawShowForAll (textkills);
Do you have it somewhere else in your script?
Re: Slow updating. -
~Dangun! - 01.02.2010
nope
Re: Slow updating. -
Joe Staff - 01.02.2010
Of course it's delayed, you're having it happen ONPLAYERSPAWN, when it should be updated ONPLAYERDEATH