I need something like this:
If multiplayer {
}
else
{
}
How to check if in multiplayer?
Débuté par
Runspect
, mai 18 2011 07:59
#1
Posté 18 mai 2011 - 07:59
#2
Posté 18 mai 2011 - 08:08
GetIsSinglePlayer()
example usage
example usage
if ( CSLGetIsDM(oPC, TRUE) || GetIsSinglePlayer() )
{
CSLShowDMBar( oPC );
CSLSetAsTester(oPC,TRUE);
SetLocalInt(oPC, "CSL_UseTrueDMCasterLevel", FALSE ); // sets the dm to use their actual level, normally it sets to have dm's cast spells at level 60
SendMessageToPC( oPC, "Your CD Key is "+sPublicCDKey );
CSLCreateSingleItemOnObject("dmsco", oPC, 1, "dmsco"); // Loftenwood Stone
CSLCreateSingleItemOnObject("dmrco", oPC, 1, "dmsco"); // Loftenwood Stone
CSLCreateSingleItemOnObject("stone_loftenwood", oPC, 1, "townstone"); // Loftenwood Stone
CSLCreateSingleItemOnObject("stone_bind", oPC, 1, "bindstone"); // Loftenwood Stone
//StoneCreate(oPC, "stone_skill", "Skill Stone", "SMS_SKILL");
CSLCreateSingleItemOnObject("dex_trollheart", oPC, 5, "dex_trollheart"); // map of dex
//StoneCreate(oPC, "stone_masscrit", "Stone of MassCrit Damage", "SMS_MASSCRIT");
object oMap = CSLCreateSingleItemOnObject("dex_dexmap", oPC, 1, "dex_dexmap"); // map of dex
SetIdentified(oMap, TRUE);
}
Modifié par painofdungeoneternal, 18 mai 2011 - 08:09 .
#3
Posté 18 mai 2011 - 08:15
More specifically:
if(!GetIsSinglePlayer())
{
// Do Stuff
}
else
{
// Do Other Stuff
}
The exclaimation point means "not" so (!GetIsSinglePlayer) means "if this is not a single player game," which of course means that it is a multi-player game if it is not single player.
if(!GetIsSinglePlayer())
{
// Do Stuff
}
else
{
// Do Other Stuff
}
The exclaimation point means "not" so (!GetIsSinglePlayer) means "if this is not a single player game," which of course means that it is a multi-player game if it is not single player.
#4
Posté 18 mai 2011 - 08:16
thank you!!!!!!!
It was so easy... (embarrased) :-/
It was so easy... (embarrased) :-/
#5
Posté 18 mai 2011 - 08:22
No problem, and no worries, I've certainly asked more embarrassing questions in my time.





Retour en haut






