Server Crash with Textdraw - 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: Server Crash with Textdraw (
/showthread.php?tid=230388)
Server Crash with Textdraw -
Criss_Angel - 23.02.2011
pawn Код:
speedo[playerid] = TextDrawCreate(241,428,"Speed: 0/kmh"); //create the textdraw at position
TextDrawFont(speedo[playerid],3); //font type of textdraw
TextDrawLetterSize(speedo[playerid],0.699999,1.700000); //size...
TextDrawColor(speedo[playerid],COLOR_GREY); //color
TextDrawSetShadow(speedo[playerid],3); //dropping the shadow
SetTimerEx("Speed", 1000, true, "isf");
TextDrawShowForPlayer(playerid,speedo[playerid]);
When i comment it out , everything works.When its on, the server crashes when i enter a vehicle.
Re: Server Crash with Textdraw -
Criss_Angel - 23.02.2011
UPDATE:
I found out my error is in the Timer here is timer:
[pawn
public Speed(playerid)
{
GetPlayerSpeed(playerid);
new speed[88];
format(speed, sizeof(speed),"Fuel: %i/kmh", GetPlayerSpeed(playerid));
TextDrawSetString(speedo[playerid], speed);
TextDrawShowForPlayer(playerid, speedo[playerid]);
return 1;
}
[/pawn[