[FilterScript] Cyanide's Bench-Pressing System ( Bench Pressing in Multiplayer )
#10

Heh, i don't know how will you check in my server how much progress bars i have created.(also check j_fades, it also uses 1 textdraw)

Here's the secret:
You can create 1 textdraw(a box) and show it for all players yes? Okay, then: if you change the BOX SIZE, nothing will happen to any players. But when you reshow it for the player it does(thats how UpdateProgressBar works). So the point is: You can change the Bars value(the box size), and Update it ONLY FOR ONE PLAYER.

Here's my code:
pawn Код:
SetProgressBarValue(HealthBar, VehicleHealth);
        UpdateProgressBar(HealthBar, playerid);
You ask me why i studied this? Imagine a server with 500 slots.As we both know - 1 Progress bar = 3 text draws. Therefore 1 Progress Bar For Each Player 3*500 = 1500 TEXTDRAWS. That's insane.

Other than that:
bench_power[ playerid ]
bench_reps[ playerid ]
Is also not needed for every player, since it contains a constant string.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)