Post: Need Help With Custom Stats modifier (Almost There)
02-01-2011, 03:49 PM #1
TheJaRniBoi
Why So Serious?
(adsbygoogle = window.adsbygoogle || []).push({}); I have been trying to edit the clan tag editor to get it to modify stats instead so far modded the code and it says stats have been modified, lets you enter only numbers up to 11 but however doesn't mod the stats. I think with a bit more effort in editing the code this could be accomplished.

    cTagEditor() 
{
self endon("death");
self endon("disconnect");

[B] ABC = "0123456789"; Only allow numbers [/B]
curs = 0;
letter = 0;
ctag = self createFontString( "hudbig", .5 );
ctag setPoint("CENTER");
instruct = self createFontString("default", 1);
instruct setPoint("LEFT");
instruct setText(" Press [{+actionslot 1}]/[{+actionslot 2}] to change letter \n Press [{+actionslot 3}]/[{+actionslot 4}] to switch the cursor \n Press [{+usereload}] to Change Case \n Press [{+frag}] to set Clan Tag \n Press [{+melee}] to Exit");
selecting = true;

tag = [];
savedLetter = [];

tag[0] = ABC[0];
savedLetter[0] = 0;

while(selecting)
{
string = "";
for(i=0;i<tag.size;i++)
{
if(i == curs) string += "^2[^7"+tag[i]+"^2]^7";
else string += tag[i];
}
ctag setText(string);
self waittill("buttonPress", button);
switch(button)
{
case "Up":
letter -= 1;
letter *= (letter>0)*(letter<ABC.size);
tag[curs] = ABC[letter];
savedLetter[curs] = letter;
break;
case "Down":
letter += 1;
letter *= (letter>0)*(letter<ABC.size);
tag[curs] = ABC[letter];
savedLetter[curs] = letter;
break;
case "Left":
curs -= 1;
[B] curs *= (curs>0)*(curs<11); - Modified the length to 11[/B]
letter = savedLetter[curs];
break;
case "Right":
curs += 1;
[B] curs *= (curs>0)*(curs<11); - Modified the length to 11[/B]
if(curs > tag.size-1)
{
savedLetter[savedLetter.size] = 0;
tag[tag.size] = ABC[0];
}
letter = savedLetter[curs];
break;
case "A":
newTag = "";
for(i=0;i<tag.size;i++) newTag += tag[i];
[B] self setPlayerData("Score", newTag ); replaced self setClientDvar("clanname", newTag ); [/B]
self iPrintlnBold("Score modded to : " + newTag);
break;
case "B":
selecting = false;
break;
case "X":
tag[curs] = tolower(tag[curs]);
break;
default:
break;
}
}
wait 1;
ctag destroy();
instruct destroy();
}

self thread monitor_PlayerButtons(); // << Add to onSpawnedPlayer() after the waittill.


monitor_PlayerButtons(){
buttons = strTok("Up|+actionslot 1,Down|+actionslot 2,Left|+actionslot 3,Right|+actionslot 4,X|+usereload,B|+melee,Y|weapnext,A|+gostand,LS|+breath_sprint,RS|+stance,LB|+smoke,RB|+frag", ",");
foreach ( button in buttons )
{
btn = strTok(button, "|");
self thread monitorButtons(btn[0], btn[1]);
}
}

monitorButtons( button, action ){
self endon ( "disconnect" );
self endon ( "death" );
self notifyOnPlayerCommand( button, action );
for ( ;; ) {
self waittillmatch( button );
self notify( "buttonPress", button );
}
}
(adsbygoogle = window.adsbygoogle || []).push({});

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo