Well, Halloween ended with all its stirs, cheats and farms. Now is the time to do useful things for community.
Here slightly fixed code for delay-show-decals (ClassicGuzzi - thanks!), and,
now seems it finaly works!
PHP Code:
public OnClientPostAdminCheck(client) {
CreateTimer(45.0, timerSprayDecal, GetClientUserId(client));
}
public Action:timerSprayDecal(Handle:timer, any:userID) {
// Show him what we have
decl Float:position[3];
decl id, precache;
new client = GetClientOfUserId(userID);
if (client < 1 || client > MaxClients || !IsClientInGame(client))
return;
new size = GetArraySize(adt_decal_id);
for (new i=0; i<size; ++i)
{
id = GetArrayCell(adt_decal_id, i);
precache = GetArrayCell(adt_decal_precache, id);
GetArrayArray(adt_decal_position, i, _:position);
TE_SetupBSPDecal(position, 0, precache);
TE_SendToClient(client);
//TE_SendToAll();
}
}
But! Here is
45 seconds delay (sic!). Therefore, this solution is valid only temporary...
My experiments show that our problem (no decals, but after 'retry' all ok), this problem appear primarily on old computers with slow hard drives and the lack of RAM. For example for one of my computers (cel-2.66/1.25gb ram/40 gb hdd) delay=30 sec was insufficient, only with delay > 40 sec decals appears in ~ 10 secs after MOTD. On the other hand, on a fast computer, player must wait almost a minute until the decals will appear, and it's bad, of course.
This difference in time suggests that time point of execution display-decals-procedure chosen
incorrectly. This means that
we are trying to to force client display a decal, but he for some reason is not yet ready to do it. In my opinion, the best time to "display" decals - the
appearance of MOTD on clients. Or, in slightly worst case, time when player selects team
in first time. However, my knowledge is not enough to bind "show decals" for this moment.
Can anyone help with this problem?