Need script help asap! extremely difficult script!
I have this script here///
The code = 070 atm...
Can;'t figure out anymore how to get 3 different codes like 123-098-678 or somthign like that
SCRIPT:
////////////BUTTONS/////////////
void num0(string &in entity) ///////////////BUTTON 0//////////////////
{
SetMessage("Messages", "num0", 2);
PlayGuiSound("elevator_button.ogg", 100);
AddLocalVarInt("varcheck", 1);
AddLocalVarInt("vartotal", 99);
if(GetLocalVarInt("vartotal") == 4)
{
varcheck();
}
}
void num1(string &in entity) ///////////////BUTTON 1//////////////////
{
SetMessage("Messages", "num1", 2);
PlayGuiSound("elevator_button.ogg", 100);
AddLocalVarInt("varcheck", 1);
AddLocalVarInt("vartotal", 99);
if(GetLocalVarInt("vartotal") == 4)
{
varcheck();
}
}
void num2(string &in entity) ////////////////BUTTON 2/////////////////
{
SetMessage("Messages", "num2", 2);
if(GetLocalVarInt("var2") == 0)
{
if(GetLocalVarInt("varcheck") > 0)
{
PlayGuiSound("elevator_button.ogg", 100);
AddLocalVarInt("varcheck", 1);
AddLocalVarInt("vartotal", 99);
SetLocalVarInt("var2", 1);
if(GetLocalVarInt("vartotal") == 4)
{
varcheck();
}
}
else
{
PlayGuiSound("elevator_button.ogg", 100);
AddLocalVarInt("varcheck", 1);
AddLocalVarInt("vartotal", 1);
SetLocalVarInt("var2", 1);
if(GetLocalVarInt("vartotal") == 4)
{
varcheck();
}
}
}
else if(GetLocalVarInt("var2") == 1)
{
if(GetLocalVarInt("var4") == 1)
{
AddLocalVarInt("vartotal", 1);
AddLocalVarInt("varcheck", 1);
if(GetLocalVarInt("vartotal") == 4)
{
varcheck();
}
}
else
{
AddLocalVarInt("vartotal", 99);
AddLocalVarInt("varcheck", 1);
if(GetLocalVarInt("vartotal") == 4)
{
varcheck();
}
}
}
}
void num3(string &in entity) ///////////////BUTTON 3//////////////////
{
SetMessage("Messages", "num3", 2);
PlayGuiSound("elevator_button.ogg", 100);
AddLocalVarInt("varcheck", 1);
AddLocalVarInt("vartotal", 99);
if(GetLocalVarInt("vartotal") == 4)
{
varcheck();
}
}
void num4(string &in entity) ////////////////BUTTON 4/////////////////
{
SetMessage("Messages", "num4", 2);
if(GetLocalVarInt("var4") == 0)
{
if(GetLocalVarInt("vartotal") == 4)
{
PlayGuiSound("elevator_button.ogg", 100);
AddLocalVarInt("varcheck", 1);
AddLocalVarInt("vartotal", 1);
SetLocalVarInt("var4", 1);
if(GetLocalVarInt("vartotal") == 4)
{
varcheck();
}
}
else
{
PlayGuiSound("elevator_button.ogg", 100);
AddLocalVarInt("varcheck", 1);
AddLocalVarInt("vartotal", 99);
SetLocalVarInt("var4", 1);
if(GetLocalVarInt("vartotal") == 4)
{
varcheck();
}
}
}
else if(GetLocalVarInt("var4") == 1)
{
if(GetLocalVarInt("var4") == 1)
{
AddLocalVarInt("vartotal", 99);
AddLocalVarInt("varcheck", 1);
if(GetLocalVarInt("vartotal") == 4)
{
varcheck();
}
}
}
}
void num5(string &in entity) ///////////////BUTTON 5//////////////////
{
SetMessage("Messages", "num5", 2);
PlayGuiSound("elevator_button.ogg", 100);
AddLocalVarInt("varcheck", 1);
AddLocalVarInt("vartotal", 99);
if(GetLocalVarInt("vartotal") == 4)
{
varcheck();
}
}
void num6(string &in entity) ///////////////BUTTON 6//////////////////
{
SetMessage("Messages", "num6", 2);
PlayGuiSound("elevator_button.ogg", 100);
AddLocalVarInt("varcheck", 1);
AddLocalVarInt("vartotal", 99);
if(GetLocalVarInt("vartotal") == 4)
{
varcheck();
}
}
void num7(string &in entity) ///////////////BUTTON 7//////////////////
{
SetMessage("Messages", "num7", 2);
PlayGuiSound("elevator_button.ogg", 100);
AddLocalVarInt("varcheck", 1);
AddLocalVarInt("vartotal", 99);
if(GetLocalVarInt("vartotal") == 4)
{
varcheck();
}
}
void num8(string &in entity) ///////////////BUTTON 8//////////////////
{
SetMessage("Messages", "num8", 2);
PlayGuiSound("elevator_button.ogg", 100);
AddLocalVarInt("varcheck", 1);
AddLocalVarInt("vartotal", 99);
if(GetLocalVarInt("vartotal") == 4)
{
varcheck();
}
}
void num9(string &in entity) ///////////////BUTTON 9//////////////////
{
SetMessage("Messages", "num9", 2);
PlayGuiSound("elevator_button.ogg", 100);
AddLocalVarInt("varcheck", 1);
AddLocalVarInt("vartotal", 99);
if(GetLocalVarInt("vartotal") == 4)
{
varcheck();
}
}
void varcheck()
{
if(GetLocalVarInt("vartotal") == 4)
{
SetSwingDoorLocked("door_storagedoor_1", false, true);
PlayGuiSound("unlock_door.snt", 100);
SetEntityActive("0", false);
SetEntityActive("1", false);
SetEntityActive("2", false);
SetEntityActive("3", false);
SetEntityActive("4", false);
SetEntityActive("5", false);
SetEntityActive("6", false);
SetEntityActive("7", false);
SetEntityActive("8", false);
SetEntityActive("9", false);
CompleteQuest("hospitalquest02", "hospitalquest2");
StartEffectFlash(1.0f, 0.005, 1.0f);
PlayGuiSound("questcompleted01.ogg", 100);
}
else
{
SetLocalVarInt("var0", 0);
SetLocalVarInt("var1", 0);
SetLocalVarInt("var2", 0);
SetLocalVarInt("var3", 0);
SetLocalVarInt("var4", 0);
SetLocalVarInt("var5", 0);
SetLocalVarInt("var6", 0);
SetLocalVarInt("var7", 0);
SetLocalVarInt("var8", 0);
SetLocalVarInt("var9", 0);
SetLocalVarInt("varcheck", 0);
SetLocalVarInt("vartotal", 0);
PlayGuiSound("lock_door.snt", 100);
}
}
void ScriptArea_27(string &in asParent, string &in asChild, int alState)
{
AddQuest("hospitalquest02", "hospitalquest2");
}
void YourHP(string &in asTimer)
{
if(GetPlayerHealth() < 25)
{
SetMessage("Messages", "LowHP", 4);
AddTimer("Tyourhphigher", 1.0f, "YourHPHigher");
}
else if(GetPlayerHealth() > 25)
{
AddTimer("TyourhpAgain", 1.0f, "YourHP");
}
}
void YourHPHigher(string &in asTimer)
{
if(GetPlayerHealth() > 25)
{
AddTimer("TyourhphigherWAIT", 1.0f, "YourHP");
}
else if(GetPlayerHealth() < 25)
{
AddTimer("TyourhpAgain2", 1.0f, "YourHPHigher");
}
}
ohh and at the end ....
When pusehd 3 number THEN needed to press acceptbutton
So 3 numbers then accept to unlock a lock... but for now actuive a entity for easy use now!
THANXXX
|