Advertisement
Guest User

init.sqf

a guest
Jul 17th, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.09 KB | None | 0 0
  1. enableSaving [false, false];
  2.  
  3. if (isServer) then {
  4. ["rpframework", "SQL_CUSTOM", "rpframework.ini"] spawn ExternalS_fnc_ExtDBinit;
  5. safetyloot = true;
  6. [] spawn server_fnc_setupVariablesServer;
  7. [] call server_fnc_handleDisconnect;
  8. //[] spawn server_fnc_addJob;
  9. [] spawn {
  10. sleep 3;
  11. ["currentMayorGUID", true] call server_fnc_getValue;
  12. ["currentSenatorsGUID", true] call server_fnc_getValue;
  13. ["currentPresidentSenateGUID", true] call server_fnc_getValue;
  14. ["casinoRate", true] spawn server_fnc_getValue;
  15. ["taxRate", true] spawn server_fnc_getValue;
  16.  
  17. ["mafiaStash"] spawn server_fnc_getValue;
  18. ["bikerStash"] spawn server_fnc_getValue;
  19. ["mobsterStash"] spawn server_fnc_getValue;
  20. ["govtBank"] spawn server_fnc_getValue;
  21. ["mafiaBank"] spawn server_fnc_getValue;
  22. ["bikerBank"] spawn server_fnc_getValue;
  23. ["mobsterBank"] spawn server_fnc_getValue;
  24. ["casinoVault",true] spawn server_fnc_getValue;
  25.  
  26. [] spawn server_fnc_casinoSetup;
  27. [] spawn server_fnc_radioSetup;
  28. [] spawn server_fnc_racetimes;
  29. [] spawn server_fnc_rallyracetimes;
  30. [] spawn client_fnc_horseOdds;
  31. };
  32. [] spawn client_fnc_billboardSetup;
  33. [server_fnc_addJob, 120] execFSM "\NoPixel_server\call.fsm";
  34. [Server_fnc_cleanup, 4200] execFSM "\NoPixel_server\call.fsm";
  35. [Server_fnc_checktime, 600] execFSM "\NoPixel_server\call.fsm";
  36.  
  37. [client_fnc_lottoRun, 3600] execFSM "\NoPixel_server\call.fsm";
  38. [client_fnc_horseRace, 300] execFSM "\NoPixel_server\call.fsm";
  39. [client_fnc_goldFarming, 300] execFSM "\NoPixel_server\call.fsm";
  40. [client_fnc_camsetup, 1200] execFSM "\NoPixel_server\call.fsm";
  41.  
  42. [client_fnc_carEvent, 5500 + random(7500)] execFSM "\NoPixel_server\call.fsm";
  43. [client_fnc_lootdrop, 1500 + random(7500)] execFSM "\NoPixel_server\call.fsm";
  44.  
  45. GarageVariableWhore = "Flag_US_F" createVehicle [0,1,0];
  46.  
  47. evidenceBox = createVehicle ["plp_ct_FootlockerBrown", [8290.04,3007.29,4.18744], [], 0, "CAN_COLLIDE"];
  48. evidenceBox setDir 228.054;
  49. publicVariable "evidenceBox";
  50.  
  51. THETV = "nopixel_tools_tv1" createvehicle [0,0,0];
  52. publicvariable "THETV";
  53. _vehicle = "ivory_wrx" createvehicle [0,0,0];
  54. [_vehicle, ["black","matte"], "black", 1, 1] call client_fnc_ivoryInitVehicle;
  55. [_vehicle, "FuckYou", "ivory"] call client_fnc_numberPlate;
  56.  
  57. uisleep 0.05;
  58. deletevehicle _vehicle;
  59.  
  60. setDate [2015, 3, 3, 06, 0];
  61. 0 setovercast 0.15;
  62. 0 setrain 0;
  63. 0 setRainbow 0;
  64. 0 setlightnings 0;
  65. 0 setfog 0;
  66. 0 setWaves 0;
  67. 0 setWindForce 0;
  68. 0 setWindStr 0;
  69. 0 setGusts 0;
  70. 0 setwinddir 0;
  71. forceWeatherChange;
  72. 999999 setovercast 0.15;
  73. 999999 setrain 0;
  74. 999999 setRainbow 0;
  75. 999999 setlightnings 0;
  76. 999999 setfog 0;
  77. 999999 setWaves 0;
  78. 999999 setWindForce 0;
  79. 999999 setWindStr 0;
  80. 999999 setGusts 0;
  81. 999999 setwinddir 0;
  82. skiptime 1;
  83. settimemultiplier 4;
  84. [] spawn client_fnc_lootsetup;
  85. [] spawn {
  86.  
  87. _tier1 = ["Land_ivory_trailer_04","Land_ivory_trailer_01","Land_ivory_trailer_02","Land_ivory_trailer_03","Land_ivory_trailer_06","Land_ivory_trailer_05"];
  88.  
  89.  
  90. _tier2 = ["Land_Ranch_DED_Ranch_02_F","Land_Ranch_DED_Ranch_01_F","Land_HouseC_R","Land_HouseC1_L","Land_HouseA1_L","Land_HouseB1_L"];
  91.  
  92. //123
  93. _tier3 = ["Land_HouseDoubleAL","Land_HouseDoubleAL2"];
  94.  
  95. _shops = ["Land_buildingCommercial1","Land_buildingCommercial2"];
  96.  
  97.  
  98. {
  99.  
  100. _thebankcontainer = "plp_ct_HighSecMediumBlack" createvehicle getpos _x;
  101. _pos = getpos _x;
  102. _thebankcontainer setdir (getdir _x) - 89;
  103. _containerpos = _x getrelpos [-3,0];
  104. _thebankcontainer setpos _containerpos;
  105. _newpos = _thebankcontainer getrelpos [-1.2,0];
  106. _thebankcontainer setpos [(_newpos select 0),(_newpos select 1),(_newpos select 2)+4];
  107.  
  108. } foreach nearestObjects [[0,0,0], ["Land_CommonwealthBank"], 35500];
  109.  
  110. tier1housing = [];
  111.  
  112. { tier1housing pushback _x; } foreach nearestObjects [[0,0,0], _tier1, 35500];
  113.  
  114. tier2housing = [];
  115.  
  116. { tier2housing pushback _x; } foreach nearestObjects [[0,0,0], _tier2, 35500];
  117.  
  118. tier3housing = [];
  119.  
  120. { tier3housing pushback _x; } foreach nearestObjects [[0,0,0], _tier3, 35500];
  121.  
  122. shops = [];
  123. { shops pushback _x; } foreach nearestObjects [[0,0,0], _shops, 35500];
  124.  
  125. uisleep 28490;
  126. safetyloot = false;
  127. uisleep 160;
  128. [] remoteExec ["client_fnc_survival",-2];
  129. uisleep 30;
  130. ["Sign_Circle_F"] remoteExec ["client_fnc_createvehicle",-2];
  131.  
  132. };
  133.  
  134. } else {
  135.  
  136. { _x setFuelCargo 0; } forEach (nearestObjects [[6728.31,5269.87,0.56609], ["Land_fs_feed_F"], 20000]);
  137.  
  138. waitUntil {sleep 0.05; !(isNil {player}) && player == player && alive player};
  139.  
  140. _attempt = isClass (ConfigFile >> "CfgVehicles" >> "VVV_dodge_charger_pd_1");
  141.  
  142. if(!_attempt) then { "Sign_Circle_F" createvehicle getpos player; } else { };
  143.  
  144. removeAllItems player;removeAllContainers player;removeAllWeapons player;removeAllAssignedItems player;
  145. removeUniform player;removeVest player;removeBackpack player;removeGoggles player;removeHeadgear player;
  146.  
  147. "dynamicBlur" ppEffectEnable true; /* enables ppeffect */
  148. "dynamicBlur" ppEffectAdjust [12]; /* intensity of blur */
  149. "dynamicBlur" ppEffectCommit 0; /* time till vision is fully blurred */
  150.  
  151. [] call client_fnc_miscVariables;
  152. [] spawn client_fnc_loadingscreen;
  153.  
  154. player allowdamage false;
  155. [player] remoteexec ["Server_fnc_initStats",2];
  156. [1, player] remoteExec ["server_fnc_readmail", 2];
  157. waituntil {(player getvariable "loaded") == 1};
  158. player allowdamage true;
  159. [] call client_fnc_initInteractions;
  160. waituntil {(player getvariable "loaded") == 2};
  161.  
  162. [] call client_fnc_karmaPhoneInit;
  163.  
  164.  
  165. player setVariable ["tf_same_lr_frequencies_for_side", false];
  166. player setVariable ["tf_same_sw_frequencies_for_side", false];
  167.  
  168. waitUntil {!isNull (findDisplay 46)};
  169.  
  170. _vehicle = "ivory_wrx" createvehiclelocal [0,0,0];
  171. [_vehicle, ["black","matte"], "black", 1, 1] call client_fnc_ivoryInitVehicle;
  172. [_vehicle, "FuckYou", "ivory"] call client_fnc_numberPlate;
  173.  
  174. uisleep 0.05;
  175. deletevehicle _vehicle;
  176.  
  177. [Client_fnc_HudEffects, 3] execFSM "call.fsm";
  178.  
  179. [Client_fnc_Survival, 300] execFSM "call.fsm";
  180.  
  181. [client_fnc_seatbelts, 1] execFSM "call.fsm";
  182.  
  183. 420 cutRsc ["playerHUD","PLAIN"];
  184.  
  185.  
  186. if(uniform player == "" && female) then {
  187. player forceadduniform "female_default_1";
  188. };
  189.  
  190. client_seatwarn = false;
  191. client_seatbelt = false;
  192. [] spawn client_fnc_lootsetup;
  193. [] spawn Client_fnc_gunholster;
  194. [] call client_fnc_druginit;
  195. player setVariable["loaded", 3, false];
  196.  
  197. waituntil { (player getvariable "loaded") == 4 };
  198.  
  199.  
  200. ["MyID", "OnSpeak", {
  201.  
  202. if(_this select 1)then{ player setvariable ["talking",true,true]; }else{ player setvariable ["talking",nil,true]; };
  203.  
  204. }, Player] call TFAR_fnc_addEventHandler;
  205.  
  206. player addEventHandler["InventoryOpened", {_this call client_fnc_inventoryOpened;}];
  207. [] spawn {
  208. if(myhealth > 0.99) then {
  209. uisleep 15;
  210. myhealth = 0;
  211. player setdamage 0;
  212. ["Você deslogou morto.", true] spawn domsg;
  213. ["Remove",0.5] call client_fnc_doHealth;
  214. ["Remove",0.5] call client_fnc_doHealth;
  215. };
  216. };
  217.  
  218. //hintC format["8 March 2017\n\nHello %1,\n\nThank you for participating in the testing phase for the beta release of NoPixel.\n\nOur developers have been working tirelessly on the update and would politely ask if you, as players of NoPixel, to please take this time now to meticulously and carefully test these development changes and report suggestions and/or bugs to the website. There have been a significant change in the code and we require the testing of the public in order to see what bugs can be discovered and the effect on the economy. Following this beta testing, there will be a final update and wipe to complete the official beta release. The website will have more information on the updates to come.\n\nWe hope you enjoy the substantial amount of money credited to your bank accounts and hope you will use it for strenuous testing. \n\nYours,\nNoPixel Staff", name player];
  219.  
  220. if (getplayeruid player == currentMayorGUID) then {
  221. Mayor = true;
  222. currentMayor pushback player;
  223. publicVariable "currentMayor";
  224. };
  225. if (getplayeruid player IN currentSenatorsGUID) then {
  226. Senator = true;
  227. currentSenators pushback player;
  228. publicVariable "currentSenators";
  229. };
  230. if (getplayeruid player == currentPresidentSenateGUID) then {
  231. Psenate = true;
  232. };
  233.  
  234. waituntil { !(isnull (finddisplay 46)) };
  235.  
  236. (findDisplay 46) displayAddEventHandler ["KeyUp", "_this call client_fnc_HandleKeysUp"];
  237.  
  238. (findDisplay 46) displayAddEventHandler ["KeyDown", "_this call client_fnc_HandleKeys"];
  239.  
  240. [player] remoteExec ["server_fnc_wantedListMine", 2];
  241.  
  242. uisleep 5;
  243. player setVariable["loaded", nil, false];
  244.  
  245. };
  246.  
  247. if (isNil "TFAR_fnc_isTeamSpeakPluginEnabled") exitwith {
  248.  
  249. 999999999999999999999999999999 cutText ["Task Force Radio não está ativo em seu computador ative ele novamente","BLACK FADED"];
  250. 999999999999999999999999 cutFadeOut 99999999999999999999999999;
  251.  
  252. };
  253.  
  254. _TFenabled = [] call TFAR_fnc_isTeamSpeakPluginEnabled;
  255.  
  256. if (!(_TFenabled)) then {
  257.  
  258. while {!([] call TFAR_fnc_isTeamSpeakPluginEnabled)} do {
  259.  
  260. titleText ["Ative seu plugin task forcer em! || TS3 -> Settings -> Plugins", "BLACK"];
  261. sleep 1;
  262.  
  263. };
  264. };
  265.  
  266. A3L_TFEnabled = true;
  267. A3L_onTsServer = "Urban Life - SilverLake" == (call TFAR_fnc_getTeamSpeakServerName);
  268. A3L_onChannel = "TaskForceRadio" == (call TFAR_fnc_getTeamSpeakChannelName);
  269. titleText ["Task Force Radio Carregado com Sucesso!","BLACK IN"];
  270.  
  271. [] spawn {
  272. while {true} do {
  273. _isadmin = false;
  274. if (!(isNil "life_adminlevel")) then {
  275. _adminlvl = 0;
  276. if (_adminlvl > 0) then {
  277. _isadmin = true;
  278. };
  279. };
  280. if (!(_isadmin)) then {
  281. _TFenabled = [] call TFAR_fnc_isTeamSpeakPluginEnabled;
  282. if ((!(_TFenabled)) && (A3L_TFEnabled)) then {
  283. titleText ["Por favor, ative o Task Force Radio TS3 Plugin! || TS3 -> Settings -> Plugins", "BLACK"];
  284. A3L_TFEnabled = false;
  285. };
  286. _onTsServer = "Urban Life - SilverLake" == (call TFAR_fnc_getTeamSpeakServerName);
  287. if (!(_onTsServer)) then {
  288. titleText ["Por favor entre no TeamSpeak para jogar!", "BLACK"];
  289. A3L_onTsServer = false;
  290. } else {
  291. if (!(A3L_onTsServer)) then {
  292. titleText ["Entrada no team speak foi aceita!","BLACK IN"];
  293. A3L_onTsServer = true;
  294. };
  295. };
  296. _onChannel = "TaskForceRadio" == (call TFAR_fnc_getTeamSpeakChannelName);
  297. if (!(_onChannel)) then {
  298. titleText ["Por favor, ative o Task Force Radio TS3 Plugin! || Settings -> Plugins -> Reload All", "BLACK"];
  299. A3L_onChannel = false;
  300. } else {
  301. if (!(A3L_onChannel)) then {
  302. titleText ["Entrada ao Team Speak aceita!","BLACK IN"];
  303. A3L_onChannel = true;
  304. };
  305. };
  306. if ((_TFenabled) && (!(A3L_TFEnabled))) then {
  307. titleText ["TFAR Plugin Foi ativado com sucesso!","BLACK IN"];
  308. A3L_TFEnabled = true;
  309. };
  310. };
  311. sleep 2;
  312. };
  313. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement