#1

Good afternoon,
I have several problems. Over the thirty (30) users some things stop working, sometimes no, others yes. For example, if the server spent thirty (30) users in the day, when displaying a TextDraw that counts the seconds reset directly not shown or shown in another place. Another thing are the timers, there are times when the speedometer stops working with a lot of players (40-50-60), I have made 1000 ms, what could it be?

Note:
I do not know if it will do, but at the top of the script-down includes, I have this:

#pragma dynamic 100000

MAX_PLAYERS is also 100.

Sorry for my bad English; I'm using ****** Translate.
Reply
#2

how you define the textdraws? in a array? so it is easy to get confused to programmer and send the data to another TextDraw. їHow do you define textdraws per player?

If some things stop working may be due to some crash in the code.

Do following:

1. Create a file with name "pawn.cfg" in pawn.exe folder and write in he "-d3" (without quotes)
2. Compile the code, delete #pragma dynamic

And see the message of compiler, the stack used, etc.
Reply
#3

The TextDraw have it reset as follows:

Код:
new Text:Reinicio;

Reinicio = TextDrawCreate (233.000000, 346.000000, "");
By placing /reboot:

Код:
TextDrawShowForAll (Reinicio);
Every second is updated if "ServerRestart" is equal to 1:

Код:
format (string, 22, "Restart in: %02d:%02d", tiempito[1], tiempito[2]);
TextDrawSetString (Reinicio, string);
Speedometer:

Код:
enum playerData 
{
        ...,
	PlayerText:pTextdraws[6]
};
Код:
PlayerData[playerid][pTextdraws][2] = CreatePlayerTextDraw(playerid, 511.000000, 376.000000, "");
1000 ms (1 second)

Код:
forward GetVehicleSpeed(vehicleid);
public GetVehicleSpeed(vehicleid)
{
    new Float:X, Float:Y, Float:Z;
    GetVehicleVelocity(vehicleid, X, Y, Z);
    return floatround(floatsqroot(X * X + Y * Y + Z * Z) * 200);
}

velocidad = GetVehicleSpeed(GetPlayerVehicleID(i));

format(string, sizeof(string), "Velocidad:~w~ %0.0fkm", velocidad);
PlayerTextDrawSetString(i, PlayerData[i][pTextdraws][2], string);
No #pragma dynamic 100000 rolls the next (long optimize cells, leaving the fair for every situation, though, do not know why it keeps pulling):

Код:
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase

Header size:          29032 bytes
Code size:          3704132 bytes
Data size:          8573192 bytes
Stack/heap size:      16384 bytes; estimated max. usage=64173 cells (256692 bytes)
Total requirements:12322740 bytes
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)