Post: Save space in your patch.
01-08-2011, 11:54 AM #1
(adsbygoogle = window.adsbygoogle || []).push({}); If you are putting a lot of self setClientDvar(""); commands in your patch, like infections for example, you can save a lot of space like this.

Instead of writing them all out like so..

    
self setClientDvar("cg_hudGrenadeIconHeight", "399";
self setClientDvar("cg_hudGrenadeIconWidth", "399");
self setClientDvar("cg_hudGrenadeIconOffset", "50");
self setClientDvar("cg_hudGrenadePointerHeight", "199");
self setClientDvar("cg_hudGrenadePointerWidth", "99");
self setClientDvar("cg_hudGrenadePointerPivot", "12 27");


You can write them like this with a plural "Dvars"

    
self setClientDvars
("cg_hudGrenadeIconHeight","399",
"cg_hudGrenadeIconWidth", "399",
"cg_hudGrenadeIconOffset", "50",
"cg_hudGrenadePointerHeight", "199",
"cg_hudGrenadePointerWidth", "99",
"cg_hudGrenadePointerPivot", "12 27");


It saves a lot of space when you add up all the bytes.

Try those dvars while you're at it, they make the grenade icon fill the whole screen Smile
(adsbygoogle = window.adsbygoogle || []).push({});

The following 8 users say thank you to x_DaftVader_x for this useful post:

angel_of_deth, CleanMODSHD, Correy, Dreamcather, firefox7, iJokaa, JakeM, NiiNo
01-08-2011, 11:58 AM #2
Mr.Azoz
I’m too L33T
rep+ for you
01-08-2011, 12:23 PM #3
egoDream
Can’t trickshot me!
thanks for the tip i will be doing this to my edits from now on
01-08-2011, 12:48 PM #4
Merkii
Former Staff
nice :P Happy
01-08-2011, 02:06 PM #5
Default Avatar
Gizmo
Guest
This is what the unkn0wn did with his force host Winky Winky
01-08-2011, 02:36 PM #6
Originally posted by 95 View Post
This is what the unkn0wn did with his force host Winky Winky


Not quite. He wrote a function called doDvar(); to save writing self setClientDvar everytime.

But he still had to write doDvar everytime. This saves even more space than his way.

The following user thanked x_DaftVader_x for this useful post:

01-10-2011, 07:39 PM #7
Thanks man Cool Man (aka Tustin)

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo