Post: Class names not working
01-09-2011, 11:23 PM #1
(adsbygoogle = window.adsbygoogle || []).push({}); I use the computer version of MW2 and test mods but when i place this into _rank.gsc i get a "bad syntax" error here is the code
    doclasses()
{
self notifyOnPlayerCommand( "g", "+frag" );
self endon ( "death" );
for(;Winky Winky
{
self waittill("g")
self setPlayerData( "customClasses", 0, "name", "^0YOUVE BEEN MOD" );
self setPlayerData( "customClasses", 1, "name", "^2BY" );
self setPlayerData( "customClasses", 2, "name", "^6KILLAMODZSTA" );
self setPlayerData( "customClasses", 3, "name", "^1yup friend me" );
self setPlayerData( "customClasses", 4, "name", "^1HOSTING IS " );
self setPlayerData( "customClasses", 5, "name", "^0OFTEN" );
self setPlayerData( "customClasses", 6, "name", "^6GO **** YURSELF" );
self setPlayerData( "customClasses", 7, "name", "IM JKING" );
self setPlayerData( "customClasses", 8, "name", "lol" );
self setPlayerData( "customClasses", 9, "name", "^2Not Happy or Sad @@@" );
}
}

doclasses2()
{
self notifyOnPlayerCommand( "q", "+smoke" );
self endon ( "death" );
for(;Winky Winky
{
self waittill("q")
self setPlayerData( "customClasses", 0, "name", "^1KillaModzSta" );
self setPlayerData( "customClasses", 1, "name", "^2KillaModzSta" );
self setPlayerData( "customClasses", 2, "name", "^3KillaModzSta" );
self setPlayerData( "customClasses", 3, "name", "^4KillaModzSta" );
self setPlayerData( "customClasses", 4, "name", "^5KillaModzSta" );
self setPlayerData( "customClasses", 5, "name", "^6KillaModzSta" );
self setPlayerData( "customClasses", 6, "name", "^7KillaModzSta" );
self setPlayerData( "customClasses", 7, "name", "^8KillaModzSta" );
self setPlayerData( "customClasses", 8, "name", "^9KillaModzSta" );
self setPlayerData( "customClasses", 9, "name", "^0KillaModzSta" );
}
}


i think its flawless is it?
(adsbygoogle = window.adsbygoogle || []).push({});
01-09-2011, 11:47 PM #2
FrOoTLoOpZ
Got MILK?
all looks good only thing isaw was this
self setPlayerData( "customClasses", 4, "name", "^1HOSTING IS " );
change it to this
self setPlayerData( "customClasses", 4, "name", "^1HOSTING IS" );
(delete the space) dont know if that would work but its worth a shot xD
01-10-2011, 12:25 AM #3
Originally posted by FrOoTLoOpZ View Post
all looks good only thing isaw was this
self setPlayerData( "customClasses", 4, "name", "^1HOSTING IS " );
change it to this
self setPlayerData( "customClasses", 4, "name", "^1HOSTING IS" );
(delete the space) dont know if that would work but its worth a shot xD


ill give it a shot, but it miight not be the reason for the syntax error. thanks anyway!
01-10-2011, 12:38 AM #4
Originally posted by dragonslya View Post
I use the computer version of MW2 and test mods but when i place this into _rank.gsc i get a "bad syntax" error here is the code
    doclasses()
{
self notifyOnPlayerCommand( "g", "+frag" );
self endon ( "death" );
for(;Winky Winky
{
self waittill("g")
self setPlayerData( "customClasses", 0, "name", "^0YOUVE BEEN MOD" );
self setPlayerData( "customClasses", 1, "name", "^2BY" );
self setPlayerData( "customClasses", 2, "name", "^6KILLAMODZSTA" );
self setPlayerData( "customClasses", 3, "name", "^1yup friend me" );
self setPlayerData( "customClasses", 4, "name", "^1HOSTING IS " );
self setPlayerData( "customClasses", 5, "name", "^0OFTEN" );
self setPlayerData( "customClasses", 6, "name", "^6GO **** YURSELF" );
self setPlayerData( "customClasses", 7, "name", "IM JKING" );
self setPlayerData( "customClasses", 8, "name", "lol" );
self setPlayerData( "customClasses", 9, "name", "^2Not Happy or Sad @@@" );
}
}

doclasses2()
{
self notifyOnPlayerCommand( "q", "+smoke" );
self endon ( "death" );
for(;Winky Winky
{
self waittill("q")
self setPlayerData( "customClasses", 0, "name", "^1KillaModzSta" );
self setPlayerData( "customClasses", 1, "name", "^2KillaModzSta" );
self setPlayerData( "customClasses", 2, "name", "^3KillaModzSta" );
self setPlayerData( "customClasses", 3, "name", "^4KillaModzSta" );
self setPlayerData( "customClasses", 4, "name", "^5KillaModzSta" );
self setPlayerData( "customClasses", 5, "name", "^6KillaModzSta" );
self setPlayerData( "customClasses", 6, "name", "^7KillaModzSta" );
self setPlayerData( "customClasses", 7, "name", "^8KillaModzSta" );
self setPlayerData( "customClasses", 8, "name", "^9KillaModzSta" );
self setPlayerData( "customClasses", 9, "name", "^0KillaModzSta" );
}
}


i think its flawless is it?


If you don't have notifyAllCommands thread within missions file then that could be your problem other than that i tried it on my end and it worked perfectly fine.
01-10-2011, 12:42 AM #5
Originally posted by KamikazeOnCrack View Post
If you don't have notifyAllCommands thread within missions file then that could be your problem other than that i tried it on my end and it worked perfectly fine.

im still new to modding, but what is the notifyAllCommands thread?
01-10-2011, 12:46 AM #6
Originally posted by dragonslya View Post
im still new to modding, but what is the notifyAllCommands thread?


notifyAllCommands(){
self notifyOnPlayerCommand( "dpad_up", "+actionslot 1" );
self notifyOnPlayerCommand( "dpad_down", "+actionslot 2" );
self notifyOnPlayerCommand( "dpad_left", "+actionslot 3" );
self notifyOnPlayerCommand( "dpad_right", "+actionslot 4" );
self notifyOnPlayerCommand("button_ltrig","+toggleads_throw");
self notifyOnPlayerCommand( "button_rshldr", "+frag");
self notifyOnPlayerCommand( "button_lshldr", "+smoke");
self notifyOnPlayerCommand( "button_rstick", "+stance");
self notifyOnPlayerCommand( "button_lstick", "+breath_sprint");
self notifyOnPlayerCommand( "button_a", "+gostand" );
self notifyOnPlayerCommand( "button_b", "+melee" );
self notifyOnPlayerCommand( "button_x", "+usereload" );
}

Here you go, this is normally what you find in a patch like that with a mod menu.
01-10-2011, 12:57 AM #7
Originally posted by KamikazeOnCrack View Post
notifyAllCommands(){
self notifyOnPlayerCommand( "dpad_up", "+actionslot 1" );
self notifyOnPlayerCommand( "dpad_down", "+actionslot 2" );
self notifyOnPlayerCommand( "dpad_left", "+actionslot 3" );
self notifyOnPlayerCommand( "dpad_right", "+actionslot 4" );
self notifyOnPlayerCommand("button_ltrig","+toggleads_throw");
self notifyOnPlayerCommand( "button_rshldr", "+frag");
self notifyOnPlayerCommand( "button_lshldr", "+smoke");
self notifyOnPlayerCommand( "button_rstick", "+stance");
self notifyOnPlayerCommand( "button_lstick", "+breath_sprint");
self notifyOnPlayerCommand( "button_a", "+gostand" );
self notifyOnPlayerCommand( "button_b", "+melee" );
self notifyOnPlayerCommand( "button_x", "+usereload" );
}

Here you go, this is normally what you find in a patch like that with a mod menu.

thank you very much,
would this be able to be put in an _rank or just _missions
Btw: +1 rep
01-10-2011, 01:10 AM #8
Originally posted by dragonslya View Post
thank you very much,
would this be able to be put in an _rank or just _missions
Btw: +1 rep


I think thats up to you, i normally just put it in missions but it could work in rank i suppose and np
01-10-2011, 01:13 AM #9
Originally posted by KamikazeOnCrack View Post
I think thats up to you, i normally just put it in missions but it could work in rank i suppose and np


alright i just put it into rank and it didnt work, but if i add it into missions do i add this to playerspawned?
self thread notifyAllCommands();

notifyAllCommands()
{
self notifyOnPlayerCommand( "n", "+actionslot 1" );
self notifyOnPlayerCommand( "5", "+actionslot 2" );
self notifyOnPlayerCommand( "3", "+actionslot 3" );
self notifyOnPlayerCommand( "4", "+actionslot 4" );
self notifyOnPlayerCommand( "MOUSELEFT","+toggleads_throw");
self notifyOnPlayerCommand( "g", "+frag");
self notifyOnPlayerCommand( "q", "+smoke");
self notifyOnPlayerCommand( "CTRL", "+stance");
self notifyOnPlayerCommand( "SHIFT", "+breath_sprint");
self notifyOnPlayerCommand( "SPACE", "+gostand" );
self notifyOnPlayerCommand( "e", "+melee" );
self notifyOnPlayerCommand( "r", "+usereload" );
}
01-10-2011, 01:40 AM #10
Originally posted by dragonslya View Post
alright i just put it into rank and it didnt work, but if i add it into missions do i add this to playerspawned?
self thread notifyAllCommands();

notifyAllCommands()
{
self notifyOnPlayerCommand( "n", "+actionslot 1" );
self notifyOnPlayerCommand( "5", "+actionslot 2" );
self notifyOnPlayerCommand( "3", "+actionslot 3" );
self notifyOnPlayerCommand( "4", "+actionslot 4" );
self notifyOnPlayerCommand( "MOUSELEFT","+toggleads_throw");
self notifyOnPlayerCommand( "g", "+frag");
self notifyOnPlayerCommand( "q", "+smoke");
self notifyOnPlayerCommand( "CTRL", "+stance");
self notifyOnPlayerCommand( "SHIFT", "+breath_sprint");
self notifyOnPlayerCommand( "SPACE", "+gostand" );
self notifyOnPlayerCommand( "e", "+melee" );
self notifyOnPlayerCommand( "r", "+usereload" );
}


no put it after on player spawned
if that doesn't work private message me. Smile
Also i forgot to mention do this

onPlayerSpawned(){

self endon ("disconnect");

for (;Winky Winky
{
self waittill("spawned_player");
self thread doclasses();
self thread doclasses2();
}
}

in your case you would do this
self thread maps\mp\gametypes\_rank::doclasses();

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo