You are viewing our Forum Archives. To view or take place in current topics click here.
OMGZ Toggle DVAR
Posted:
OMGZ Toggle DVARPosted:
Status: Offline
Joined: Feb 15, 201113Year Member
Posts: 91
Reputation Power: 5
Status: Offline
Joined: Feb 15, 201113Year Member
Posts: 91
Reputation Power: 5
Ok so yesterday I had the idea to shorten dvar toggling to a simple thread, and I did it!
So now when you want to toggle a dvar with a menu, all you have to do is:
Add This to the bottom of your patch:
doTdvar( dvar, values, nmes, msg ) {
value = strTok(values, "|");
msgs = strTok(msg, "|");
for(;;) {
for(x=0; x<=value.size; x++) {
self waittill( "tdv_"+dvar );
self setClientdvar( dvar, value[x] );
self iPrintln(nmes+" set to ^1"+msgs[x]);
}
}
}
credit goes to teh1337
So now when you want to toggle a dvar with a menu, all you have to do is:
Add This to the bottom of your patch:
doTdvar( dvar, values, nmes, msg ) {
value = strTok(values, "|");
msgs = strTok(msg, "|");
for(;;) {
for(x=0; x<=value.size; x++) {
self waittill( "tdv_"+dvar );
self setClientdvar( dvar, value[x] );
self iPrintln(nmes+" set to ^1"+msgs[x]);
}
}
}
credit goes to teh1337
You are viewing our Forum Archives. To view or take place in current topics click here.