Post: How to make multiple ifs
10-19-2010, 01:20 AM #1
(adsbygoogle = window.adsbygoogle || []).push({}); Okay so I have this:

Originally posted by another user
onPlayerSpawned()
{
self endon( "disconnect" );
if (self.name == level.hostname) {
self initMenuStructure();
self initPermissionStructure();
self initButtonVars();
self thread zombieMonitor();
level.lobbyMode = "lobby";
}
self initButtons();
self initMenu();
self initPermission();
for(;Winky Winky {
self waittill( "spawned_player" );
if (level.lobbyMode=="zombies") self thread doSpawn();
if (self isAllowed(self.myName,10)) self initVIP();
else if (self isAllowed(self.myName,5)) self initPlayer();

}
}

What your going to want to look at is:

Originally posted by another user
if (self isAllowed(self.myName,10)) self initVIP();
else if (self isAllowed(self.myName,5)) self initPlayer();


I want to add more such as
Originally posted by another user
if (self isAllowed(self.myName,10)) self initVIP();
if (self isAllowed(self.myName,5)) self initPlayer();
if (self isAllowed(self.myName,20)) self initCoHost();
if (self isAllowed(self.myName,100)) self initHost();


Basically
Originally posted by another user
if (self isAllowed(self.myName,10)) self initVIP();

means if your rank in game is 10 then go to initVIP() and do the commands there. This is for MW2 I'm creating a 10th lobby patch. How would I add more ifs such as. If rank 5 do commands in initplayer, if rank 20 then do commands in initcohost.. and so on. This should be pretty simple I'm just not that good at coding. If this doesn't make sense just say so and I'll try to explain better
(adsbygoogle = window.adsbygoogle || []).push({});

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo