Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- The Dynamic Box Package.SetPlayerPosEx
- All Previous Script now with editable settings!
- All scripts in the package:
- We got A-Spam/Forbid Word v1.1
- Typing-Question Test v1.1
- Help System (Additional features in VIP System)
- VIP System
- All credits goes to
- Zher0 (Idea of Reaction-Question Test)
- Y_Less (YSI Library, sscanf, whirlpool)
- Romel (Previous Scripts, And scripting)
- Zher0 (The Dick System)
- XTremer (Vip Script Insparation and some commands (idea not copy))
- Edvin (some commands (idea not copy))
- Incognito (Streamer)
- Valve (Inspration from their "The Orange Box Package")
- */
- #include <a_samp>
- #include <sscanf2>
- #include <dbox>
- #include <YSI\y_scripting>
- #include <streamer>
- #include <YSI\y_ini>
- #include <YSI\y_commands>
- native WP_Hash(buffer[],len, const str[]);
- #define COLOR_ORANGE 0xFF8000FF
- #define COLOR_YELLOW 0xFFFF00FF
- #define COLOR_LIGHTBLUE 0x33CCFFAA
- #define COLOR_GREY 0xAFAFAFAA
- #define COLOR_WHITE 0xFFFFFFFF
- #define COLOR_BLUE 0x0080FFC8
- #define COLOR_RED 0xFF0000FF
- #define COLOR_LIME 0x00FF00FF
- #define white "{FFFFFF}"
- #define red "{FF002B}"
- #define yellow "{FAF623}"
- #define orange "{F2C80C}"
- #define Error_Vip "Invalid: This command is authorized, Only V.I.P. can use this!"
- #define Error_Connected "Error: Player not connnected!"
- #define Error_Self "Error: You cannot use this command in yourself!"
- #define Error_Higher "Error: You cannot use this command in Higher VIPs!"
- #define Error_Helper "Invalid: This command is authorized, Only Helpers can use this!"
- #define MAX_VIP_LVL 3
- enum PlayerInfo
- {
- Vip,
- FavSkin,
- UseSkin,
- Helper,
- Float:vX,
- Float:vY,
- Float:vZ,
- Float:vA,
- vI,
- vW
- };
- new pInfo[MAX_PLAYERS][PlayerInfo];
- new god[MAX_PLAYERS] = 0;
- new VipVeh[MAX_PLAYERS];
- new Text3D:VipV[MAX_PLAYERS];
- new Help = 0;
- new Player = -1;
- new bool:Starts = false,
- TypeGame = -1,
- targetanswer[128],
- targetword[128],
- Timer,
- question[128],
- word = 0,
- ForbiddenWords[100][100],
- rank[100],
- playerwarn[MAX_PLAYERS] = 0;
- new Float:SpecX[MAX_PLAYERS], Float:SpecY[MAX_PLAYERS], Float:SpecZ[MAX_PLAYERS], vWorld[MAX_PLAYERS], Inter[MAX_PLAYERS];
- new IsSpecing[MAX_PLAYERS], IsBeingSpeced[MAX_PLAYERS], spectatorid[MAX_PLAYERS];
- enum settings
- {
- spam,
- swarn,
- sms,
- questiontime,
- typetime,
- prize,
- prizescore,
- typeq,
- wgasfw,
- forbidword,
- rank1[100],
- rank2[100],
- rank3[100],
- readcmd,
- symbolchat[5]
- };
- new set2[settings];
- #define ConfigPath "dynamicbox/"
- #define SettingsSpam "dsettings.ini"
- #define SettingsWords "forbwords.ini"
- #define cset 550
- #define cwarn 551
- #define cword 552
- #define csms 553
- #define cfw 554
- #define dbox 555
- #define typeques 556
- #define questiontimer 557
- #define typingtimer 558
- #define Prizes 559
- #define PrizesScore 560
- #define ListWords 561
- #define Register 562
- #define Login 563
- #define HelpList 564
- #define VipList 565
- #define VipCmd 567
- #define Features 568
- #define PlayerCmd 569
- #define HelperCmd 570
- #define PlayerStats 571
- #define VipSet 572
- #define SymbolSet 573
- #define RankSet 574
- #define Rank2Set 575
- #define Rank3Set 576
- #define INFINITE (Float:0x7F800000)
- forward KillTest();
- forward loadfiles(name[], value[]);
- forward loadaccount_user(playerid, name[], value[]);
- #if defined FILTERSCRIPT
- #else
- public OnFilterScriptInit()
- {
- print("\n");
- print("The Dynamic Box Package");
- print("Distributed by Romel");
- print("Big thanks to Zher0, Y_Less, Romel, (Insparation: Valve)");
- print("(c), 2013");
- print("Loaded!");
- print("\n");
- printf("Total Commmands of dBox: %i commands", cmd());
- Starts = false;
- TypeGame = -1;
- LoadSettings();
- KillTimer(Timer);
- Help = 0;
- Player = -1;
- //Vip Island
- CreateDynamicObject(4847,-3933.5000000,471.8999939,9.3000002,0.0000000,0.0000000,0.0000000); //object(beach1_las0gj) (1)
- CreateDynamicObject(4847,-3933.1999512,571.0999756,9.3000002,0.0000000,0.0000000,180.0000000); //object(beach1_las0gj) (2)
- CreateDynamicObject(8263,-3818.1000977,621.0000000,3.2000000,0.0000000,0.0000000,0.0000000); //object(vgsselecfence14) (1)
- CreateDynamicObject(8263,-3938.0000000,621.0000000,3.2000000,0.0000000,0.0000000,0.0000000); //object(vgsselecfence14) (2)
- CreateDynamicObject(8263,-4050.1000977,620.5000000,3.4000001,0.0000000,0.0000000,0.0000000); //object(vgsselecfence14) (3)
- CreateDynamicObject(972,-4111.6000977,604.7999878,4.3000002,348.0073853,357.9553833,355.5749512); //object(tunnelentrance) (1)
- CreateDynamicObject(972,-4113.0000000,580.5999756,9.3999996,348.0029297,357.9510498,357.5725098); //object(tunnelentrance) (2)
- CreateDynamicObject(972,-4113.5000000,556.4000244,14.5000000,348.0029297,357.9510498,359.5725098); //object(tunnelentrance) (3)
- CreateDynamicObject(972,-4113.5000000,533.0999756,16.8999996,357.9912109,357.9892578,1.9284668); //object(tunnelentrance) (4)
- CreateDynamicObject(972,-4113.0000000,508.2999878,17.7000008,357.9895020,357.9840088,1.9231262); //object(tunnelentrance) (5)
- CreateDynamicObject(972,-4112.6000977,485.8999939,14.5000000,13.9794312,357.9237061,0.4956360); //object(tunnelentrance) (6)
- CreateDynamicObject(972,-4112.3999023,461.7999878,8.6000004,13.9746094,357.9235840,0.4943848); //object(tunnelentrance) (7)
- CreateDynamicObject(972,-4111.8999023,437.7999878,2.7000000,13.9746094,357.9235840,0.4943848); //object(tunnelentrance) (8)
- CreateDynamicObject(972,-4111.8999023,431.5000000,1.3000000,13.9746094,357.9235840,2.4943848); //object(tunnelentrance) (9)
- CreateDynamicObject(8263,-4048.1000977,421.8999939,3.0000000,0.0000000,0.0000000,0.0000000); //object(vgsselecfence14) (5)
- CreateDynamicObject(8263,-3928.1999512,421.7000122,3.0000000,0.0000000,0.0000000,0.0000000); //object(vgsselecfence14) (6)
- CreateDynamicObject(8263,-3816.5000000,421.8999939,3.0000000,0.0000000,0.0000000,0.0000000); //object(vgsselecfence14) (7)
- CreateDynamicObject(972,-3762.0000000,432.7999878,3.0999999,13.9746094,357.9235840,0.4943848); //object(tunnelentrance) (10)
- CreateDynamicObject(972,-3761.3999023,456.6000061,8.5000000,11.7261047,357.9421387,358.4111328); //object(tunnelentrance) (11)
- CreateDynamicObject(972,-3761.1999512,480.7000122,13.6000004,11.9750977,357.9400635,0.4174805); //object(tunnelentrance) (12)
- CreateDynamicObject(972,-3761.3000488,503.7999878,16.3999996,359.9826660,357.9848633,359.9892578); //object(tunnelentrance) (13)
- CreateDynamicObject(972,-3761.3999023,528.7000122,16.3999996,359.9780273,357.9840088,359.9890137); //object(tunnelentrance) (14)
- CreateDynamicObject(972,-3761.0000000,551.5999756,14.8999996,345.9985657,2.0514832,0.4960022); //object(tunnelentrance) (15)
- CreateDynamicObject(972,-3761.1000977,575.5000000,9.1000004,347.9965820,357.9402466,1.5692139); //object(tunnelentrance) (16)
- CreateDynamicObject(972,-3762.3000488,599.7000122,4.0000000,347.9919434,357.9400635,3.5660400); //object(tunnelentrance) (17)
- CreateDynamicObject(972,-3762.8000488,606.2000122,2.7000000,347.9864502,357.9400635,3.5650635); //object(tunnelentrance) (18)
- CreateDynamicObject(11490,-3945.0000000,525.0999756,18.6000004,0.0000000,0.0000000,0.0000000); //object(des_ranch) (1)
- CreateDynamicObject(11491,-3945.0000000,514.0000000,20.0000000,0.0000000,0.0000000,0.0000000); //object(des_ranchbits1) (1)
- CreateDynamicObject(12909,-3946.8000488,526.7999878,20.1000004,0.0000000,0.0000000,0.0000000); //object(sw_bridge03) (1)
- CreateDynamicObject(12909,-3946.8000488,522.7999878,20.1000004,0.0000000,0.0000000,0.0000000); //object(sw_bridge03) (2)
- CreateDynamicObject(12909,-3942.8000488,522.7999878,20.1000004,0.0000000,0.0000000,0.0000000); //object(sw_bridge03) (3)
- CreateDynamicObject(12909,-3942.8000488,526.7999878,20.1000004,0.0000000,0.0000000,0.0000000); //object(sw_bridge03) (4)
- CreateDynamicObject(1724,-3945.5000000,520.2999878,20.1000004,0.0000000,0.0000000,0.0000000); //object(mrk_seating1b) (1)
- CreateDynamicObject(1724,-3946.8000488,519.4000244,20.1000004,0.0000000,0.0000000,42.0000000); //object(mrk_seating1b) (2)
- CreateDynamicObject(1724,-3943.8999023,520.2000122,20.1000004,0.0000000,0.0000000,319.9952393); //object(mrk_seating1b) (3)
- CreateDynamicObject(3472,-3932.8000488,512.0000000,18.6000004,0.0000000,0.0000000,0.0000000); //object(circuslampost03) (1)
- CreateDynamicObject(3472,-3922.1000977,511.3999939,18.6000004,0.0000000,0.0000000,0.0000000); //object(circuslampost03) (2)
- CreateDynamicObject(3472,-3957.3999023,511.0000000,18.6000004,0.0000000,0.0000000,0.0000000); //object(circuslampost03) (3)
- CreateDynamicObject(3472,-3967.1000977,510.5000000,18.6000004,0.0000000,0.0000000,0.0000000); //object(circuslampost03) (4)
- CreateDynamicObject(3472,-3965.8999023,539.7999878,18.6000004,0.0000000,0.0000000,0.0000000); //object(circuslampost03) (5)
- CreateDynamicObject(3472,-3953.0000000,540.2999878,18.6000004,0.0000000,0.0000000,0.0000000); //object(circuslampost03) (6)
- CreateDynamicObject(3472,-3936.0000000,539.2000122,18.6000004,0.0000000,0.0000000,0.0000000); //object(circuslampost03) (7)
- CreateDynamicObject(3472,-3926.3999023,538.2999878,18.6000004,0.0000000,0.0000000,0.0000000); //object(circuslampost03) (8)
- CreateDynamicObject(3524,-3939.6000977,512.0000000,21.5000000,0.0000000,0.0000000,0.0000000); //object(skullpillar01_lvs) (1)
- CreateDynamicObject(3524,-3951.8000488,512.4000244,21.5000000,0.0000000,0.0000000,0.0000000); //object(skullpillar01_lvs) (2)
- CreateDynamicObject(3524,-3947.3000488,533.7999878,21.5000000,0.0000000,0.0000000,178.0000000); //object(skullpillar01_lvs) (3)
- CreateDynamicObject(3524,-3942.6999512,533.7999878,21.5000000,0.0000000,0.0000000,177.9949951); //object(skullpillar01_lvs) (4)
- CreateDynamicObject(6965,-3998.6000977,519.7999878,21.8999996,0.0000000,0.0000000,0.0000000); //object(venefountain02) (1)
- CreateDynamicObject(7073,-3904.6000977,518.5000000,32.7999992,38.0000000,0.0000000,0.0000000); //object(vegascowboy1) (1)
- CreateDynamicObject(7073,-3978.6000977,526.5000000,32.7999992,37.9962158,0.0000000,188.0000000); //object(vegascowboy1) (2)
- CreateDynamicObject(13562,-3945.1000977,525.7000122,30.1000004,0.0000000,0.0000000,0.0000000); //object(bigsprunkpole) (1)
- CreateDynamicObject(16151,-3947.6000977,511.2000122,18.6000004,0.0000000,0.0000000,90.0000000); //object(ufo_bar) (1)
- CreateDynamicObject(1541,-3946.3000488,512.2000122,19.7999992,0.0000000,0.0000000,0.0000000); //object(cj_beer_taps_1) (1)
- CreateDynamicObject(1542,-3945.3999023,512.2000122,19.7999992,0.0000000,0.0000000,0.0000000); //object(cj_beer_taps_2) (1)
- CreateDynamicObject(1487,-3948.6000977,510.0000000,19.3999996,0.0000000,0.0000000,0.0000000); //object(dyn_wine_1) (1)
- CreateDynamicObject(1337,-3947.7333984,523.0996094,27.7165451,0.0000000,0.0000000,0.0000000); //object(binnt07_la) (2)
- CreateDynamicObject(3483,-4091.1999512,517.7000122,25.6000004,0.0000000,0.0000000,92.0000000); //object(vegasxrexhse09) (1)
- CreateDynamicObject(3484,-4092.3000488,483.7000122,21.7000008,0.2412109,344.7498779,92.0657349); //object(vegasxrexhse03) (1)
- CreateDynamicObject(3486,-4089.6000977,560.2000122,22.0000000,0.0000000,14.5000000,88.0000000); //object(vegasxrexhse05) (1)
- CreateDynamicObject(3487,-4087.5000000,594.0999756,13.8000002,359.7566528,13.2501221,84.3073120); //object(vegasxrexhse06) (1)
- CreateDynamicObject(3488,-4088.6999512,453.2999878,14.3999996,358.5384521,346.9956970,95.6625366); //object(vegasxrexhse07) (1)
- CreateDynamicObject(3501,-4036.1999512,525.5999756,21.7999992,0.0000000,0.0000000,270.0000000); //object(vgsxrefpartm1) (1)
- CreateDynamicObject(6295,-3830.6000977,513.2999878,42.5000000,0.0000000,0.0000000,0.0000000); //object(sanpedlithus_law2) (1)
- CreateDynamicObject(9241,-3868.1000977,515.7000122,20.2999992,0.0000000,0.0000000,0.0000000); //object(copbits_sfn) (1)
- CreateDynamicObject(712,-3926.1000977,476.5000000,22.2999992,0.0000000,0.0000000,0.0000000); //object(vgs_palm03) (1)
- CreateDynamicObject(712,-3911.3999023,476.1000061,22.2000008,0.0000000,0.0000000,0.0000000); //object(vgs_palm03) (2)
- CreateDynamicObject(712,-3894.5000000,477.0000000,22.3999996,0.0000000,0.0000000,0.0000000); //object(vgs_palm03) (3)
- CreateDynamicObject(712,-3876.3000488,477.0000000,22.3999996,0.0000000,0.0000000,0.0000000); //object(vgs_palm03) (4)
- CreateDynamicObject(712,-3854.8999023,476.3999939,22.6000004,0.0000000,0.0000000,0.0000000); //object(vgs_palm03) (5)
- CreateDynamicObject(712,-3822.8999023,475.7999878,21.8999996,0.0000000,0.0000000,0.0000000); //object(vgs_palm03) (6)
- CreateDynamicObject(712,-3837.6000977,475.2000122,21.7999992,0.0000000,0.0000000,0.0000000); //object(vgs_palm03) (7)
- CreateDynamicObject(710,-3924.5000000,525.5000000,27.0000000,0.0000000,316.0000000,0.0000000); //object(vgs_palm01) (1)
- CreateDynamicObject(2627,-3912.0000000,499.7000122,18.6000004,0.0000000,0.0000000,0.0000000); //object(gym_treadmill) (1)
- CreateDynamicObject(2629,-3909.0000000,499.2999878,18.6000004,0.0000000,0.0000000,0.0000000); //object(gym_bench1) (1)
- CreateDynamicObject(2630,-3906.3000488,499.5000000,18.6000004,0.0000000,0.0000000,0.0000000); //object(gym_bike) (1)
- CreateDynamicObject(14791,-3906.3999023,504.7999878,20.6000004,0.0000000,0.0000000,0.0000000); //object(a_vgsgymboxa) (1)
- CreateDynamicObject(14791,-3906.3000488,513.2999878,20.6000004,0.0000000,0.0000000,0.0000000); //object(a_vgsgymboxa) (2)
- CreateDynamicObject(16006,-3791.8000488,528.0999756,18.2000008,0.0000000,0.0000000,0.0000000); //object(ros_townhall) (1)
- CreateDynamicObject(3615,-3903.1999512,484.6000061,16.6000004,14.0000000,0.0000000,4.0000000); //object(sanmonbhut1_law2) (1)
- CreateDynamicObject(3615,-3885.1999512,484.2000122,16.3999996,12.0000000,0.0000000,0.0000000); //object(sanmonbhut1_law2) (2)
- CreateDynamicObject(3615,-3866.3000488,483.2000122,16.1000004,12.0000000,0.0000000,0.0000000); //object(sanmonbhut1_law2) (3)
- CreateDynamicObject(3615,-3919.6000977,485.5000000,16.8999996,15.0000000,0.0000000,0.0000000); //object(sanmonbhut1_law2) (4)
- CreateDynamicObject(712,-3945.6000977,474.7000122,21.8999996,0.0000000,0.0000000,0.0000000); //object(vgs_palm03) (8)
- CreateDynamicObject(3615,-3938.1000977,483.8999939,16.2999992,12.0000000,0.0000000,0.0000000); //object(sanmonbhut1_law2) (5)
- CreateDynamicObject(3615,-3846.8999023,482.8999939,15.8999996,10.0000000,0.0000000,0.0000000); //object(sanmonbhut1_law2) (6)
- CreateDynamicObject(3615,-3830.1999512,484.2000122,16.3999996,12.0000000,0.0000000,0.0000000); //object(sanmonbhut1_law2) (7)
- CreateDynamicObject(8493,-4007.0000000,409.7999878,15.8000002,0.0000000,0.0000000,92.0000000); //object(pirtshp01_lvs) (1)
- CreateDynamicObject(8832,-3998.8999023,399.8999939,-6.5000000,0.0000000,30.0000000,272.0000000); //object(pirtebrdg01_lvs) (2)
- CreateDynamicObject(8832,-4001.3000488,476.8999939,11.8999996,0.0000000,355.9981689,271.9995117); //object(pirtebrdg01_lvs) (3)
- CreateDynamicObject(9159,-4006.8999023,409.7000122,15.6999998,0.0000000,0.0000000,91.5000000); //object(pirtshp02_lvs) (1)
- CreateDynamicObject(712,-3989.1999512,476.5000000,22.2999992,0.0000000,0.0000000,0.0000000); //object(vgs_palm03) (9)
- CreateDynamicObject(712,-4008.3999023,476.8999939,21.7999992,0.0000000,0.0000000,0.0000000); //object(vgs_palm03) (10)
- CreateDynamicObject(3501,-3838.0000000,448.7000122,9.8999996,0.0000000,14.0000000,270.0000000); //object(vgsxrefpartm1) (3)
- CreateDynamicObject(4564,-3805.8000488,601.2000122,117.9000015,0.0000000,11.5000000,96.0000000); //object(laskyscrap2_lan) (2)
- CreateDynamicObject(2780,-3945.0000000,517.2000122,29.3999996,0.0000000,0.0000000,0.0000000); //object(cj_smoke_mach) (1)
- CreateDynamicObject(3437,-3926.1000977,522.5000000,24.3999996,0.0000000,0.0000000,0.0000000); //object(ballypllr01_lvs) (1)
- CreateDynamicObject(3437,-3930.5000000,522.7000122,24.3999996,0.0000000,0.0000000,0.0000000); //object(ballypllr01_lvs) (2)
- CreateDynamicObject(3437,-3958.0000000,522.2999878,24.3999996,0.0000000,0.0000000,0.0000000); //object(ballypllr01_lvs) (3)
- CreateDynamicObject(3437,-3961.8000488,522.2000122,24.3999996,0.0000000,0.0000000,0.0000000); //object(ballypllr01_lvs) (4)
- CreateDynamicObject(7419,-3970.1999512,590.4000244,1.0000000,347.5000000,0.0000000,0.0000000); //object(mallcarpark_vgn01) (1)
- CreateDynamicObject(1383,-4043.1999512,565.7000122,43.9000015,358.0000000,0.0000000,0.0000000); //object(twrcrane_m_04) (1)
- CreateDynamicObject(1384,-4043.6000977,566.7999878,76.4000015,0.0000000,0.0000000,358.0000000); //object(twrcrane_m_01) (1)
- CreateDynamicObject(1390,-4043.1000977,613.7000122,81.0000000,0.0000000,0.0000000,0.0000000); //object(twrcrane_s_02) (1)
- return 1;
- }
- public OnFilterScriptExit()
- {
- print("\n");
- print("The Dynamic Box Package");
- print("Distributed by Romel");
- print("Big thanks to Zher0, Y_Less, DracoBlue, Romel, (Insparation: Valve)");
- print("(c), 2013");
- print("Unoaded!");
- print("\n");
- Starts = false;
- TypeGame = -1;
- SaveSettings();
- set2[spam] = 0;
- set2[forbidword] = 0;
- set2[swarn] = 3;
- set2[sms] = 4000;
- Help = 0;
- Player = -1;
- KillTimer(Timer);
- return 1;
- }
- #endif
- public loadaccount_user(playerid, name[], value[])
- {
- INI_Int("VIPLevel", pInfo[playerid][Vip]);
- INI_Int("FavSkin", pInfo[playerid][FavSkin]);
- INI_Int("UseSkin",pInfo[playerid][UseSkin]);
- INI_Int("Helper", pInfo[playerid][Helper]);
- INI_Float("X", pInfo[playerid][vX]);
- INI_Float("Y", pInfo[playerid][vY]);
- INI_Float("Z", pInfo[playerid][vZ]);
- INI_Float("Angle", pInfo[playerid][vA]);
- INI_Int("World", pInfo[playerid][vW]);
- INI_Int("Interior", pInfo[playerid][vI]);
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- new str[128];
- god[playerid] = 0;
- if(!fexist(Path(playerid)))
- {
- pInfo[playerid][Vip] = 0;
- pInfo[playerid][FavSkin] = -1;
- pInfo[playerid][UseSkin] = 0;
- pInfo[playerid][Helper] = 0;
- pInfo[playerid][vX] = 0.0;
- pInfo[playerid][vY] = 0.0;
- pInfo[playerid][vZ] = 0.0;
- pInfo[playerid][vA] = 0.0;
- pInfo[playerid][vW] = 0;
- pInfo[playerid][vI] = 0;
- new INI:file = INI_Open(Path(playerid));
- INI_SetTag(file, "Account");
- INI_WriteInt(file, "VIPLevel", pInfo[playerid][Vip]);
- INI_WriteInt(file, "FavSkin", pInfo[playerid][FavSkin]);
- INI_WriteInt(file, "UseSkin",pInfo[playerid][UseSkin]);
- INI_WriteInt(file, "Helper", pInfo[playerid][Helper]);
- INI_WriteFloat(file, "X", pInfo[playerid][vX]);
- INI_WriteFloat(file, "Y", pInfo[playerid][vY]);
- INI_WriteFloat(file, "Z", pInfo[playerid][vZ]);
- INI_WriteFloat(file, "Angle", pInfo[playerid][vA]);
- INI_WriteInt(file, "World", pInfo[playerid][vW]);
- INI_WriteInt(file, "Interior", pInfo[playerid][vI]);
- INI_Close(file);
- }
- else if(fexist(Path(playerid)))
- {
- INI_ParseFile(Path(playerid),"loadaccount_user", .bExtra = true, .extra = playerid);
- if(pInfo[playerid][Vip] >= 1)
- {
- format(str, sizeof(str), ""white"VipMsg: "red"Very Important Player "yellow"%s "white"has been connected!", pName(playerid));
- SendClientMessageToAll(-1, str);
- if(pInfo[playerid][Helper] == 0)
- {
- format(str, sizeof(str), "Welcome back V.I.P. %s, Your current V.I.P. rank is %s - Level %d", pName(playerid), rank, pInfo[playerid][Vip]);
- SendClientMessage(playerid, COLOR_YELLOW, str);
- }
- else if(pInfo[playerid][Helper] == 1)
- {
- if(pInfo[playerid][Vip] == 1)
- {
- format(str, sizeof(str), "Welcome back V.I.P./Helper %s, Your current rank is %s [Lvl: %d]", pName(playerid), set2[rank1], pInfo[playerid][Vip]);
- SendClientMessage(playerid, COLOR_YELLOW, str);
- }
- else if(pInfo[playerid][Vip] == 2)
- {
- format(str, sizeof(str), "Welcome back V.I.P./Helper %s, Your current rank is %s [Lvl: %d]", pName(playerid), set2[rank2], pInfo[playerid][Vip]);
- SendClientMessage(playerid, COLOR_YELLOW, str);
- }
- else if(pInfo[playerid][Vip] == 3)
- {
- format(str, sizeof(str), "Welcome back V.I.P./Helper %s, Your current rank is %s [Lvl: %d]", pName(playerid), set2[rank3], pInfo[playerid][Vip]);
- SendClientMessage(playerid, COLOR_YELLOW, str);
- }
- }
- }
- if(pInfo[playerid][Helper] == 1)
- {
- format(str, sizeof(str), ""white"HelperMsg: "red"Helper "yellow"%s "white"has been connected!", pName(playerid));
- SendClientMessageToAll(-1, str);
- if(pInfo[playerid][Vip] == 0)
- {
- format(str, sizeof(str), "Welcome back Helper %s", pName(playerid));
- SendClientMessage(playerid, COLOR_YELLOW, str);
- }
- else if(pInfo[playerid][Vip] >= 1)
- {
- if(pInfo[playerid][Vip] == 1)
- {
- format(str, sizeof(str), "Welcome back V.I.P./Helper %s, Your current rank is %s [Lvl: %d]", pName(playerid), set2[rank1], pInfo[playerid][Vip]);
- SendClientMessage(playerid, COLOR_YELLOW, str);
- }
- else if(pInfo[playerid][Vip] == 2)
- {
- format(str, sizeof(str), "Welcome back V.I.P./Helper %s, Your current rank is %s [Lvl: %d]", pName(playerid), set2[rank2], pInfo[playerid][Vip]);
- SendClientMessage(playerid, COLOR_YELLOW, str);
- }
- else if(pInfo[playerid][Vip] == 3)
- {
- format(str, sizeof(str), "Welcome back V.I.P./Helper %s, Your current rank is %s [Lvl: %d]", pName(playerid), set2[rank3], pInfo[playerid][Vip]);
- SendClientMessage(playerid, COLOR_YELLOW, str);
- }
- }
- }
- }
- playerwarn[playerid] = 0;
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- new INI:file = INI_Open(Path(playerid));
- INI_SetTag(file, "Account");
- INI_WriteInt(file, "VIPLevel", pInfo[playerid][Vip]);
- INI_WriteInt(file, "FavSkin", pInfo[playerid][FavSkin]);
- INI_WriteInt(file, "UseSkin",pInfo[playerid][UseSkin]);
- INI_WriteInt(file, "Helper", pInfo[playerid][Helper]);
- INI_WriteFloat(file, "X", pInfo[playerid][vX]);
- INI_WriteFloat(file, "Y", pInfo[playerid][vY]);
- INI_WriteFloat(file, "Z", pInfo[playerid][vZ]);
- INI_WriteFloat(file, "Angle", pInfo[playerid][vA]);
- INI_WriteInt(file, "World", pInfo[playerid][vW]);
- INI_WriteInt(file, "Interior", pInfo[playerid][vI]);
- INI_Close(file);
- if(IsBeingSpeced[playerid] == 1)
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(spectatorid[i] == playerid)
- {
- StopSpectate(i);
- }
- }
- }
- god[playerid] = 0;
- DestroyVehicle(VipVeh[playerid]);
- playerwarn[playerid] = 0;
- return 1;
- }
- public OnVehicleDeath(vehicleid, killerid)
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(vehicleid == VipVeh[i])
- {
- Delete3DTextLabel(VipV[i]);
- }
- }
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- if(pInfo[playerid][Vip] >= 1)
- {
- if(pInfo[playerid][FavSkin] > 0 && pInfo[playerid][UseSkin] == 1)
- {
- SetPlayerSkin(playerid, pInfo[playerid][FavSkin]);
- }
- SetPlayerArmour(playerid, 100.0);
- }
- if(IsSpecing[playerid] == 1)
- {
- SetPlayerPos(playerid, SpecX[playerid], SpecY[playerid], SpecZ[playerid]);
- SetPlayerInterior(playerid, Inter[playerid]);
- SetPlayerVirtualWorld(playerid, vWorld[playerid]);
- IsSpecing[playerid] = 0;
- IsBeingSpeced[spectatorid[playerid]] = 0;
- }
- return 1;
- }
- public OnPlayerText(playerid, text[])
- {
- new str[128];
- if(set2[typeq] == 1)
- {
- if(Starts == true)
- {
- if(TypeGame == 0) //Question
- {
- if(strcmp(text, targetanswer, true) == 0)
- {
- format(str, sizeof(str), "ANSWER: Player %s[%d] answer the question '%s' the answer is '%s'", pName(playerid), playerid, question, targetanswer);
- SendClientMessageToAll(COLOR_ORANGE, str);
- format(str, sizeof(str), "REACTIONTEST: Player %s[%d] wins '$%d + %d score'", pName(playerid), playerid, set2[prize], set2[prizescore]);
- SendClientMessageToAll(COLOR_YELLOW, str);
- GivePlayerMoney(playerid, set2[prize]);
- SetPlayerScore(playerid, GetPlayerScore(playerid) + set2[prizescore]);
- Starts = false;
- TypeGame = -1;
- KillTimer(Timer);
- return 0;
- }
- }
- if(TypeGame == 1) //Typing
- {
- if(strcmp(text, targetword, true) == 0)
- {
- format(str, sizeof(str), "REACTIONTEST: Player %s[%d] wins '$%d + %d score' for typing '%s' as first", pName(playerid), playerid, set2[prize], set2[prizescore], targetword);
- SendClientMessageToAll(COLOR_YELLOW, str);
- GivePlayerMoney(playerid, set2[prize]);
- SetPlayerScore(playerid, GetPlayerScore(playerid) + set2[prizescore]);
- Starts = false;
- TypeGame = -1;
- KillTimer(Timer);
- return 0;
- }
- }
- }
- }
- if(set2[wgasfw] == 1)
- {
- if(set2[spam] == 1)
- {
- if((GetTickCount() - GetPVarInt(playerid, "spwait")) < set2[sms])
- {
- playerwarn[playerid] += 1;
- format(str, sizeof(str), "ANTI-SPAM: %s(%d) has been warned by Anti-Spam - Warns: %d/%d", pName(playerid), playerid, playerwarn[playerid], set2[swarn]);
- SendClientMessageToAll(0xFFFF00FF, str);
- format(str, sizeof(str), "ANTI-SPAM: You should wait till the Spam Wait Time is finished, Warnings: %d/%d", playerwarn[playerid], set2[swarn]);
- SendClientMessage(playerid, 0xFF0000FF, str);
- if(playerwarn[playerid] == set2[swarn])
- {
- format(str, sizeof(str), "ANTI-SPAM: %s(%d) has been kicked by Anti-Spam for Spamming", pName(playerid), playerid);
- SendClientMessageToAll(0xFF0000FF, str);
- SendClientMessage(playerid, -1, "You've been kicked for Spamming!");
- Kick(playerid);
- return 0;
- }
- return 0;
- }
- SetPVarInt(playerid, "spwait", GetTickCount());
- }
- if(set2[forbidword] == 1)
- {
- for(new s = 0; s < word; s++)
- {
- new pos;
- while((pos = strfind(text, ForbiddenWords[s], true)) != -1) for(new i = pos, j = pos + strlen(ForbiddenWords[s]); i < j; i++) text[i] = '*';
- }
- }
- }
- if(text[0] == set2[symbolchat] && pInfo[playerid][Vip] >= 1)
- {
- format(str, sizeof(str), ""red"Vip Chat: "yellow"%s: "white"%s", pName(playerid), text[1]);
- SendMsgToVips(str, COLOR_WHITE);
- return 0;
- }
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- if(IsBeingSpeced[playerid] == 1)
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(spectatorid[i] == playerid)
- {
- StopSpectate(i);
- }
- }
- }
- return 1;
- }
- public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
- {
- if(IsBeingSpeced[playerid] == 1)
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(spectatorid[i] == playerid)
- {
- SetPlayerInterior(i, GetPlayerInterior(playerid));
- SetPlayerVirtualWorld(i, GetPlayerVirtualWorld(playerid));
- }
- }
- }
- return 1;
- }
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- if(GetPlayerState(playerid) == PLAYER_STATE_SPECTATING && spectatorid[playerid] != INVALID_PLAYER_ID)
- {
- if(newkeys == KEY_JUMP) AdvanceSpectate(playerid);
- else if(newkeys == KEY_SPRINT) ReverseSpectate(playerid);
- }
- return 1;
- }
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- if(newstate == PLAYER_STATE_ONFOOT)
- {
- if(IsBeingSpeced[playerid] == 1)
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(spectatorid[i] == playerid)
- {
- PlayerSpectatePlayer(i, playerid);
- }
- }
- }
- }
- if(newstate == PLAYER_STATE_DRIVER)
- {
- new vehicleid = GetPlayerVehicleID(playerid);
- if(vehicleid == VipVeh[playerid])
- {
- if(pInfo[playerid][Vip] == 0)
- {
- RemovePlayerFromVehicle(playerid);
- SendClientMessage(playerid, COLOR_RED, "Error: You cannot ride on the VIP Vehicle!");
- }
- }
- }
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- new str[128];
- if(dialogid == cset)
- {
- if(!response) return 0;
- switch(listitem)
- {
- case 0:
- {
- if(set2[wgasfw] == 0)
- {
- format(str, sizeof(str), "RCON %s(%d) has enable the We got Anti-Spam/Forbidden Word script from Dynamic Box Package", pName(playerid), playerid);
- SendClientMessageToAll(COLOR_YELLOW, str);
- set2[wgasfw] = 1;
- }
- else if(set2[wgasfw] == 1)
- {
- format(str, sizeof(str), "RCON %s(%d) has disable the We got Anti-Spam/Forbidden Word script from Dynamic Box Package", pName(playerid), playerid);
- SendClientMessageToAll(COLOR_YELLOW, str);
- set2[wgasfw] = 0;
- }
- }
- case 1:
- {
- if(set2[wgasfw] == 0) return SendClientMessage(playerid, COLOR_ORANGE, "Invalid: This command is disabled by Dynamic Box Package!");
- if(set2[spam] == 0)
- {
- format(str, sizeof(str), "RCON %s(%d) has enable the Anti-Spam", pName(playerid), playerid);
- SendClientMessageToAll(COLOR_YELLOW, str);
- set2[spam] = 1;
- }
- else if(set2[spam] == 1)
- {
- format(str, sizeof(str), "RCON %s(%d) has disable the Anti-Spam", pName(playerid), playerid);
- SendClientMessageToAll(COLOR_YELLOW, str);
- set2[spam] = 0;
- }
- }
- case 2:
- {
- if(set2[wgasfw] == 0) return SendClientMessage(playerid, COLOR_ORANGE, "Invalid: This command is disabled by Dynamic Box Package!");
- if(set2[forbidword] == 0)
- {
- format(str, sizeof(str), "RCON %s(%d) has enable the Anti-Forbid Word", pName(playerid), playerid);
- SendClientMessageToAll(COLOR_YELLOW, str);
- set2[forbidword] = 1;
- }
- else if(set2[spam] == 1)
- {
- if(set2[wgasfw] == 0) return SendClientMessage(playerid, COLOR_ORANGE, "Invalid: This command is disabled by Dynamic Box Package!");
- format(str, sizeof(str), "RCON %s(%d) has disable the Anti-Forbid Word", pName(playerid), playerid);
- SendClientMessageToAll(COLOR_YELLOW, str);
- set2[forbidword] = 0;
- }
- }
- case 3:
- {
- ShowPlayerDialog(playerid, cwarn, DIALOG_STYLE_INPUT, "{FFFFFF}Config the Warnings", "{FFFFFF}Function: Put the warnings you like to set when player get's warned\nInput the value not string", "Input", "Back");
- }
- case 4:
- {
- ShowPlayerDialog(playerid, csms, DIALOG_STYLE_INPUT, "{FFFFFF}Config the Wait Time", "{FFFFFF}Function: When player chat, We will store the wait time in variable\nThen when player talks when the wait time is not finish he gets warn\nInput the value (Mileseconds) not string", "Input", "Back");
- }
- case 5:
- {
- ShowPlayerDialog(playerid, cfw, DIALOG_STYLE_INPUT, "{FFFFFF}Add the Words", "{FFFFFF}Function: Type the string that you want to be forbidden word\nInput the string not the value", "Input", "Back");
- }
- case 6:
- {
- new str2[956];
- format(str2, sizeof(str2), "Turn on-off\nAnti-Spam [On/Off]\nAnti-ForbidWord [On/Off]\nSpam Warnings [%d]\nSpam Wait [%d]\nAdd Forbid Words\nForbid Words [%d]", set2[swarn], set2[sms], word);
- ShowPlayerDialog(playerid, cset, DIALOG_STYLE_LIST, "{FFFFFF}Configuration", str2, "Edit", "Close");
- }
- }
- return 1;
- }
- if(dialogid == cwarn)
- {
- if(!response)
- {
- new str2[956];
- format(str2, sizeof(str2), "Turn on-off\nAnti-Spam [On/Off]\nAnti-ForbidWord [On/Off]\nSpam Warnings [%d]\nSpam Wait [%d]\nAdd Forbid Words\nForbid Words [%d]", set2[swarn], set2[sms], word);
- ShowPlayerDialog(playerid, cset, DIALOG_STYLE_LIST, "{FFFFFF}Configuration", str2, "Edit", "Close");
- return 1;
- }
- if(!strlen(inputtext))
- {
- ShowPlayerDialog(playerid, cwarn, DIALOG_STYLE_INPUT, "{FFFFFF}Config the Warnings", "{FFFFFF}Function: Put the warnings you like to set when player get's warned\nInput the value not string\nINVALID: Your field is empty!", "Input", "Back");
- return 1;
- }
- if(!isnumeric(inputtext))
- {
- ShowPlayerDialog(playerid, cwarn, DIALOG_STYLE_INPUT, "{FFFFFF}Config the Warnings", "{FFFFFF}Function: Put the warnings you like to set when player get's warned\nInput the value not string\nINVALID: That's string not value", "Input", "Back");
- return 1;
- }
- if(set2[wgasfw] == 0) return SendClientMessage(playerid, COLOR_ORANGE, "Invalid: This command is disabled by Dynamic Box Package!");
- set2[swarn] = strval(inputtext);
- format(str, sizeof(str), "RCON %s(%d) set the Spam Warnings to %d", pName(playerid), playerid, strval(inputtext));
- SendClientMessageToAll(COLOR_YELLOW, str);
- }
- if(dialogid == csms)
- {
- if(!response)
- {
- new str2[956];
- format(str2, sizeof(str2), "Turn on-off\nAnti-Spam [On/Off]\nAnti-ForbidWord [On/Off]\nSpam Warnings [%d]\nSpam Wait [%d]\nAdd Forbid Words\nForbid Words [%d]", set2[swarn], set2[sms], word);
- ShowPlayerDialog(playerid, cset, DIALOG_STYLE_LIST, "{FFFFFF}Configuration", str2, "Edit", "Close");
- return 1;
- }
- if(!strlen(inputtext))
- {
- ShowPlayerDialog(playerid, csms, DIALOG_STYLE_INPUT, "{FFFFFF}Config the Wait Time", "{FFFFFF}Function: When player chat, We will store the wait time in variable\nThen when player talks when the wait time is not finish he gets warn\nInput the value (Mileseconds) not string\nINVALID: Your field is empty!", "Input", "Back");
- return 1;
- }
- if(!isnumeric(inputtext))
- {
- ShowPlayerDialog(playerid, csms, DIALOG_STYLE_INPUT, "{FFFFFF}Config the Wait Time", "{FFFFFF}Function: When player chat, We will store the wait time in variable\nThen when player talks when the wait time is not finish he gets warn\nInput the value (Mileseconds) not string\nINVALID: That's string not value", "Input", "Back");
- return 1;
- }
- if(set2[wgasfw] == 0) return SendClientMessage(playerid, COLOR_ORANGE, "Invalid: This command is disabled by Dynamic Box Package!");
- set2[sms] = 1000*strval(inputtext);
- format(str, sizeof(str), "RCON %s(%d) set the Spam Wait Time to %d seconds", pName(playerid), playerid, strval(inputtext));
- SendClientMessageToAll(COLOR_YELLOW, str);
- }
- if(dialogid == cfw)
- {
- if(!response)
- {
- new str2[956];
- format(str2, sizeof(str2), "Turn on-off\nAnti-Spam [On/Off]\nAnti-ForbidWord [On/Off]\nSpam Warnings [%d]\nSpam Wait [%d]\nAdd Forbid Words\nForbid Words [%d]", set2[swarn], set2[sms], word);
- ShowPlayerDialog(playerid, cset, DIALOG_STYLE_LIST, "{FFFFFF}Configuration", str2, "Edit", "Close");
- return 1;
- }
- if(!strlen(inputtext))
- {
- ShowPlayerDialog(playerid, cfw, DIALOG_STYLE_INPUT, "{FFFFFF}Add the Words", "{FFFFFF}Function: Type the string that you want to be forbidden word\nInput the string not the value\nINVALID: Your field is empty!", "Input", "Back");
- return 1;
- }
- if(isnumeric(inputtext))
- {
- ShowPlayerDialog(playerid, cfw, DIALOG_STYLE_INPUT, "{FFFFFF}Add the Words", "{FFFFFF}Function: Type the string that you want to be forbidden word\nInput the string not the value\nINVALID: That's value not a string", "Input", "Back");
- return 1;
- }
- if(set2[wgasfw] == 0) return SendClientMessage(playerid, COLOR_ORANGE, "Invalid: This command is disabled by Dynamic Box Package!");
- new File:file, string2[256];
- format(string2, 256, "%s/%s", ConfigPath, SettingsWords);
- file = fopen(string2, io_append);
- format(string2, sizeof(string2), "%s\r\n", inputtext);
- fwrite(file, string2);
- fclose(file);
- new File:file2, file3[256], string[100];
- format(file3, sizeof(file3), "%s/%s", ConfigPath, SettingsWords);
- word = 0;
- if((file2 = fopen(file3, io_read)))
- {
- while(fread(file2, string))
- {
- for(new i = 0, j = strlen(string); i < j; i++) if(string[i] == '\n' || string[i] == '\r') string[i] = '\0';
- ForbiddenWords[word] = string;
- word++;
- }
- fclose(file2);
- printf("[FS]: Forbidden Words has been reloaded - %d Forbidden Words", word);
- }
- format(str, sizeof(str), "RCON %s(%d) has add the word ''%s'' as Forbidden Word", pName(playerid), playerid, inputtext);
- SendClientMessageToAll(COLOR_YELLOW, str);
- }
- if(dialogid == dbox)
- {
- new str2[956];
- if(!response) return 1;
- switch(listitem)
- {
- case 0:
- {
- format(str2, sizeof(str2), "Turn on-off\nAnti-Spam [On/Off]\nAnti-ForbidWord [On/Off]\nSpam Warnings [%d]\nSpam Wait [%d]\nAdd Forbid Words\nForbid Words [%d]", set2[swarn], set2[sms], word);
- ShowPlayerDialog(playerid, cset, DIALOG_STYLE_LIST, "{FFFFFF}Configuration for WGASFW", str2, "Edit", "Back");
- }
- case 1:
- {
- format(str2, sizeof(str2), "Turn on-off\nQuestion Time Ends [%d ms]\nTyping Time Ends [%d ms]\nPrize $$$ [$%d]\nPrize Score [%d]", set2[questiontime], set2[typetime], set2[prize], set2[prizescore]);
- ShowPlayerDialog(playerid, typeques, DIALOG_STYLE_LIST, "{FFFFFF}Configuration for TYQUES", str2, "Edit", "Back");
- }
- case 2:
- {
- format(str2, sizeof(str2), "ReadCmd [On/Off]\nLvl 1: %s\nLvl 2: %s\nLvl 3: %s\nChat Symbol: %s", set2[rank1], set2[rank2], set2[rank3], set2[symbolchat]);
- ShowPlayerDialog(playerid, VipSet, DIALOG_STYLE_LIST, "{FFFFFF}Configuration for RomVip", str2, "Edit", "Back");
- }
- }
- }
- if(dialogid == typeques)
- {
- if(!response)
- {
- format(str, sizeof(str), "We got A-Spam/Forbid Word [On/Off]\nTyping-Question Test [On/Off]\nRomVip [On/Off]");
- ShowPlayerDialog(playerid, dbox, DIALOG_STYLE_LIST, "{FFFFFF}Configuration for Dynamic Box", str, "Edit", "Close");
- return 1;
- }
- switch(listitem)
- {
- case 0:
- {
- if(set2[typeq] == 0)
- {
- format(str, sizeof(str), "RCON %s(%d) has enable the Typing-Question Test script from Dynamic Box Package", pName(playerid), playerid);
- SendClientMessageToAll(COLOR_YELLOW, str);
- set2[typeq] = 1;
- }
- else if(set2[typeq] == 1)
- {
- format(str, sizeof(str), "RCON %s(%d) has disable the Typing-Question script from Dynamic Box Package", pName(playerid), playerid);
- SendClientMessageToAll(COLOR_YELLOW, str);
- set2[typeq] = 0;
- }
- }
- case 1:
- {
- ShowPlayerDialog(playerid, questiontimer, DIALOG_STYLE_INPUT, "{FFFFFF}Question Time Config", "Set the time where the Question Timer ends\nMileseconds, Not string", "Input", "Back");
- }
- case 2:
- {
- ShowPlayerDialog(playerid, typingtimer, DIALOG_STYLE_INPUT, "{FFFFFF}Type Time Config", "Set the time where the Typing Timer ends\nMileseconds, Not string", "Input", "Back");
- }
- case 3:
- {
- ShowPlayerDialog(playerid, Prizes, DIALOG_STYLE_INPUT, "{FFFFFF}Prize $$$ Config", "Set the money prize of the Reaction Contest\nInteger, Not string", "Input", "Back");
- }
- case 4:
- {
- ShowPlayerDialog(playerid, PrizesScore, DIALOG_STYLE_INPUT, "{FFFFFF}Prize Score Config", "Set the score prize of the Reaction Contest\nInteger, Not string", "Input", "Back");
- }
- }
- }
- if(dialogid == questiontimer)
- {
- if(!response)
- {
- format(str, sizeof(str), "We got A-Spam/Forbid Word [On/Off]\nTyping-Question Test [On/Off]\nRomVip [On/Off]");
- ShowPlayerDialog(playerid, dbox, DIALOG_STYLE_LIST, "{FFFFFF}Configuration for Dynamic Box", str, "Edit", "Close");
- return 1;
- }
- if(!strlen(inputtext))
- {
- ShowPlayerDialog(playerid, questiontimer, DIALOG_STYLE_INPUT, "{FFFFFF}Question Time Config", "Set the time where the Question Timer ends\nMileseconds, Not string\nField Empty (Error)", "Input", "Back");
- return 1;
- }
- if(!isnumeric(inputtext))
- {
- ShowPlayerDialog(playerid, questiontimer, DIALOG_STYLE_INPUT, "{FFFFFF}Question Time Config", "Set the time where the Question Timer ends\nMileseconds, Not string\nThat's string not integer (Error)", "Input", "Back");
- return 1;
- }
- if(set2[typeq] == 0) return SendClientMessage(playerid, COLOR_ORANGE, "Invalid: This command is disabled by Dynamic Box Package!");
- set2[questiontime] = 1000*strval(inputtext);
- format(str, sizeof(str), "RCON %s(%d) set the Question Test Time to %d seconds", pName(playerid), playerid, strval(inputtext));
- SendClientMessageToAll(COLOR_YELLOW, str);
- }
- if(dialogid == typingtimer)
- {
- if(!response)
- {
- format(str, sizeof(str), "We got A-Spam/Forbid Word [On/Off]\nTyping-Question Test [On/Off]\nRomVip [On/Off]");
- ShowPlayerDialog(playerid, dbox, DIALOG_STYLE_LIST, "{FFFFFF}Configuration for Dynamic Box", str, "Edit", "Close");
- return 1;
- }
- if(!strlen(inputtext))
- {
- ShowPlayerDialog(playerid, typingtimer, DIALOG_STYLE_INPUT, "{FFFFFF}Type Time Config", "Set the time where the Typing Timer ends\nMileseconds, Not string\nField Empty (Error!)", "Input", "Back");
- return 1;
- }
- if(!isnumeric(inputtext))
- {
- ShowPlayerDialog(playerid, typingtimer, DIALOG_STYLE_INPUT, "{FFFFFF}Type Time Config", "Set the time where the Typing Timer ends\nMileseconds, Not string\nThat's string not integer (Error!)", "Input", "Back");
- return 1;
- }
- if(set2[typeq] == 0) return SendClientMessage(playerid, COLOR_ORANGE, "Invalid: This command is disabled by Dynamic Box Package!");
- set2[typetime] = 1000*strval(inputtext);
- format(str, sizeof(str), "RCON %s(%d) set the Typing Test Time to %d seconds", pName(playerid), playerid, strval(inputtext));
- SendClientMessageToAll(COLOR_YELLOW, str);
- }
- if(dialogid == Prizes)
- {
- if(!response)
- {
- format(str, sizeof(str), "We got A-Spam/Forbid Word [On/Off]\nTyping-Question Test [On/Off]\nRomVip [On/Off]");
- ShowPlayerDialog(playerid, dbox, DIALOG_STYLE_LIST, "{FFFFFF}Configuration for Dynamic Box", str, "Edit", "Close");
- return 1;
- }
- if(!strlen(inputtext))
- {
- ShowPlayerDialog(playerid, prize, DIALOG_STYLE_INPUT, "{FFFFFF}Prize $$$ Config", "Set the money prize of the Reaction Contest\nInteger, Not string\nField Empty (Error!)", "Input", "Back");
- return 1;
- }
- if(!isnumeric(inputtext))
- {
- ShowPlayerDialog(playerid, prize, DIALOG_STYLE_INPUT, "{FFFFFF}Prize $$$ Config", "Set the money prize of the Reaction Contest\nInteger, Not string\nThat's string not integer (Error!)", "Input", "Back");
- return 1;
- }
- if(set2[typeq] == 0) return SendClientMessage(playerid, COLOR_ORANGE, "Invalid: This command is disabled by Dynamic Box Package!");
- set2[prize] = strval(inputtext);
- format(str, sizeof(str), "RCON %s(%d) set the Typing Test-Question Test Prize (Money) to $%d", pName(playerid), playerid, strval(inputtext));
- SendClientMessageToAll(COLOR_YELLOW, str);
- }
- if(dialogid == PrizesScore)
- {
- if(!response)
- {
- format(str, sizeof(str), "We got A-Spam/Forbid Word [On/Off]\nTyping-Question Test [On/Off]\nRomVip [On/Off]");
- ShowPlayerDialog(playerid, dbox, DIALOG_STYLE_LIST, "{FFFFFF}Configuration for Dynamic Box", str, "Edit", "Close");
- return 1;
- }
- if(!strlen(inputtext))
- {
- ShowPlayerDialog(playerid, PrizesScore, DIALOG_STYLE_INPUT, "{FFFFFF}Prize Score Config", "Set the score prize of the Reaction Contest\nInteger, Not string\nField Empty (Error!)", "Input", "Back");
- return 1;
- }
- if(!isnumeric(inputtext))
- {
- ShowPlayerDialog(playerid, PrizesScore, DIALOG_STYLE_INPUT, "{FFFFFF}Prize Score Config", "Set the score prize of the Reaction Contest\nInteger, Not string\nThat's string not integer (Error!)", "Input", "Back");
- return 1;
- }
- if(set2[typeq] == 0) return SendClientMessage(playerid, COLOR_ORANGE, "Invalid: This command is disabled by Dynamic Box Package!");
- set2[prizescore] = strval(inputtext);
- format(str, sizeof(str), "RCON %s(%d) set the Typing Test-Question Test Prize (Score) to %d", pName(playerid), playerid, strval(inputtext));
- SendClientMessageToAll(COLOR_YELLOW, str);
- }
- if(dialogid == VipSet)
- {
- if(!response)
- {
- format(str, sizeof(str), "We got A-Spam/Forbid Word [On/Off]\nTyping-Question Test [On/Off]\nRomVip [On/Off]");
- ShowPlayerDialog(playerid, dbox, DIALOG_STYLE_LIST, "{FFFFFF}Configuration for Dynamic Box", str, "Edit", "Close");
- return 1;
- }
- switch(listitem)
- {
- case 0:
- {
- if(set2[readcmd] == 0)
- {
- format(str, sizeof(str), "RCON %s[%d] enable Reading Commands for VIP", pName(playerid), playerid);
- SendClientMessageToAll(COLOR_YELLOW, str);
- set2[readcmd] = 1;
- }
- else if(set2[readcmd] == 1)
- {
- format(str, sizeof(str), "RCON %s[%d] disable Reading Commands for VIP", pName(playerid), playerid);
- SendClientMessageToAll(COLOR_YELLOW, str);
- set2[readcmd] = 0;
- }
- }
- case 1:
- {
- ShowPlayerDialog(playerid, RankSet, DIALOG_STYLE_INPUT, ""white"Lvl 1 Config", ""white"Put the new Level Rank for VIP Level 1\nCancel to go back to config menu!", "Change", "Back");
- }
- case 2:
- {
- ShowPlayerDialog(playerid, Rank2Set, DIALOG_STYLE_INPUT, ""white"Lvl 2 Config", ""white"Put the new Level Rank for VIP Level 2\nCancel to go back to config menu!", "Change", "Back");
- }
- case 3:
- {
- ShowPlayerDialog(playerid, Rank3Set, DIALOG_STYLE_INPUT, ""white"Lvl 3 Config", ""white"Put the new Level Rank for VIP Level 3\nCancel to go back to config menu!", "Change", "Back");
- }
- case 4:
- {
- ShowPlayerDialog(playerid, SymbolSet, DIALOG_STYLE_INPUT, ""white"Symbol Config", ""white"Put the new symbol for the VIP Chat\nCancel to go back to config menu!", "Change", "Back");
- }
- }
- }
- if(dialogid == RankSet)
- {
- new str2[956];
- if(!response)
- {
- format(str2, sizeof(str2), "ReadCmd [On/Off]\nLvl 1: %s\nLvl 2: %s\nLvl 3: %s\nChat Symbol: %s", set2[rank1], set2[rank2], set2[rank3], set2[symbolchat]);
- ShowPlayerDialog(playerid, VipSet, DIALOG_STYLE_LIST, "{FFFFFF}Configuration for RomVip", str2, "Edit", "Back");
- return 1;
- }
- if(!strlen(inputtext))
- {
- ShowPlayerDialog(playerid, RankSet, DIALOG_STYLE_INPUT, ""white"Lvl 1 Config", ""white"Put the new Level Rank for VIP Level 1\nCancel to go back to config menu!\nEmpty Field!", "Change", "Back");
- return 1;
- }
- new file[256];
- format(file, sizeof(file), "%s/%s", ConfigPath, SettingsSpam);
- new INI:File = INI_Open(file);
- INI_SetTag(File, "Settings");
- INI_WriteString(File, "Rank1", inputtext);
- INI_Close(File);
- new file3[256];
- format(file3, sizeof(file3), "%s/%s", ConfigPath, SettingsSpam);
- INI_ParseFile(file3, "loadfiles", .bExtra = false);
- format(str, sizeof(str), "RCON %s(%d) change the VIP Level 1 Rank to Rank '%s'", pName(playerid), playerid, inputtext);
- SendClientMessageToAll(COLOR_YELLOW, str);
- }
- if(dialogid == Rank2Set)
- {
- new str2[956];
- if(!response)
- {
- format(str2, sizeof(str2), "ReadCmd [On/Off]\nLvl 1: %s\nLvl 2: %s\nLvl 3: %s\nChat Symbol: %s", set2[rank1], set2[rank2], set2[rank3], set2[symbolchat]);
- ShowPlayerDialog(playerid, VipSet, DIALOG_STYLE_LIST, "{FFFFFF}Configuration for RomVip", str2, "Edit", "Back");
- return 1;
- }
- if(!strlen(inputtext))
- {
- ShowPlayerDialog(playerid, Rank2Set, DIALOG_STYLE_INPUT, ""white"Lvl 2 Config", ""white"Put the new Level Rank for VIP Level 2\nCancel to go back to config menu!\nEmpty Field!", "Change", "Back");
- return 1;
- }
- new file[256];
- format(file, sizeof(file), "%s/%s", ConfigPath, SettingsSpam);
- new INI:File = INI_Open(file);
- INI_SetTag(File, "Settings");
- INI_WriteString(File, "Rank2", inputtext);
- INI_Close(File);
- new file3[256];
- format(file3, sizeof(file3), "%s/%s", ConfigPath, SettingsSpam);
- INI_ParseFile(file3, "loadfiles", .bExtra = false);
- format(str, sizeof(str), "RCON %s(%d) change the VIP Level 2 Rank to Rank '%s'", pName(playerid), playerid, inputtext);
- SendClientMessageToAll(COLOR_YELLOW, str);
- }
- if(dialogid == Rank3Set)
- {
- new str2[956];
- if(!response)
- {
- format(str2, sizeof(str2), "ReadCmd [On/Off]\nLvl 1: %s\nLvl 2: %s\nLvl 3: %s\nChat Symbol: %s", set2[rank1], set2[rank2], set2[rank3], set2[symbolchat]);
- ShowPlayerDialog(playerid, VipSet, DIALOG_STYLE_LIST, "{FFFFFF}Configuration for RomVip", str2, "Edit", "Back");
- return 1;
- }
- if(!strlen(inputtext))
- {
- ShowPlayerDialog(playerid, Rank3Set, DIALOG_STYLE_INPUT, ""white"Lvl 3 Config", ""white"Put the new Level Rank for VIP Level 3\nCancel to go back to config menu!\nEmpty Field!", "Change", "Back");
- return 1;
- }
- new file[256];
- format(file, sizeof(file), "%s/%s", ConfigPath, SettingsSpam);
- new INI:File = INI_Open(file);
- INI_SetTag(File, "Settings");
- INI_WriteString(File, "Rank3", inputtext);
- INI_Close(File);
- new file3[256];
- format(file3, sizeof(file3), "%s/%s", ConfigPath, SettingsSpam);
- INI_ParseFile(file3, "loadfiles", .bExtra = false);
- format(str, sizeof(str), "RCON %s(%d) change the VIP Level 3 Rank to Rank '%s'", pName(playerid), playerid, inputtext);
- SendClientMessageToAll(COLOR_YELLOW, str);
- }
- if(dialogid == SymbolSet)
- {
- new str2[956];
- if(!response)
- {
- format(str2, sizeof(str2), "ReadCmd [On/Off]\nLvl 1: %s\nLvl 2: %s\nLvl 3: %s\nChat Symbol: %s", set2[rank1], set2[rank2], set2[rank3], set2[symbolchat]);
- ShowPlayerDialog(playerid, VipSet, DIALOG_STYLE_LIST, "{FFFFFF}Configuration for RomVip", str2, "Edit", "Back");
- return 1;
- }
- if(!strlen(inputtext))
- {
- ShowPlayerDialog(playerid, SymbolSet, DIALOG_STYLE_INPUT, ""white"Symbol Config", ""white"Put the new symbol for the VIP Chat\nCancel to go back to config menu!\nEmpty Field!", "Change", "Back");
- return 1;
- }
- new file[256];
- format(file, sizeof(file), "%s/%s", ConfigPath, SettingsSpam);
- new INI:File = INI_Open(file);
- INI_SetTag(File, "Settings");
- INI_WriteString(File, "ChatSymbol", inputtext);
- INI_Close(File);
- new file3[256];
- format(file3, sizeof(file3), "%s/%s", ConfigPath, SettingsSpam);
- INI_ParseFile(file3, "loadfiles", .bExtra = false);
- format(str, sizeof(str), "RCON %s(%d) change the VIP Chat Symbol to '%s'", pName(playerid), playerid, inputtext);
- SendClientMessageToAll(COLOR_YELLOW, str);
- }
- return 1;
- }
- public KillTest()
- {
- new str[128];
- if(Starts == true)
- {
- if(TypeGame == 0)
- {
- format(str, sizeof(str), "QUESTION: No one answers the question '%s', The answer is '%s'", question, targetanswer);
- SendClientMessageToAll(COLOR_YELLOW, str);
- Starts = false;
- TypeGame = -1;
- }
- if(TypeGame == 1)
- {
- format(str, sizeof(str), "TYPING: No one types the word '%s'", targetword);
- SendClientMessageToAll(COLOR_YELLOW, str);
- Starts = false;
- TypeGame = -1;
- }
- }
- KillTimer(Timer);
- return 1;
- }
- YCMD:features(playerid, params[], help)
- {
- #pragma unused help
- new str[956];
- strcat(str, ""white"Dynamic Box Package features:\n");
- strcat(str, "\nA Very very simple but fast VIP commands\n");
- strcat(str, "Helpers/VIP listing based on Dialog\n");
- strcat(str, "You can disable or enable any scripts (only in the list) with Dynamic Box Package!\n");
- strcat(str, "Help System based on Roleplays\n");
- strcat(str, "Configable settings of each scripts (Such as Prizes, Mileseconds)\n");
- strcat(str, "A VIP Chat with wonderful colors!\n");
- strcat(str, "A VIP Message with wonderful colors!\n");
- strcat(str, "Fixed some issue bugged from previous scripts\n");
- strcat(str, "A VIP Vehicle provided with VIP Vehicle Protection + VIP Vehicle Label\n");
- strcat(str, "Simple Spectating system with keys!\n");
- strcat(str, "VIP Rank configable in-game > /dsettings\n");
- strcat(str, "VIP Chat Symbol configable in-game > /dsettings\n");
- strcat(str, "Previous scripts is now dynamic!");
- ShowPlayerDialog(playerid, Features, DIALOG_STYLE_MSGBOX, ""white"dBox features", str, "Close", "");
- SendCommands(playerid, "/features");
- return 1;
- }
- YCMD:hh(playerid, params[], help)
- {
- new str[956];
- if(pInfo[playerid][Helper] == 0) return SendClientMessage(playerid, COLOR_RED, Error_Helper);
- strcat(str, ""white"RomHelp - Part of dBox system!\n\n");
- strcat(str, "/accepthelp\t\t\t/denyhelp");
- ShowPlayerDialog(playerid, HelperCmd, DIALOG_STYLE_MSGBOX, ""white"Helper Command", str, "Close", "");
- SendCommands(playerid, "/hh");
- return 1;
- }
- YCMD:helpme(playerid, params[], help)
- {
- new str[128];
- new count = 0;
- if(sscanf(params, "s[128]", params)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /helpme [question]");
- format(str, sizeof(str), ""red"Question: "yellow"%s[%d] asks "white"'%s'", pName(playerid), playerid, params);
- SendMsgToHelpers(str, -1);
- SendMsgToHelpers("Helpers, /accepthelp to answer the question, or /denyhelp to deny the question", COLOR_YELLOW);
- Help = 1;
- Player = playerid;
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(pInfo[i][Helper] == 1)
- {
- count++;
- }
- }
- if(count >= 1)
- {
- format(str, sizeof(str), "Your question has been sent to %d Online Helpers!", count);
- SendClientMessage(playerid, COLOR_ORANGE, str);
- }
- else if(count == 0)
- {
- SendClientMessage(playerid, COLOR_RED, "Your question will not be answer, There is no online helpers!");
- }
- SendCommands(playerid, "/helpme");
- return 1;
- }
- YCMD:accepthelp(playerid, params[], help)
- {
- new str[128];
- if(pInfo[playerid][Helper] == 0) return SendClientMessage(playerid, COLOR_RED, Error_Helper);
- if(Help == 0) return SendClientMessage(playerid, COLOR_RED, "Error: There is no Question from Players!");
- else
- {
- if(isnull(params)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /accepthelp [answer]");
- if(IsPlayerConnected(Player))
- {
- format(str, sizeof(str), ""yellow"Helper "red"%s "white"answer your question", pName(playerid));
- SendClientMessage(Player, -1, str);
- format(str, sizeof(str), ""white"Answer: "yellow"Helper "red"%s: "white"%s", pName(playerid), params);
- SendClientMessage(Player, -1, str);
- format(str, sizeof(str), "You answer %s[%d]'s Question", pName(Player), Player);
- SendClientMessage(playerid, COLOR_LIME, str);
- Help = 0;
- Player = -1;
- SendCommands(playerid, "/accepthelp");
- }
- else return SendClientMessage(playerid, COLOR_RED, Error_Connected);
- }
- return 1;
- }
- YCMD:denyhelp(playerid, params[], help)
- {
- new str[128];
- if(pInfo[playerid][Helper] == 0) return SendClientMessage(playerid, COLOR_RED, Error_Helper);
- if(Help == 0) return SendClientMessage(playerid, COLOR_RED, "Error: There is no Question from Players!");
- else
- {
- if(IsPlayerConnected(Player))
- {
- format(str, sizeof(str), ""yellow"Helper "red"%s deny "white"your Question", pName(playerid));
- SendClientMessage(Player, -1, str);
- format(str, sizeof(str), "You deny %s[%d]'s Question", pName(Player), Player);
- SendClientMessage(playerid, COLOR_RED, str);
- Help = 0;
- Player = -1;
- SendCommands(playerid, "/denyhelp");
- }
- else return SendClientMessage(playerid, COLOR_RED, Error_Connected);
- }
- return 1;
- }
- YCMD:ph(playerid, params[], help)
- {
- new str[956];
- strcat(str, ""white"Dynamic Box Package Commands:\n\n");
- strcat(str, "/vh\t\t\t/ph\t\t\t/features\n");
- strcat(str, "/vips\t\t\t/helpers\t\t/hh\n");
- strcat(str, "/helpme\t\t\t/vstats");
- ShowPlayerDialog(playerid, PlayerCmd, DIALOG_STYLE_MSGBOX, ""white"Player Command", str, "Close", "");
- SendCommands(playerid, "/ph");
- return 1;
- }
- YCMD:vstats(playerid, params[], help)
- {
- new str[956], str2[956], string[1][71];
- switch(pInfo[playerid][Helper])
- {
- case 0: string[0] = "No";
- case 1: string[0] = "Yes";
- }
- switch(pInfo[playerid][Vip])
- {
- case 1: rank = set2[rank1];
- case 2: rank = set2[rank2];
- case 3: rank = set2[rank3];
- }
- format(str, sizeof(str), ""white"Name: "orange"%s\n"white"Helper?: "red"%s\n"white"VIP: "yellow"%s [Lvl: %d]\n"white"Warnings: "red"%d "white"out of "red"%d", pName(playerid), string[0], rank, pInfo[playerid][Vip], playerwarn[playerid], set2[swarn]);
- strcat(str2, str);
- ShowPlayerDialog(playerid, PlayerStats, DIALOG_STYLE_MSGBOX, ""white"Player Stats", str2, "Close", "");
- SendCommands(playerid, "/vstats");
- return 1;
- }
- YCMD:vips(playerid, params[], help)
- {
- #pragma unused help
- new string[956];
- new fstring[956];
- new count = 0;
- SendCommands(playerid, "/vips");
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(pInfo[i][Vip] >= 1)
- {
- count++;
- }
- if(pInfo[i][Vip] == 1)
- {
- format(fstring, sizeof(fstring), ""yellow"%s[%d] "white"| "orange"Lvl [%d] | "red"%s\n", pName(i), i, pInfo[i][Vip], set2[rank1]);
- strcat(string, fstring, 956);
- }
- else if(pInfo[i][Vip] == 2)
- {
- format(fstring, sizeof(fstring), ""yellow"%s[%d] "white"| "orange"Lvl [%d] | "red"%s\n", pName(i), i, pInfo[i][Vip], set2[rank2]);
- strcat(string, fstring, 956);
- }
- else if(pInfo[i][Vip] == 3)
- {
- format(fstring, sizeof(fstring), ""yellow"%s[%d] "white"| "orange"Lvl [%d] | "red"%s\n", pName(i), i, pInfo[i][Vip], set2[rank3]);
- strcat(string, fstring, 956);
- }
- }
- if(count == 0) return ShowPlayerDialog(playerid, VipList, DIALOG_STYLE_MSGBOX, ""white"V.I.Ps", ""red"There is no current VIPs online!", "Close", "");
- else
- {
- format(fstring, sizeof(fstring), "\r\n"white"Total V.I.Ps: %d", count);
- strcat(string, fstring, 956);
- ShowPlayerDialog(playerid, VipList, DIALOG_STYLE_MSGBOX, ""white"V.I.Ps", string, "Close", "");
- }
- return 1;
- }
- YCMD:helpers(playerid, params[], help)
- {
- #pragma unused help
- new string[956];
- new fstring[956];
- new count = 0;
- SendCommands(playerid, "/helpers");
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(pInfo[i][Helper] >= 1)
- {
- count++;
- format(fstring, sizeof(fstring), ""white"%s[%d]\n", pName(i), i);
- strcat(string, fstring, 956);
- }
- }
- if(count == 0) return ShowPlayerDialog(playerid, HelpList, DIALOG_STYLE_MSGBOX, ""white"Helpers", ""red"There is no current Helpers online!", "Close", "");
- else
- {
- format(fstring, sizeof(fstring), "\r\n"white"Total Helpers: %d", count);
- strcat(string, fstring, 956);
- ShowPlayerDialog(playerid, HelpList, DIALOG_STYLE_MSGBOX, ""white"Helpers", string, "Close", "");
- }
- return 1;
- }
- YCMD:vh(playerid, params[], help)
- {
- #pragma unused help
- new str[956], str2[956];
- if(pInfo[playerid][Vip] == 0) return SendClientMessage(playerid, COLOR_RED, Error_Vip);
- strcat(str, ""white"RomVip - Part of dBox system!\n\n");
- strcat(str, ""orange"VIP Lvl 1\t\t\tVIP Lvl 2\t\t\tVIP Lvl 3\n");
- strcat(str, ""red"/vsay\t\t\t\t/vheal\t\t\t\t/vkick\n");
- strcat(str, "/varmour\t\t\t/vspec(off)\t\t\t/vslap\n");
- strcat(str, "/vannounce\t\t\t/vgoto\t\t\t\t/vget\n");
- strcat(str, "/vmyt\t\t\t\t/vipgod\t\t\t\t/vwarn\n");
- strcat(str, "/vmyw\t\t\t\t/vmyint\t\t\t\t/vinfinite\n");
- strcat(str, "/visland\t\t\t/vmyworld\t\t\t/car\n");
- strcat(str, "/vsavskin\t\t\t/vdick\t\t\t\t/resetweapon\n");
- strcat(str, "/vuseskin\t\t\t/stophold\t\t\t/vsp\n");
- strcat(str, "/vduseskin\t\t\t/vdestroy\t\t\t/vlp\n");
- strcat(str, "/vcar\t\t\t\t/vweap\t\t\t\t/vskin");
- strcat(str, "\n/vbike\t\t\t\t/vr\t\t\t\t/vaddress\n");
- strcat(str, "/vheli\t\t\t\t/vburn\n");
- strcat(str, "/vboat\n");
- strcat(str, "/vplane\n\n");
- format(str2, 956, ""white"For VIP chat use symbol '{F2C80C}%s{FFFFFF}' before the message", set2[symbolchat]);
- strcat(str, str2);
- ShowPlayerDialog(playerid, VipCmd, DIALOG_STYLE_MSGBOX, ""white"VIP Help", str, "Close", "");
- SendCommands(playerid, "/vh");
- return 1;
- }
- YCMD:vr(playerid, params[], help)
- {
- if(pInfo[playerid][Vip] >= 2)
- {
- if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_RED, "Error: You are not riding in any vehicle!");
- RepairVehicle(GetPlayerVehicleID(playerid));
- SetVehicleHealth(GetPlayerVehicleID(playerid), 1000.0);
- SendClientMessage(playerid, COLOR_ORANGE, "Your vehicle has been repaired!");
- SendCommands(playerid, "/vr");
- }
- else return SendClientMessage(playerid, COLOR_RED, Error_Vip);
- return 1;
- }
- YCMD:vburn(playerid, params[], help)
- {
- new Float:x, Float:y, Float:z;
- if(pInfo[playerid][Vip] >= 2)
- {
- GetPlayerPos(playerid, x, y, z);
- CreateExplosion(x, y, z, 7, 10.0);
- SendClientMessage(playerid, COLOR_YELLOW, "UHH!!, HOT HOT HOT!");
- SendCommands(playerid, "/vburn");
- }
- else return SendClientMessage(playerid, COLOR_RED, Error_Vip);
- return 1;
- }
- YCMD:vweap(playerid, params[], help)
- {
- new weap, str[128], WeapName[32];
- if(pInfo[playerid][Vip] >= 2)
- {
- if(sscanf(params, "i", weap)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /vweap [weaponid]");
- if(weap == 19 || weap == 20 || weap == 21) return SendClientMessage(playerid, COLOR_RED, "Error: There is no weaponid for 19, 20 and 21!");
- if(weap < 1 || weap > 47) return SendClientMessage(playerid, COLOR_RED, "Error: Invalid WeaponID!");
- GetWeaponName(weap, WeapName, 32);
- format(str, sizeof(str), "~w~%s(%d) ~g~for you!", WeapName, weap);
- GameTextForPlayer(playerid, str, 4000, 3);
- GivePlayerWeapon(playerid, weap, 99999);
- format(str, sizeof(str), "You've spawned Weap %s[%d]", WeapName, weap);
- SendClientMessage(playerid, COLOR_YELLOW, str);
- SendCommands(playerid, "/vweap");
- }
- else return SendClientMessage(playerid, COLOR_RED, Error_Vip);
- return 1;
- }
- YCMD:vspec(playerid, params[], help)
- {
- new str[128], id;
- if(pInfo[playerid][Vip] >= 2)
- {
- if(sscanf(params, "u", id)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /spec [playerid]");
- if(id == playerid) return SendClientMessage(playerid, COLOR_RED, Error_Self);
- if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_RED, Error_Connected);
- if(pInfo[playerid][Vip] < pInfo[id][Vip]) return SendClientMessage(playerid, COLOR_RED, Error_Higher);
- if(IsSpecing[playerid] == 1) return SendClientMessage(playerid, COLOR_RED, "Error: You are already spectatiing someone, /specoff first");
- if(GetPlayerState(id) == PLAYER_STATE_SPECTATING && spectatorid[id] != INVALID_PLAYER_ID)
- return SendClientMessage(playerid, COLOR_RED, "Error: That player is current spectating someone!");
- if(GetPlayerState(id) != 1 && GetPlayerState(id) != 2 && GetPlayerState(id) != 3)
- return SendClientMessage(playerid, COLOR_RED, "Error: That player is not spawned");
- StartSpectate(playerid, id);
- format(str, sizeof(str), "Spec: You spectating %s(%d)", pName(id), id);
- SendClientMessage(playerid, COLOR_ORANGE, str);
- SendClientMessage(playerid, COLOR_YELLOW, "Use /specoff to turn off spectating");
- SendClientMessage(playerid, -1, "Press Left or Right to change spectating!");
- SendCommands(playerid, "/vspec");
- }
- else return SendClientMessage(playerid, COLOR_RED, Error_Vip);
- return 1;
- }
- YCMD:vspecoff(playerid, params[], help)
- {
- if(pInfo[playerid][Vip] >= 2)
- {
- if(IsSpecing[playerid] == 0) return SendClientMessage(playerid, COLOR_RED, "Error: You are not spectating anyone");
- StopSpectate(playerid);
- SendClientMessage(playerid, COLOR_YELLOW, "You stop spectating");
- SendCommands(playerid, "/vspecoff");
- }
- else return SendClientMessage(playerid, COLOR_RED, Error_Vip);
- return 1;
- }
- YCMD:car(playerid, params[], help)
- {
- new string[128], vID[32], vVW, vINT, vid, Float:x, Float:y, Float:z, Float:ang, vehicle;
- if(pInfo[playerid][Vip] >= 1)
- {
- if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER) return SendClientMessage(playerid, COLOR_RED, "Error: You cannot spawn vehicle while in passenger sit!");
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_RED, "Error: You already have a vehicle");
- if(sscanf(params, "s[32]", vID)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /vcar [vehicleid]");
- if(isnumeric(vID)) vid = strval(vID);
- else vid = GetVehicleModelIDFromName(vID);
- GetPlayerPos(playerid, x, y, z);
- GetPlayerFacingAngle(playerid, ang);
- if(vid < 400 || vid > 611) return SendClientMessage(playerid, COLOR_RED, "Error: Invalid VehicleID (Name)");
- vehicle = CreateVehicle(vid, x, y, z, 0, -1, -1, 0);
- vVW = GetPlayerVirtualWorld(playerid);
- vINT = GetPlayerInterior(playerid);
- SetVehicleVirtualWorld(vehicle, vVW);
- LinkVehicleToInterior(vehicle, vINT);
- PutPlayerInVehicle(playerid, vehicle, 0);
- format(string, sizeof(string), "You've spawned %s[%d] vehicle", VehicleName[vid - 400], vid);
- SendClientMessage(playerid, COLOR_YELLOW, string);
- SendCommands(playerid, "/car");
- }
- else return SendClientMessage(playerid, COLOR_RED, Error_Vip);
- return 1;
- }
- YCMD:vdestroy(playerid, params[], help)
- {
- new Float:x, Float:y, Float:z;
- GetPlayerPos(playerid, x, y, z);
- if(pInfo[playerid][Vip] >= 1)
- {
- if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_RED, "Error: You aren't in any vehicle, Enter in a vehicle first!");
- SetPlayerPos(playerid, x, y, z+2);
- DestroyVehicle(GetPlayerVehicleID(playerid));
- SendClientMessage(playerid, COLOR_ORANGE, "Vehicle Destroyed!");
- SendCommands(playerid, "/vdestroy");
- }
- else return SendClientMessage(playerid, COLOR_RED, Error_Vip);
- return 1;
- }
- YCMD:visland(playerid, params[], help)
- {
- if(GetPlayerState(playerid) != 1 && GetPlayerState(playerid) != 2 && GetPlayerState(playerid) != 3)
- return SendClientMessage(playerid, COLOR_RED, "Error: You cannot teleport while you're not spawned");
- if(pInfo[playerid][Vip] >= 1)
- {
- SendClientMessage(playerid, -1, "Credits to JellalKoayz for the map!");
- SendClientMessage(playerid, COLOR_ORANGE, "VIP Island!");
- RemovePlayerFromVehicle(playerid);
- SetCameraBehindPlayer(playerid);
- SetPlayerInterior(playerid, 0);
- SetPlayerPos(playerid, -3946.2520,524.1570,21.1078);
- SetPlayerFacingAngle(playerid, 229.1066);
- SendCommands(playerid, "/visland");
- }
- else return SendClientMessage(playerid, COLOR_RED, Error_Vip);
- return 1;
- }
- YCMD:vcar(playerid, params[], help)
- {
- new Float:x, Float:y, Float:z, Float:angle, str[128];
- GetPlayerPos(playerid, x, y, z);
- GetPlayerFacingAngle(playerid, angle);
- if(pInfo[playerid][Vip] >= 1)
- {
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_RED, "Error: You already have a vehicle!");
- VipVeh[playerid] = AddStaticVehicle(411, x, y, z, angle, -1, -1);
- format(str, sizeof(str), "VIP Car Vehicle of\n%s(%d)", pName(playerid), playerid);
- Delete3DTextLabel(VipV[playerid]);
- VipV[playerid] = Create3DTextLabel(str, COLOR_ORANGE, 0.0, 0.0, 0.0, 50.0, 0, 1);
- Attach3DTextLabelToVehicle(VipV[playerid], VipVeh[playerid], 0.0, 0.0, 0.0);
- PutPlayerInVehicle(playerid, VipVeh[playerid], 0);
- SendClientMessage(playerid, COLOR_LIME, "You spawn a VIP Private Car Vehicle!");
- SendCommands(playerid, "/vcar");
- }
- else return SendClientMessage(playerid, COLOR_RED, Error_Vip);
- return 1;
- }
- YCMD:vbike(playerid, params[], help)
- {
- new Float:x, Float:y, Float:z, Float:angle, str[128];
- GetPlayerPos(playerid, x, y, z);
- GetPlayerFacingAngle(playerid, angle);
- if(pInfo[playerid][Vip] >= 1)
- {
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_RED, "Error: You already have a vehicle!");
- VipVeh[playerid] = AddStaticVehicle(522, x, y, z, angle, -1, -1);
- format(str, sizeof(str), "VIP Bike Vehicle of\n%s(%d)", pName(playerid), playerid);
- Delete3DTextLabel(VipV[playerid]);
- VipV[playerid] = Create3DTextLabel(str, COLOR_ORANGE, 0.0, 0.0, 0.0, 50.0, 0, 1);
- Attach3DTextLabelToVehicle(VipV[playerid], VipVeh[playerid], 0.0, 0.0, 0.0);
- PutPlayerInVehicle(playerid, VipVeh[playerid], 0);
- SendClientMessage(playerid, COLOR_LIME, "You spawn a VIP Private Bike Vehicle!");
- SendCommands(playerid, "/vbike");
- }
- else return SendClientMessage(playerid, COLOR_RED, Error_Vip);
- return 1;
- }
- YCMD:vheli(playerid, params[], help)
- {
- new Float:x, Float:y, Float:z, Float:angle, str[128];
- GetPlayerPos(playerid, x, y, z);
- GetPlayerFacingAngle(playerid, angle);
- if(pInfo[playerid][Vip] >= 1)
- {
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_RED, "Error: You already have a vehicle!");
- VipVeh[playerid] = AddStaticVehicle(425, x, y, z, angle, -1, -1);
- format(str, sizeof(str), "VIP Helicopter Vehicle of\n%s(%d)", pName(playerid), playerid);
- Delete3DTextLabel(VipV[playerid]);
- VipV[playerid] = Create3DTextLabel(str, COLOR_ORANGE, 0.0, 0.0, 0.0, 50.0, 0, 1);
- Attach3DTextLabelToVehicle(VipV[playerid], VipVeh[playerid], 0.0, 0.0, 0.0);
- PutPlayerInVehicle(playerid, VipVeh[playerid], 0);
- SendClientMessage(playerid, COLOR_LIME, "You spawn a VIP Private Helicopter Vehicle!");
- SendCommands(playerid, "/vheli");
- }
- else return SendClientMessage(playerid, COLOR_RED, Error_Vip);
- return 1;
- }
- YCMD:vboat(playerid, params[], help)
- {
- new Float:x, Float:y, Float:z, Float:angle, str[128];
- GetPlayerPos(playerid, x, y, z);
- GetPlayerFacingAngle(playerid, angle);
- if(pInfo[playerid][Vip] >= 1)
- {
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_RED, "Error: You already have a vehicle!");
- VipVeh[playerid] = AddStaticVehicle(493, x, y, z, angle, -1, -1);
- format(str, sizeof(str), "VIP Boat Vehicle of\n%s(%d)", pName(playerid), playerid);
- Delete3DTextLabel(VipV[playerid]);
- VipV[playerid] = Create3DTextLabel(str, COLOR_ORANGE, 0.0, 0.0, 0.0, 50.0, 0, 1);
- Attach3DTextLabelToVehicle(VipV[playerid], VipVeh[playerid], 0.0, 0.0, 0.0);
- PutPlayerInVehicle(playerid, VipVeh[playerid], 0);
- SendClientMessage(playerid, COLOR_LIME, "You spawn a VIP Private Boat Vehicle!");
- SendCommands(playerid, "/vboat");
- }
- else return SendClientMessage(playerid, COLOR_RED, Error_Vip);
- return 1;
- }
- YCMD:vplane(playerid, params[], help)
- {
- new Float:x, Float:y, Float:z, Float:angle, str[128];
- GetPlayerPos(playerid, x, y, z);
- GetPlayerFacingAngle(playerid, angle);
- if(pInfo[playerid][Vip] >= 1)
- {
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_RED, "Error: You already have a vehicle!");
- VipVeh[playerid] = AddStaticVehicle(519, x, y, z, angle, -1, -1);
- format(str, sizeof(str), "VIP Plane Vehicle of\n%s(%d)", pName(playerid), playerid);
- Delete3DTextLabel(VipV[playerid]);
- VipV[playerid] = Create3DTextLabel(str, COLOR_ORANGE, 0.0, 0.0, 0.0, 50.0, 0, 1);
- Attach3DTextLabelToVehicle(VipV[playerid], VipVeh[playerid], 0.0, 0.0, 1.0);
- PutPlayerInVehicle(playerid, VipVeh[playerid], 0);
- SendClientMessage(playerid, COLOR_LIME, "You spawn a VIP Private Plane Vehicle!");
- SendCommands(playerid, "/vplane");
- }
- else return SendClientMessage(playerid, COLOR_RED, Error_Vip);
- return 1;
- }
- YCMD:vannounce(playerid, params[], help)
- {
- new str[128];
- if(pInfo[playerid][Vip] >= 1)
- {
- if(sscanf(params, "s[128]", params)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /vannounce [text]");
- format(str, sizeof(str), "%s", params);
- GameTextForAll(str, 6000, 3);
- SendCommands(playerid, "/vannounce");
- }
- else return SendClientMessage(playerid, COLOR_RED, Error_Vip);
- return 1;
- }
- YCMD:vmyt(playerid, params[], help)
- {
- new str[128], id;
- if(pInfo[playerid][Vip] >= 1)
- {
- if(sscanf(params, "i", id)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /vmyt [0 - 23]");
- if(id < 0 || id > 23) return SendClientMessage(playerid, COLOR_RED, "Error: Invalid Time!");
- format(str, sizeof(str), ""yellow"You set your time to "orange"%02d:00", id);
- SendClientMessage(playerid, -1, str);
- SetPlayerTime(playerid, id, 0);
- SendCommands(playerid, "/vmyt");
- }
- else return SendClientMessage(playerid, COLOR_RED, Error_Vip);
- return 1;
- }
- YCMD:vmyw(playerid, params[], help)
- {
- new str[128], id;
- if(pInfo[playerid][Vip] >= 1)
- {
- if(sscanf(params, "i", id)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /vmyw [0 - 45]");
- if(id < 0 || id > 45) return SendClientMessage(playerid, COLOR_RED, "Error: Invalid WeatherID!");
- format(str, sizeof(str), ""yellow"You set your weather to "orange"%d", id);
- SendClientMessage(playerid, -1, str);
- SetPlayerWeather(playerid, id);
- SendCommands(playerid, "/vmyw");
- }
- else return SendClientMessage(playerid, COLOR_RED, Error_Vip);
- return 1;
- }
- YCMD:vdick(playerid, params[], help)
- {
- if(pInfo[playerid][Vip] >= 2)
- {
- for(new i = 0; i < 5; i++)
- {
- if(IsPlayerAttachedObjectSlotUsed(playerid, i))
- {
- RemovePlayerAttachedObject(playerid, i);
- }
- }
- SetPlayerAttachedObject(playerid, 1, 19086, 8, -0.049768, -0.014062, -0.108385, 87.458297, 263.478149, 184.123764, 0.622413, 1.041609, 1.012785);
- SendClientMessage(playerid, COLOR_YELLOW, "You have holded a "orange"dick!" );
- SendClientMessage(playerid, COLOR_RED, "To stop holding please type "orange"/stophold!" );
- SendCommands(playerid, "/vdick");
- }
- else return SendClientMessage(playerid, COLOR_RED, Error_Vip);
- return 1;
- }
- YCMD:stophold(playerid, params[], help)
- {
- if(pInfo[playerid][Vip] >= 2)
- {
- if(!IsPlayerAttachedObjectSlotUsed(playerid, 1 )) return SendClientMessage(playerid, COLOR_RED, "Error: You are not holding any object" );
- for(new i = 0; i < 5; i++)
- {
- if(IsPlayerAttachedObjectSlotUsed(playerid, i))
- {
- RemovePlayerAttachedObject( playerid, i );
- }
- }
- SendCommands(playerid, "/stophold");
- SendClientMessage(playerid, COLOR_RED, "You have stopped holding object!");
- }
- else return SendClientMessage(playerid, COLOR_RED, Error_Vip);
- return 1;
- }
- YCMD:vmyint(playerid, params[], help)
- {
- new str[128], id;
- if(pInfo[playerid][Vip] >= 2)
- {
- if(sscanf(params, "i", id)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /vmyint [interior]");
- format(str, sizeof(str), "Interior set to Interior %d", id);
- SendClientMessage(playerid, COLOR_YELLOW, str);
- SetPlayerInterior(playerid, id);
- SendCommands(playerid, "/vmyint");
- }
- else return SendClientMessage(playerid, COLOR_RED, Error_Vip);
- return 1;
- }
- YCMD:vmyworld(playerid, params[], help)
- {
- new str[128], id;
- if(pInfo[playerid][Vip] >= 2)
- {
- if(sscanf(params, "i", id)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /vmyworld [world]");
- format(str, sizeof(str), "World set to Virtual World %d", id);
- SendClientMessage(playerid, COLOR_YELLOW, str);
- SetPlayerVirtualWorld(playerid, id);
- SendCommands(playerid, "/vmyworld");
- }
- else return SendClientMessage(playerid, COLOR_RED, Error_Vip);
- return 1;
- }
- YCMD:vipgod(playerid, params[], help)
- {
- if(pInfo[playerid][Vip] >= 2)
- {
- if(god[playerid] == 0)
- {
- SetPlayerHealth(playerid, INFINITE);
- ResetPlayerWeapons(playerid);
- god[playerid] = 1;
- SendClientMessage(playerid, COLOR_LIME, "GOD MODE ON!");
- }
- else if(god[playerid] == 1)
- {
- SetPlayerHealth(playerid, 100.0);
- SpawnPlayer(playerid);
- god[playerid] = 0;
- SendClientMessage(playerid, COLOR_YELLOW, "GOD MODE OFF!");
- }
- SendCommands(playerid, "/vipgod");
- }
- else return SendClientMessage(playerid, COLOR_RED, Error_Vip);
- return 1;
- }
- YCMD:vgoto(playerid, params[], help)
- {
- new str[128], id;
- new Float:x, Float:y, Float:z;
- if(GetPlayerState(playerid) != 1 && GetPlayerState(playerid) != 2 && GetPlayerState(playerid) != 3)
- return SendClientMessage(playerid, COLOR_RED, "Error: Not spawned, So you cannot use this command!");
- if(pInfo[playerid][Vip] >= 2)
- {
- if(sscanf(params, "u", id)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /vgoto [playerid]");
- if(id == playerid) return SendClientMessage(playerid, COLOR_RED, Error_Self);
- if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_RED, Error_Connected);
- GetPlayerPos(id, x, y, z);
- format(str, sizeof(str), "GOTO: You have teleported to %s[%d] position!", pName(id), id);
- SendClientMessage(playerid, COLOR_LIME, str);
- format(str, sizeof(str), ""yellow"V-Goto: "orange"V.I.P. %s[%d] has teleport to your position!", pName(playerid), playerid);
- SendClientMessage(id, -1, str);
- SetPlayerInterior(playerid, GetPlayerInterior(id));
- SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(id));
- if(GetPlayerState(id) == PLAYER_STATE_DRIVER || GetPlayerState(id) == PLAYER_STATE_PASSENGER)
- {
- SetVehiclePos(GetPlayerVehicleID(playerid), x+3, y, z);
- LinkVehicleToInterior(GetPlayerVehicleID(playerid), GetPlayerInterior(id));
- SetVehicleVirtualWorld(GetPlayerVehicleID(playerid), GetPlayerVirtualWorld(id));
- }
- else SetPlayerPos(playerid, x+2, y, z);
- SendCommands(playerid, "/vgoto");
- }
- else return SendClientMessage(playerid, COLOR_RED, Error_Vip);
- return 1;
- }
- YCMD:vaddress(playerid, params[], help)
- {
- new str[128], id, ip[20];
- if(pInfo[playerid][Vip] >= 3)
- {
- if(sscanf(params, "u", id)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /vaddress [playerid]");
- if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_RED, Error_Connected);
- GetPlayerIp(playerid, ip, 20);
- format(str, sizeof(str), "IP: %s[%d] Ip Address: %s", pName(id), id, ip);
- SendClientMessage(playerid, COLOR_YELLOW, str);
- SendCommands(playerid, "/vaddress");
- }
- else return SendClientMessage(playerid, COLOR_RED, Error_Vip);
- return 1;
- }
- YCMD:vinfinite(playerid, params[], help)
- {
- if(pInfo[playerid][Vip] >= 3)
- {
- new slot, weap, ammo;
- for (slot = 0; slot < 14; slot++)
- {
- GetPlayerWeaponData(playerid, slot, weap, ammo);
- if(weap > 0 && weap < 19 || weap > 21 && weap < 47)
- {
- GivePlayerWeapon(playerid, weap, 99999);
- }
- }
- SendCommands(playerid, "/vinfinite");
- SendClientMessage(playerid, COLOR_YELLOW, "Ammos' of the Weapon are now infinite!");
- }
- else return SendClientMessage(playerid, COLOR_RED, Error_Vip);
- return 1;
- }
- YCMD:vwarn(playerid, params[], help)
- {
- new str[128], id, reason[128];
- if(pInfo[playerid][Vip] >= 3)
- {
- if(sscanf(params, "us[128]", id, reason)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /warn [playerid] [reason]");
- if(id == playerid) return SendClientMessage(playerid, COLOR_RED, Error_Self);
- if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_RED, Error_Connected);
- if(pInfo[playerid][Vip] < pInfo[id][Vip]) return SendClientMessage(playerid, COLOR_RED, Error_Higher);
- playerwarn[playerid] += 1;
- if(playerwarn[id] == set2[swarn])
- {
- format(str, sizeof(str), ""yellow"V-KICK: "red"%s[%d] has been kicked [Reason: Reach the Maxium Warnings!]", pName(id), id);
- SendClientMessageToAll(-1, str);
- SendClientMessage(id, COLOR_ORANGE, ""yellow"V-KICK: "red"You've been kicked [Reason: Reach the Maxium Warnings!]");
- return Kick(id);
- }
- format(str, sizeof(str), ""yellow"V-Warn: "red"V.I.P. %s[%d] warns %s[%d] [Reason: %s] [Warnings: %d/%d]", pName(playerid), playerid, pName(id), id, reason, playerwarn[id], set2[swarn]);
- SendClientMessageToAll(COLOR_YELLOW, str);
- format(str, sizeof(str), "WARN: You warn %s[%d] [Reason: %s] [Warnings: %d/%d]", pName(id), id, reason, playerwarn[id], set2[swarn]);
- SendClientMessage(playerid, COLOR_RED, str);
- format(str, sizeof(str), ""yellow"V-Warn: "red"V.I.P. %s[%d] warns you [Reason: %s] [Warnings: %d/%d]", pName(playerid), playerid, reason, playerwarn[id], set2[swarn]);
- SendClientMessage(id, -1, str);
- SendCommands(playerid, "/vwarn");
- }
- else return SendClientMessage(playerid, COLOR_RED, Error_Vip);
- return 1;
- }
- YCMD:vget(playerid, params[], help)
- {
- new str[128], id;
- if(pInfo[playerid][Vip] >= 3)
- {
- if(sscanf(params, "u", id)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /vget [playerid]");
- if(id == playerid) return SendClientMessage(playerid, COLOR_RED, Error_Self);
- if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_RED, Error_Connected);
- new Float:x, Float:y, Float:z;
- GetPlayerPos(playerid, x, y, z);
- SetPlayerInterior(id, GetPlayerInterior(playerid));
- SetPlayerVirtualWorld(id, GetPlayerVirtualWorld(playerid));
- if(GetPlayerState(id) == PLAYER_STATE_DRIVER || GetPlayerState(id) == PLAYER_STATE_PASSENGER)
- {
- new VehicleID = GetPlayerVehicleID(id);
- SetVehiclePos(VehicleID, x+3, y, z);
- LinkVehicleToInterior(VehicleID, GetPlayerInterior(playerid));
- SetVehicleVirtualWorld(GetPlayerVehicleID(id), GetPlayerVirtualWorld(playerid));
- }
- else SetPlayerPos(id, x+2, y, z);
- format(str, sizeof(str), ""orange"V-Get: "red"V.I.P. %s[%d] "yellow"has get you and put you in his position!", pName(playerid), playerid);
- SendClientMessage(id, -1, str);
- format(str, sizeof(str), "GET: You get %s[%d] and put him in your position", pName(id), id);
- SendClientMessage(playerid, COLOR_YELLOW, str);
- SendCommands(playerid, "/vget");
- }
- else return SendClientMessage(playerid, COLOR_RED, Error_Vip);
- return 1;
- }
- YCMD:vslap(playerid, params[], help)
- {
- #pragma unused help
- new Float:x, Float:y, Float:z, Float:health;
- new str[128], id, reason[128];
- if(pInfo[playerid][Vip] >= 3)
- {
- if(sscanf(params, "us[128]", id, reason)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /slap [playerid] [reason]");
- if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_RED, Error_Connected);
- if(pInfo[playerid][Vip] < pInfo[id][Vip]) return SendClientMessage(playerid, COLOR_RED, Error_Higher);
- GetPlayerPos(id, x, y, z);
- GetPlayerHealth(id, health);
- SetPlayerHealth(id, health-25);
- SetPlayerPos(id, x, y, z+5);
- format(str, sizeof(str), "SLAP: You slap %s[%d] [Reason: %s]", pName(id), id, reason);
- SendClientMessage(playerid, COLOR_YELLOW, str);
- format(str, sizeof(str), ""red"V-Slap: "yellow"You have been slap by "red"V.I.P. %s[%d] [Reason: %s]", pName(playerid), playerid, reason);
- SendClientMessage(id, -1, str);
- PlayerPlaySound(playerid, 1190, 0.0, 0.0, 0.0);
- PlayerPlaySound(id, 1190, 0.0, 0.0, 0.0);
- SendCommands(playerid, "/vslap");
- }
- else return SendClientMessage(playerid, COLOR_RED, Error_Vip);
- return 1;
- }
- YCMD:vkick(playerid, params[], help)
- {
- #pragma unused help
- new string[128], id, reason[128];
- if(pInfo[playerid][Vip] >= 3)
- {
- if(sscanf(params, "us[128]", id, reason)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /kick [playerid] [reason]");
- if(id == playerid) return SendClientMessage(playerid, COLOR_RED, Error_Self);
- if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_RED, Error_Connected);
- if(pInfo[playerid][Vip] < pInfo[id][Vip]) return SendClientMessage(playerid, COLOR_RED, Error_Higher);
- format(string, sizeof(string), "KICK: You kicked %s[%d] [Reason: %s]", pName(id), id, reason);
- SendClientMessage(playerid, COLOR_RED, string);
- format(string, sizeof(string), ""white"V-Kick: "yellow"%s[%d] has been "red"kicked "white"by "yellow"V.I.P. %s[%d] [Reason: %s]", pName(id), id, pName(playerid), playerid, reason);
- SendClientMessageToAll(-1, string);
- format(string, sizeof(string), ""red"V-Kick: You have been kicked by "yellow"V.I.P. %s[%d] [Reason: %s]", pName(playerid), playerid, reason);
- SendClientMessage(id, COLOR_ORANGE, string);
- SendCommands(playerid, "/vkick");
- Kick(id);
- }
- else return SendClientMessage(playerid, COLOR_RED, Error_Vip);
- return 1;
- }
- YCMD:vsp(playerid, params[], help)
- {
- #pragma unused help
- if(pInfo[playerid][Vip] >= 3)
- {
- new Float:x, Float:y, Float:z, Float:a;
- new i = GetPlayerInterior(playerid);
- new w = GetPlayerVirtualWorld(playerid);
- GetPlayerPos(playerid, x, y, z);
- pInfo[playerid][vX] = x; pInfo[playerid][vY] = y; pInfo[playerid][vZ] = z;
- pInfo[playerid][vI] = i; pInfo[playerid][vW] = w; pInfo[playerid][vA] = a;
- SendClientMessage(playerid, COLOR_LIME, "Position saved!");
- SendCommands(playerid, "/vsp");
- }
- else return SendClientMessage(playerid, COLOR_RED, Error_Vip);
- return 1;
- }
- YCMD:vlp(playerid, params[], help)
- {
- #pragma unused help
- if(pInfo[playerid][Vip] >= 3)
- {
- if(pInfo[playerid][vX] == 0.0 && pInfo[playerid][vY] == 0.0 && pInfo[playerid][vZ] == 0.0 && pInfo[playerid][vA] == 0.0) return SendClientMessage(playerid, COLOR_RED, "Error: You haven't saved any positions!");
- SetCameraBehindPlayer(playerid);
- SetPlayerPos(playerid, pInfo[playerid][vX], pInfo[playerid][vY], pInfo[playerid][vZ]);
- SetPlayerFacingAngle(playerid, pInfo[playerid][vA]);
- SetPlayerVirtualWorld(playerid, pInfo[playerid][vW]);
- SetPlayerInterior(playerid, pInfo[playerid][vI]);
- SendClientMessage(playerid, COLOR_YELLOW, "Position loaded!");
- SendCommands(playerid, "/vlp");
- }
- else return SendClientMessage(playerid, COLOR_RED, Error_Vip);
- return 1;
- }
- YCMD:resetweapons(playerid, params[], help)
- {
- #pragma unused help
- if(pInfo[playerid][Vip] >= 3)
- {
- ResetPlayerWeapons(playerid);
- SendClientMessage(playerid, COLOR_ORANGE, "Weapon resetted!");
- SendCommands(playerid, "/resetweapons");
- }
- else return SendClientMessage(playerid, COLOR_RED, Error_Vip);
- return 1;
- }
- YCMD:vsaveskin(playerid, params[], help)
- {
- #pragma unused help
- if(pInfo[playerid][Vip] == 0) return SendClientMessage(playerid, COLOR_RED, Error_Vip);
- pInfo[playerid][FavSkin] = GetPlayerSkin(playerid);
- SendClientMessage(playerid, COLOR_ORANGE, "You've save your current skin as your favorite VIP skin!");
- SendClientMessage(playerid, COLOR_YELLOW, "use /vuseskin to use it!");
- SendCommands(playerid, "/vsaveskin");
- return 1;
- }
- YCMD:vuseskin(playerid, params[], help)
- {
- #pragma unused help
- if(pInfo[playerid][Vip] == 0) return SendClientMessage(playerid, COLOR_RED, Error_Vip);
- if(pInfo[playerid][FavSkin] <= -1) return SendClientMessage(playerid, COLOR_RED, "Error: You don't have any saved skins!");
- if(pInfo[playerid][UseSkin] == 1 && pInfo[playerid][FavSkin] == GetPlayerSkin(playerid)) return SendClientMessage(playerid, COLOR_RED, "Error: You're already using your saved skin!");
- SendClientMessage(playerid, COLOR_ORANGE, "You've used your save VIP skin!");
- SendClientMessage(playerid, COLOR_YELLOW, "use /vduseskin to don't use it!");
- pInfo[playerid][UseSkin] = 1;
- SetPlayerSkin(playerid, pInfo[playerid][FavSkin]);
- SendCommands(playerid, "/vuseskin");
- return 1;
- }
- YCMD:vduseskin(playerid, params[], help)
- {
- #pragma unused help
- if(pInfo[playerid][Vip] == 0) return SendClientMessage(playerid, COLOR_RED, Error_Vip);
- if(pInfo[playerid][FavSkin] >= -1) return SendClientMessage(playerid, COLOR_RED, "Error: You don't have any saved skins!");
- if(pInfo[playerid][UseSkin] == 1 && pInfo[playerid][FavSkin] == GetPlayerSkin(playerid))
- {
- SendClientMessage(playerid, COLOR_ORANGE, "You've stop using your save VIP skin!");
- SendClientMessage(playerid, COLOR_YELLOW, "use /vuseskin to use it again!");
- pInfo[playerid][UseSkin] = 0;
- SetPlayerSkin(playerid, 0);
- SendCommands(playerid, "/vduseskin");
- }
- else return SendClientMessage(playerid, COLOR_RED, "Error: You're not using your saved skin anymore!");
- return 1;
- }
- YCMD:vsay(playerid, params[], help)
- {
- #pragma unused help
- new str[128];
- if(pInfo[playerid][Vip] == 0) return SendClientMessage(playerid, COLOR_RED, Error_Vip);
- if(isnull(params)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /vsay [text]");
- format(str, sizeof(str), ""red"Vip "yellow"%s: "white"%s", pName(playerid), params);
- SendClientMessageToAll(-1, str);
- SendCommands(playerid, "/vsay");
- return 1;
- }
- YCMD:varmour(playerid, params[], help)
- {
- #pragma unused help
- if(pInfo[playerid][Vip] == 0) return SendClientMessage(playerid, COLOR_RED, Error_Vip);
- SetPlayerArmour(playerid, 100.0);
- SendClientMessage(playerid, COLOR_LIME, "Your armour has been refilled!");
- SendCommands(playerid, "/varmour");
- return 1;
- }
- YCMD:vheal(playerid, params[], help)
- {
- #pragma unused help
- if(pInfo[playerid][Vip] >= 2)
- {
- SetPlayerHealth(playerid, 100.0);
- SendClientMessage(playerid, COLOR_LIME, "You have been healed!");
- SendCommands(playerid, "/vheal");
- }
- else return SendClientMessage(playerid, COLOR_RED, Error_Vip);
- return 1;
- }
- YCMD:vskin(playerid, params[], help)
- {
- #pragma unused help
- new skin;
- if(pInfo[playerid][Vip] >= 3)
- {
- if(sscanf(params, "i", skin)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /vskin [0 - 299]");
- if(skin < 0 || skin > 299) return SendClientMessage(playerid, COLOR_RED, "Error: You cannot use invalid skin IDs!");
- SetPlayerSkin(playerid, skin);
- SendClientMessage(playerid, COLOR_LIME, "Your skin has been changed to what you want!");
- SendCommands(playerid, "/vskin");
- }
- else return SendClientMessage(playerid, COLOR_RED, Error_Vip);
- return 1;
- }
- YCMD:setvip(playerid, params[], help)
- {
- #pragma unused help
- new str[128], id, vip;
- if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_ORANGE, "Invalid: You're not allowed to use this command!");
- if(sscanf(params, "ui", id, vip)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /setvip [playerid] [0 - 3]");
- if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_RED, Error_Connected);
- if(vip < 0 || vip > MAX_VIP_LVL) return SendClientMessage(playerid, COLOR_RED, "Error: You cannot set player to invalid VIP Level!");
- if(vip == pInfo[id][Vip]) return SendClientMessage(playerid, COLOR_RED, "Error: That player is already in that Vip Level!");
- if(pInfo[id][Vip] > vip) GameTextForPlayer(id, "~r~Demoted", 3000, 3);
- if(pInfo[id][Vip] < vip) GameTextForPlayer(id, "~g~Promoted", 3000, 3);
- pInfo[id][Vip] = vip;
- if(pInfo[id][Vip] == 0)
- {
- format(str, sizeof(str), "Congratulations!, "yellow"RCON %s[%d] "white"set you to "yellow"VIP Level %d - Player", pName(playerid), playerid, vip);
- SendClientMessage(id, -1, str);
- format(str, sizeof(str), ""yellow"You set "white"%s[%d] to "yellow"VIP Level %d - Player", pName(id), id, vip);
- SendClientMessage(playerid, -1, str);
- }
- else if(pInfo[id][Vip] == 1)
- {
- format(str, sizeof(str), "Congratulations!, "yellow"RCON %s[%d] "white"set you to "yellow"VIP Level %d - %s", pName(playerid), playerid, vip, set2[rank1]);
- SendClientMessage(id, -1, str);
- format(str, sizeof(str), ""yellow"You set "white"%s[%d] to "yellow"VIP Level %d - %s", pName(id), id, vip, set2[rank1]);
- SendClientMessage(playerid, -1, str);
- }
- else if(pInfo[id][Vip] == 2)
- {
- format(str, sizeof(str), "Congratulations!, "yellow"RCON %s[%d] "white"set you to "yellow"VIP Level %d - %s", pName(playerid), playerid, vip, set2[rank2]);
- SendClientMessage(id, -1, str);
- format(str, sizeof(str), ""yellow"You set "white"%s[%d] to "yellow"VIP Level %d - %s", pName(id), id, vip, set2[rank2]);
- SendClientMessage(playerid, -1, str);
- }
- else if(pInfo[id][Vip] == 3)
- {
- format(str, sizeof(str), "Congratulations!, "yellow"RCON %s[%d] "white"set you to "yellow"VIP Level %d - %s", pName(playerid), playerid, vip, set2[rank3]);
- SendClientMessage(id, -1, str);
- format(str, sizeof(str), ""yellow"You set "white"%s[%d] to "yellow"VIP Level %d - %s", pName(id), id, vip, set2[rank3]);
- SendClientMessage(playerid, -1, str);
- }
- SendCommands(playerid, "/setvip");
- return 1;
- }
- YCMD:makehelper(playerid, params[], help)
- {
- #pragma unused help
- new str[128], id;
- if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_ORANGE, "Invalid: You're not allowed to use this command!");
- if(sscanf(params, "u", id)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /makehelper [playerid]");
- if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_RED, Error_Connected);
- pInfo[id][Helper] = 1;
- format(str, sizeof(str), "Congratulations!, "yellow"RCON %s[%d] "white"set you to become "yellow"Helper", pName(playerid), playerid);
- SendClientMessage(id, -1, str);
- format(str, sizeof(str), ""yellow"You set "white"%s[%d] to become "yellow"Helper", pName(id), id);
- SendClientMessage(playerid, -1, str);
- GameTextForPlayer(id, "~g~Promoted", 3000, 3);
- SendCommands(playerid, "/makehelper");
- return 1;
- }
- YCMD:demotehelper(playerid, params[], help)
- {
- #pragma unused help
- new str[128], id;
- if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_ORANGE, "Invalid: You're not allowed to use this command!");
- if(sscanf(params, "u", id)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /demotehelper [playerid]");
- if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_RED, Error_Connected);
- pInfo[id][Helper] = 0;
- format(str, sizeof(str), "Congratulations!, "yellow"RCON %s[%d] "white"demote you from your "yellow"Helper Rank", pName(playerid), playerid);
- SendClientMessage(id, -1, str);
- format(str, sizeof(str), ""yellow"You set "white"%s[%d] demote you from your "yellow"Helper Rank", pName(id), id);
- SendClientMessage(playerid, -1, str);
- GameTextForPlayer(id, "~r~Demoted", 3000, 3);
- SendCommands(playerid, "/demotehelper");
- return 1;
- }
- YCMD:startquestion(playerid, params[], help)
- {
- #pragma unused help
- new str[128];
- if(set2[typeq] == 0) return SendClientMessage(playerid, COLOR_ORANGE, "Invalid: This command is disabled by Dynamic Box Package!");
- if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_ORANGE, "Invalid: You're not allowed to use this command!");
- if(Starts == true) return SendClientMessage(playerid, COLOR_ORANGE, "ERROR: There is current contest starting, Please wait...");
- if(sscanf(params, "p<,>s[128]s[128]", question, targetanswer)) return SendClientMessage(playerid, COLOR_YELLOW, "USAGE: /startquestion [question] [answer]");
- format(str, sizeof(str), "QUESTION: '%s', First who answer it gets '$%d + %d score'", question, set2[prize], set2[prizescore]);
- SendClientMessageToAll(COLOR_YELLOW, str);
- SendClientMessageToAll(-1, "QUESTION: You only have 30 seconds to answer it");
- SendClientMessage(playerid, -1, "Question has been started, The question timer will end about 30 seconds");
- Starts = true;
- TypeGame = 0;
- Timer = SetTimer("KillTest", set2[questiontime], false);
- return 1;
- }
- YCMD:starttype(playerid, params[], help)
- {
- #pragma unused help
- new str[128];
- if(set2[typeq] == 0) return SendClientMessage(playerid, COLOR_ORANGE, "Invalid: This command is disabled by Dynamic Box Package!");
- if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_ORANGE, "Invalid: You're not allowed to use this command!");
- if(Starts == true) return SendClientMessage(playerid, COLOR_ORANGE, "ERROR: There is current contest starting, Please wait...");
- if(sscanf(params, "s[128]", targetword)) return SendClientMessage(playerid, COLOR_YELLOW, "USAGE: /starttype [word]");
- format(str, sizeof(str), "REACTION: First who types '%s', gets '$%d + %d score'", targetword, set2[prize], set2[prizescore]);
- SendClientMessageToAll(COLOR_YELLOW, str);
- SendClientMessageToAll(-1, "QUESTION: You only have 30 seconds to answer it");
- SendClientMessage(playerid, -1, "Question has been started, The type timer will end about 30 seconds");
- Starts = true;
- TypeGame = 1;
- Timer = SetTimer("KillTest", set2[typetime], false);
- return 1;
- }
- YCMD:dsettings(playerid, params[], help)
- {
- #pragma unused help
- new str[956];
- if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_ORANGE, "Invalid: You're not allowed to use this command!");
- format(str, sizeof(str), "We got A-Spam/Forbid Word [On/Off]\nTyping-Question Test [On/Off]\nRomVip [On/Off]");
- ShowPlayerDialog(playerid, dbox, DIALOG_STYLE_LIST, "{FFFFFF}Configuration for Dynamic Box", str, "Edit", "Close");
- return 1;
- }
- //==============================================================================
- public loadfiles(name[], value[])
- {
- INI_Int("TypeQuestion", set2[typeq]);
- INI_Int("SystemSpam", set2[wgasfw]);
- INI_Int("ASpam", set2[spam]);
- INI_Int("SpamWarn", set2[swarn]);
- INI_Int("SpamWait", set2[sms]);
- INI_Int("ForbidWord", set2[forbidword]);
- INI_Int("QuestionMs", set2[questiontime]);
- INI_Int("TypingMs", set2[typetime]);
- INI_Int("PrizeMoney", set2[prize]);
- INI_Int("PrizeScore", set2[prizescore]);
- INI_String("Rank1", set2[rank1], 100);
- INI_String("Rank2", set2[rank2], 100);
- INI_String("Rank3", set2[rank3], 100);
- INI_String("ChatSymbol", set2[symbolchat], 5);
- INI_Int("ReadCmd", set2[readcmd]);
- return 1;
- }
- stock SaveSettings()
- {
- new file[256];
- format(file, sizeof(file), "%s/%s", ConfigPath, SettingsSpam);
- new INI:File = INI_Open(file);
- INI_SetTag(File, "Settings");
- INI_WriteInt(File, "TypeQuestion", set2[typeq]);
- INI_WriteInt(File, "SystemSpam", set2[wgasfw]);
- INI_WriteInt(File, "ASpam", set2[spam]);
- INI_WriteInt(File, "SpamWarn", set2[swarn]);
- INI_WriteInt(File, "SpamWait", set2[sms]);
- INI_WriteInt(File, "ForbidWord", set2[forbidword]);
- INI_WriteInt(File, "QuestionMs", set2[questiontime]);
- INI_WriteInt(File, "TypingMs", set2[typetime]);
- INI_WriteInt(File, "PrizeMoney", set2[prize]);
- INI_WriteInt(File, "PrizeScore", set2[prizescore]);
- INI_WriteInt(File, "ReadCmd", set2[readcmd]);
- INI_Close(File);
- print("[FS]: Now saving the config base on the store results from the variables");
- return 1;
- }
- stock LoadSettings()
- {
- new file[256], File:file2, file3[256], string[100],
- File:file4;
- format(file, sizeof(file), ConfigPath);
- word = 0;
- format(file3, sizeof(file3), "%s/%s", ConfigPath, SettingsSpam);
- if(!fexist(file3))
- {
- print("[FS]: You don't have the configuration, We created it automatically for you");
- print("[FS]: Note the config that we created are in default mode");
- set2[spam] = 1;
- set2[forbidword] = 1;
- set2[swarn] = 3;
- set2[sms] = 4000;
- set2[typetime] = 1000*30;
- set2[questiontime] = 1000*30;
- set2[prize] = 1000;
- set2[prizescore] = 5;
- set2[wgasfw] = 1;
- set2[typeq] = 1;
- set2[readcmd] = 1;
- new INI:File = INI_Open(file3);
- INI_SetTag(File, "Settings");
- INI_WriteInt(File, "TypeQuestion", set2[typeq]);
- INI_WriteInt(File, "SystemSpam", set2[wgasfw]);
- INI_WriteInt(File, "ASpam", set2[spam]);
- INI_WriteInt(File, "SpamWarn", set2[swarn]);
- INI_WriteInt(File, "SpamWait", set2[sms]);
- INI_WriteInt(File, "ForbidWord", set2[forbidword]);
- INI_WriteInt(File, "QuestionMs", set2[questiontime]);
- INI_WriteInt(File, "TypingMs", set2[typetime]);
- INI_WriteInt(File, "PrizeMoney", set2[prize]);
- INI_WriteInt(File, "PrizeScore", set2[prizescore]);
- INI_WriteString(File, "Rank1", "Silver VIP");
- INI_WriteString(File, "Rank2", "Gold VIP");
- INI_WriteString(File, "Rank3", "Premium VIP");
- INI_WriteString(File, "ChatSymbol", "!");
- INI_WriteInt(File, "ReadCmd", set2[readcmd]);
- INI_Close(File);
- format(file3, sizeof(file3), "%s/%s", ConfigPath, SettingsWords);
- file4 = fopen(file3, io_append);
- fwrite(file4, " ");
- fclose(file4);
- }
- else if(fexist(file3))
- {
- format(file3, sizeof(file3), "%s/%s", ConfigPath, SettingsSpam);
- INI_ParseFile(file3, "loadfiles", .bExtra = false);
- print("[FS]: Configuration loaded from the files");
- print("[FS]: Y_INI INI_ParseFile called!");
- }
- format(file3, sizeof(file3), "%s/%s", ConfigPath, SettingsWords);
- if((file2 = fopen(file3, io_read)))
- {
- while(fread(file2, string))
- {
- for(new i = 0, j = strlen(string); i < j; i++) if(string[i] == '\n' || string[i] == '\r') string[i] = '\0';
- ForbiddenWords[word] = string;
- word++;
- }
- fclose(file2);
- printf("[FS]: %i Forbidden Words - Stored in our folder database", word);
- }
- return 1;
- }
- //==============================================================================
- stock ConnectedPlayers()
- {
- new Connected;
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- Connected++;
- }
- return Connected;
- }
- stock StartSpectate(playerid, specplayerid)
- {
- GetPlayerPos(playerid, SpecX[playerid], SpecY[playerid], SpecZ[playerid]);
- Inter[playerid] = GetPlayerInterior(playerid);
- vWorld[playerid] = GetPlayerVirtualWorld(playerid);
- for(new x = 0; x < MAX_PLAYERS; x++)
- {
- if(GetPlayerState(x) == PLAYER_STATE_SPECTATING && spectatorid[x] == playerid)
- {
- AdvanceSpectate(x);
- }
- }
- SetPlayerInterior(playerid, GetPlayerInterior(specplayerid));
- TogglePlayerSpectating(playerid, 1);
- if(IsPlayerInAnyVehicle(specplayerid))
- {
- PlayerSpectateVehicle(playerid, GetPlayerVehicleID(specplayerid));
- IsSpecing[playerid] = 1;
- IsBeingSpeced[specplayerid] = 1;
- spectatorid[playerid] = specplayerid;
- PlayerSpectateVehicle(playerid,GetPlayerVehicleID(specplayerid));
- }
- else
- {
- PlayerSpectatePlayer(playerid, specplayerid);
- IsSpecing[playerid] = 1;
- IsBeingSpeced[specplayerid] = 1;
- spectatorid[playerid] = specplayerid;
- }
- return 1;
- }
- stock StopSpectate(playerid)
- {
- TogglePlayerSpectating(playerid, 0);
- spectatorid[playerid] = INVALID_PLAYER_ID;
- GameTextForPlayer(playerid,"~n~~n~~n~~n~~n~~n~~n~~w~~g~Spectate ~w~mode ~r~Ended", 3000,3);
- return 1;
- }
- stock AdvanceSpectate(playerid)
- {
- if(ConnectedPlayers() == 2) { StopSpectate(playerid); return 1; }
- if(GetPlayerState(playerid) == PLAYER_STATE_SPECTATING && spectatorid[playerid] != INVALID_PLAYER_ID)
- {
- for(new x=spectatorid[playerid]+1; x<=MAX_PLAYERS; x++)
- {
- if(x == MAX_PLAYERS) x = 0;
- if(IsPlayerConnected(x) && x != playerid)
- {
- if(GetPlayerState(x) == PLAYER_STATE_SPECTATING && spectatorid[x] != INVALID_PLAYER_ID || (GetPlayerState(x) != 1 && GetPlayerState(x) != 2 && GetPlayerState(x) != 3))
- {
- continue;
- }
- else
- {
- StartSpectate(playerid, x);
- break;
- }
- }
- }
- }
- return 1;
- }
- stock ReverseSpectate(playerid)
- {
- if(ConnectedPlayers() == 2) { StopSpectate(playerid); return 1; }
- if(GetPlayerState(playerid) == PLAYER_STATE_SPECTATING && spectatorid[playerid] != INVALID_PLAYER_ID)
- {
- for(new x=spectatorid[playerid]-1; x>=0; x--)
- {
- if(x == 0) x = MAX_PLAYERS;
- if(IsPlayerConnected(x) && x != playerid)
- {
- if(GetPlayerState(x) == PLAYER_STATE_SPECTATING && spectatorid[x] != INVALID_PLAYER_ID || (GetPlayerState(x) != 1 && GetPlayerState(x) != 2 && GetPlayerState(x) != 3))
- {
- continue;
- }
- else
- {
- StartSpectate(playerid, x);
- break;
- }
- }
- }
- }
- return 1;
- }
- stock SendMsgToHelpers(const string[], color)
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(pInfo[i][Helper] == 1)
- {
- SendClientMessage(i, color, string);
- }
- }
- }
- return 1;
- }
- stock SendCommands(playerid, const cmd[])
- {
- new str[128];
- if(set2[readcmd] == 1)
- {
- format(str, sizeof(str), "VCMD: %s[%d] has used the command '%s'", pName(playerid), playerid, cmd);
- SendMsgToVips(str, COLOR_BLUE);
- }
- return 1;
- }
- stock cmd()
- {
- new
- cmdBuffer[32],
- commandCount;
- for(new it = 0; it < Scripting_GetPublicsCount(); it++)
- {
- Scripting_GetPublic(it, cmdBuffer);
- if(!strcmp(cmdBuffer, "@yC_", false, 4))
- {
- commandCount++;
- }
- }
- return commandCount;
- }
- stock SendMsgToVips(const string[], color)
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(pInfo[i][Vip] >= 1)
- {
- SendClientMessage(i, color, string);
- }
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement