Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* ---------------------------------------------------- */
- // All
- script "FDNightvision" Enter // Nightvision system
- {
- // Not needed or desired in TitleMaps.
- If (GameType() == Game_Title_Map) Terminate;
- // FDNightvisionOn is used to turn on nightvision,
- // NVBattery is the nightvision battery
- int pln = PlayerNumber();
- int FDNVTics = 0; // tic counter, used for taking battery and other tic related things
- while (TRUE)
- {
- if (FDNVTics == 52 && checkInventory("NightvisionUpgrade") == 0) // if the tic counter is on tic 52(or whatever number is used on the comparison)...
- {
- FDNVTics = 0; // reset counter
- }
- else if (FDNVTics == 70 && checkInventory("NightvisionUpgrade") == 1)
- {
- FDNVTics = 0; // reset counter
- }
- else if (FDNVTics == 87 && checkInventory("NightvisionUpgrade") == 2)
- {
- FDNVTics = 0; // reset counter
- }
- if (checkInventory("FDNightvisionOn") != 0 && checkInventory("NVBattery") != 0) // if nightvision is on and there's usable battery...
- {
- GiveInventory("PowerNightvision",1); // turn on nightvision
- if (FDNVTics == 0) // if FDNVTics is zero...
- {
- TakeInventory("NVBattery",1); // take one battery point
- }
- }
- else if (checkInventory("FDNightvisionOn") != 0 && checkInventory("NVBattery") == 0) // if nightvision is on and there's no usable battery
- {
- TakeInventory("PowerNightvision",1); // take PowerNightvision
- TakeInventory("FDNightvisionOn",1); // take FDNightvisionOn
- ActivatorSound("Nightvision/Off", 127); // play turning off sound
- }
- else if (checkInventory("FDNightvisionOn") == 0) // if nightvision is off, turn off nightvision and take FDNightvisionON
- {
- TakeInventory("PowerNightvision",1); // take PowerNightvision
- TakeInventory("FDNightvisionOn",1); // take FDNightvisionOn
- }
- Delay(1);
- if (checkInventory("FDNightvisionOn") != 0) { FDNVTics++; } // if nightvision on, add one tic
- }
- }
- /* ---------------------------------------------------- */
- /* ---------------------------------------------------- */
- // Chronos
- /* ---------------------------------------------------- */
- /* ---------------------------------------------------- */
- // Nero
- /* ---------------------------------------------------- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement