denis200191 (05-24-2015),razerd (05-25-2015),WhiteDirt (05-24-2015)
Thought I would give people a basic format for making your own scripts to use in Necromancy or other menus.
Code:NonToggleBase = { hint "Basic NonToggle Command"; sleep 1; };Code:ToggleBase = { if (isNil ("ToggleBase1")) then { ToggleBase1 = 0; }; if (ToggleBase1 == 0) then { hint 'Toggle is ON'; ToggleBase1 = 1; } else { hint 'Toggle is OFF'; ToggleBase1 = 0; }; while {n661==1} do { hint 'While Toggled do This'; }; };Code:TargetBase = { _entities = (positionCameraToWorld [0,0,0] nearObjects ["SurvivorBase",1000]); { if (name _x == _this select 0) then { createGearDialog [(_x), "RscDisplayGear"]; }; } forEach _entities; hint "do command to target, this example is displaying a player's gear."; };
Last edited by Mizzle420420; 01-30-2015 at 10:31 AM.
denis200191 (05-24-2015),razerd (05-25-2015),WhiteDirt (05-24-2015)
Mizzle420420 (05-24-2015)
right ?
n17 = {
if (isNil ("n171")) then
{
n171 = 0;
};
if (n171==0) then
{
hint "Unlimited Ammo ON";
n171 = 1;
}
else
{
hint "Unlimited Ammo OFF";
n171 = 0;
};
while {n171==1} do
{
(vehicle player) setVehicleAmmo 1;
sleep 0.01;};
};
};
Nice templates, the only thing I'd add is "sleep 1" into toggle base loop, because if you run it the way it is now it's going to be total ear destruction.
This script no longer works as far as I'm aware. Most likely because they went on path of synchronizing client data with server data as much as they can. Also you can wrap this text in CODE tags (use "go advanced" option), it'll be easier to read it that way.
denis200191 (06-06-2015),Mizzle420420 (06-06-2015)
Yeah I only used hint as an example for a command in the loop, you never put a hint or system chat in a loop unless you want to be spamed like crazy.
- - - Updated - - -
That script no longer works it creates fake bullets in your gun that do no damage or nor have any hit effects.
Also if that did work you would want to remove the sleep because you want that to run as fast as possible, I used to use oneachframe because it was faster than a while.
Last edited by Mizzle420420; 06-06-2015 at 08:39 PM.