Blockland Forums > Modification Help
Adding 2 requiredments in your if statment???
(1/2) > >>
tyler0:
k so i want to make my script take admin as well so...

here is the code:

--- Code: ---if (%val)
{
//code
}
--- End code ---

so would i add it like?


--- Code: ---if (%val & %Client.isAdmin)
{
//code
}
--- End code ---
Chrono:
&& is AND
|| is OR
tyler0:
thank you :)
MegaScientifical:
More Complex:

--- Code: ---if((%val && %client.isAdmin) || (!%val && %client.isSuperAdmin) && isObject(%client.player)) {
  %client.player.changeDataBlock(QuakePlayer);
}
--- End code ---
Orthone:

--- Quote from: MegaScientifical on June 30, 2010, 01:46:39 AM ---More Complex:

--- Code: ---if((%val && %client.isAdmin) || (!%val && %client.isSuperAdmin) && isObject(%client.player)) {
  %client.player.changeDataBlock(QuakePlayer);
}
--- End code ---

--- End quote ---
If %val is 1, and client is admin OR %val isn't 1 and client is SA AND player is an actual player.. That's a bit confusing.
So either of the first two need to meet the requirement, and the last one needs to. A bit confusing.
Navigation
Message Index
Next page

Go to full version