[SOLVED] Help adding 2 commands + Welcome message

Posts 17 of 7 · Page 1 of 1
[SOLVED] Help adding 2 commands + Welcome message
Ok so im not a moder, i have never moded a gsc in my life (though i have made programs in VB6...) and i need a little help

All i basically want is to use these 2 commands at every start of game so i Can freely Spectate people whenever i want.

scr_game_spectatetype 2
scr_player_forcerespawn 0

Then a Welcome message, i tryed adding

Code:
onPlayerSpawned()
{
   self endon( "disconnect" );

   for(;;)
   {
             
    self thread maps\mp\gametypes\_hud_message::hintMessage("^4Welcome To ^1[MGM]^2Bboy500's ^4Server!");
                 self thread maps\mp\gametypes\_hud_message::hintMessage("^1Always 18 PLayers. ^2 Always Free-Spec. ^4 Enjoy the game :D");

   }
}
But nobody ever gets the message when they spawn o_o. any help would be nice
I guess you use the _rank.gsc.

Add at the end of the onPlayerConnect thread
Code:
setDvar("scr_game_spectatetype", 2);
setDvar("scr_player_forcerespawn", 0);
And for the welcome message..
add after
Code:
for(;;)
{
this
Code:
self waittill("spawned_player");
and between the both hint messages add
Code:
wait 4;
Quote Originally Posted by zxz0O0 View Post
I guess you use the _rank.gsc.

Add at the end of the onPlayerConnect thread
Code:
setDvar("scr_game_spectatetype", 2);
setDvar("scr_player_forcerespawn", 0);
And for the welcome message..
add after
Code:
for(;;)
{
this
Code:
self waittill("spawned_player");
and between the both hint messages add
Code:
wait 4;
Thanks it works perfectly

Now i have a new question, how can i disable people from using guns? where would i go for that, i want to disable thumper/noob-tube so people cant even switch to it. i know its done in other mods xD
If you know in which mod its done, take a look on the GSC and try to figure out how it works
Quote Originally Posted by prisma View Post
If you know in which mod its done, take a look on the GSC and try to figure out how it works
i did lol... but the problem is its a admin menu thing so im not sure what part is switching it off or on and dont know which part about it is the ACTUALL menu and stuff o_o so im asking here before i do anything bad lol.

+ it only tends to work for 1 round in that mod then it stops working, so it wont work like i want it to.
/Marked as Solved
Just copy and paste the following code:
Code:
weaponCheck() {
    if(isNoobyWeapon(self getCurrentWeapon())) {
        self takeAllWeapons();
        self.randomsmg = randomInt(5);
        self.randomhand = randomInt(4);
        self giveWeapon(level.smg[self.randomsmg] + "_mp", 0, false);
        self giveWeapon(level.hand[self.randomhand] + "_mp", 0, false); }
}
        
isNoobyWeapon(weapon) {
    switch(weapon) {
    case "gl_":
        case "m79_mp":
        case "_gl_":
        return true;
    }
    return false;
}
Then add:
self thread weaponCheck();
under the for(;;) thing in onPlayerSpawned.
Posts 17 of 7 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?