Advertisement
EOussama

EO_VIP v1.7

Jul 10th, 2017
359
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 60.25 KB | None | 0 0
  1. /*=======================================================================================================================================================
  2. ==========================================================================================================================================================
  3.  
  4.  
  5.  
  6.                                                             oooooooooooo   .oooooo.
  7.                                                             `888'     `8  d8P'  `Y8b
  8.                                                              888         888      888
  9.                                                              888oooo8    888      888
  10.                                                              888    "    888      888
  11.                                                              888       o `88b    d88'
  12.                                                             o888ooooood8  `Y8bood8P'
  13.  
  14.                                                              VIP SYSTEM Filterscript
  15.                                                             by Oussama .aka. Compton
  16.  
  17.  
  18.  
  19. NOTE: If you're going to use this filterscript, please keep the credits!
  20.  
  21. ============================================================================================================================================================
  22. ==========================================================================================================================================================*/
  23.  
  24. #define PRESSED(%0) (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
  25.  
  26. //**Colors----------------------------------------------------------------------------------------------------------------------------------
  27. #define VIPCOLOR_WHITE      0xFFFFFFFF
  28. #define VIPCOLOR_RED        0xF22222AA
  29. #define VIPCOLOR_BLUE       0x1C80EBAA
  30. #define VIPCOLOR_GREEN      0x36C936AA
  31. #define VIPCOLOR_YELLOW     0xF7F70FAA
  32. #define VIPCOLOR_ORANGE     0xF09A1AAA
  33.  
  34. #define VIPCOL_WHITE        "{FFFFFF}"
  35. #define VIPCOL_RED          "{F22222}"
  36. #define VIPCOL_BLUE         "{1C80EB}"
  37. #define VIPCOL_GREEN        "{36C936}"
  38. #define VIPCOL_YELLOW       "{F7F70F}"
  39. #define VIPCOL_ORANGE       "{F09A1A}"
  40.  
  41. //**Includes---------------------------------------------------------------------------------------------------------------------------------
  42. #include <a_samp>                   // by SA_MP team
  43. #include <a_mysql>                  // by BlueG                 >   github.com/pBlueG/SA-MP-MySQL/releases/tag/R41-2
  44. #include <streamer>                 // by incognito             >   github.com/samp-incognito/samp-streamer-plugin/releases/tag/v2.9.1
  45. #include <sscanf2>                  // by Y_Less                >   github.com/maddinat0r/sscanf/releases/tag/v2.8.2
  46. #include <iZCMD>                    // by Zeex and Yashas       >   github.com/YashasSamaga/I-ZCMD
  47. #include <foreach>                  // by Y_Less and Kar        >   github.com/karimcambridge/SAMP-foreach
  48. #include <YSI\y_timers>             // by Y_Less and Misiur     >   github.com/Misiur/YSI
  49. #include <eovip>                    // by Oussama
  50.  
  51. //**MySQL Connection------------------------------------------------------------------------------------------------------------------------
  52. #define MySQL_HOST "127.0.0.1"
  53. #define MySQL_USER "root"
  54. #define MySQL_PASS ""
  55. #define MySQL_DATABASE "eo_vipdb"
  56.  
  57. //**Global Variables------------------------------------------------------------------------------------------------------------------------
  58. new
  59.     MySQL:g_SQL,
  60.  
  61.     gPlayerBone[18][] = {
  62.         "Spine",
  63.         "Head",
  64.         "Left upper arm",
  65.         "Right upper arm",
  66.         "Left hand",
  67.         "Right hand",
  68.         "Left thigh",
  69.         "Right thigh",
  70.         "Left foot",
  71.         "Right foot",
  72.         "Right calf",
  73.         "Left calf",
  74.         "Left forearm",
  75.         "Right forearm",
  76.         "Left clavicle",
  77.         "Right clavicle",
  78.         "Neck",
  79.         "Jaw"
  80.     }
  81.  
  82. ;
  83.  
  84.  
  85. //**DIALOGs---------------------------------------------------------------------------------------------------------------------------------
  86. #define DIALOG_MSG                  5000
  87. #define DIALOG_VIPBASESPAWN         5001
  88. #define DIALOG_VIPSKINS             5002
  89. #define DIALOG_VIPGPPRESETCREATE    5003
  90. #define DIALOG_VIPGPPRESETEDIT      5004
  91. #define DIALOG_TOYSINDEX            5005
  92. #define DIALOG_PRESETGUNLIST        5006
  93. #define DIALOG_GUNLISTMELEE         5007
  94. #define DIALOG_GUNLISTPISTOL        5008
  95. #define DIALOG_GUNLISTSHOTGUN       5009
  96. #define DIALOG_GUNLISTSUBMACHINE    5010
  97. #define DIALOG_GUNLISTASSAULT       5011
  98. #define DIALOG_GUNLISTRIFLE         5012
  99. #define DIALOG_VIPGPPRESETDELETE    5013
  100.  
  101.    
  102. //**Forwards--------------------------------------------------------------------------------------------------------------------------------
  103. forward OnVIPAccountCheck(playerid);
  104.  
  105.  
  106. //**Functions-------------------------------------------------------------------------------------------------------------------------------
  107. GetPlayerNameEx(playerid)
  108. {
  109.     new
  110.         pName[MAX_PLAYER_NAME];
  111.  
  112.     GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
  113.     return pName;
  114. }
  115.  
  116.  
  117. //VIP RANDOM MSG----------------------------------------------------------------------------------------------------------------------------
  118. new VIPTips[][] = {
  119.     "[EO_VIP TIP]: "VIPCOL_YELLOW"Use "VIPCOL_WHITE"/vipcmds "VIPCOL_WHITE"to check few useful VIP Commands.",
  120.     "[EO_VIP TIP]: "VIPCOL_YELLOW"Stay updated with your VIP Level information via "VIPCOL_WHITE"/viphelp .",
  121.     "[EO_VIP TIP]: "VIPCOL_YELLOW"Check your VIP Level stats via "VIPCOL_WHITE"/vipaccount .",
  122.     "[EO_VIP TIP]: "VIPCOL_YELLOW"Use "VIPCOL_WHITE"/vipbs "VIPCOL_WHITE"to enable/disable spawning in VIP Base."
  123. };
  124.  
  125.  
  126.  
  127. #define FILTERSCRIPT
  128.  
  129. #if defined FILTERSCRIPT
  130.  
  131. public OnFilterScriptInit()
  132. {
  133.     new MySQLOpt:sqlOption = mysql_init_options(), _query[800];
  134.  
  135.     //MySQL Connection
  136.     g_SQL = mysql_connect(MySQL_HOST, MySQL_USER, MySQL_PASS, MySQL_DATABASE);
  137.     if(mysql_errno(g_SQL) == 0 && g_SQL){
  138.  
  139.         printf("[MySQL]: Connection to "#MySQL_DATABASE" was successful!");
  140.         mysql_set_option(sqlOption, AUTO_RECONNECT, true);
  141.         mysql_log(ALL);
  142.  
  143.         _query = "CREATE TABLE IF NOT EXISTS `VIPs`(`ID` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,\
  144.             `Username` VARCHAR(24) NOT NULL,\
  145.             `VIPLevel` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,\
  146.             `Timestamp` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\
  147.             `SpawnInBase` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,\
  148.             `WeaponPreset` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,";
  149.         strcat(_query, "`WeaponMeleeSlot` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,\
  150.             `WeaponPistolSlot` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,\
  151.             `WeaponShotgunSlot` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,\
  152.             `WeaponSubMachineSlot` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,\
  153.             `WeaponAssaultSlot` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,\
  154.             `WeaponRifleSlot` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0)");
  155.        
  156.         mysql_tquery(g_SQL, _query);
  157.  
  158.         print("\n--------------------------------------");
  159.         print(" [EO] VIP system by Oussama .a.k.a Compton");
  160.         print(" Filterscript version: 1.7");
  161.         print(" Credits must be included");
  162.         print("--------------------------------------\n");
  163.  
  164.         SetGameModeText("[EO] VIP System by Oussama a.k.a Compton");
  165.  
  166.         //VIP Lounge Map
  167.         CreateVIPBase();
  168.  
  169.         //VIP vehicles
  170.         CreateVIPVehicles();
  171.  
  172.     }
  173.     else{
  174.  
  175.         printf("[MySQL]: Connection to "#MySQL_DATABASE" failed!");
  176.         SendRconCommand("unloadfs EOVIP");
  177.  
  178.     }
  179.  
  180.     return 1;
  181. }
  182.  
  183. public OnFilterScriptExit()
  184. {
  185.     printf("[MySQL]: Connection to "#MySQL_DATABASE" was terminated!");
  186.     SendRconCommand("unloadfs EO_VIP");
  187.     mysql_close(g_SQL);
  188.     return 1;
  189. }
  190.  
  191. #endif
  192.  
  193.  
  194. public OnPlayerConnect(playerid)
  195. {
  196.     new _query[77];
  197.     SetGameModeText("[EO VIP]: {FF00CC}VIP System by "VIPCOL_YELLOW"Oussama");
  198.  
  199.     mysql_format(g_SQL, _query, sizeof(_query), "SELECT * FROM `VIPs` WHERE `Username` = '%e' LIMIT 1", GetPlayerNameEx(playerid));
  200.     mysql_tquery(g_SQL, _query, "OnVIPAccountCheck", "d", playerid);
  201.  
  202.     return 1;
  203. }
  204.  
  205. public OnVIPAccountCheck(playerid){
  206.  
  207.     if(cache_num_rows()){
  208.         new _vip_level;
  209.  
  210.         cache_get_value_name_int(0, "VIPLevel", _vip_level);
  211.         cache_get_value_name_int(0, "SpawnInBase", VIPInfo[playerid][e_VIPBaseSpawn]);
  212.         cache_get_value_name_int(0, "WeaponPreset", VIPInfo[playerid][e_VIPGunPackPreset]);
  213.         cache_get_value_name_int(0, "WeaponMeleeSlot", VIPInfo[playerid][e_VIPGPMelee]);
  214.         cache_get_value_name_int(0, "WeaponPistolSlot", VIPInfo[playerid][e_VIPGPPistol]);
  215.         cache_get_value_name_int(0, "WeaponShotgunSlot", VIPInfo[playerid][e_VIPGPShotgun]);
  216.         cache_get_value_name_int(0, "WeaponSubMachineSlot", VIPInfo[playerid][e_VIPGPSubMachine]);
  217.         cache_get_value_name_int(0, "WeaponAssaultSlot", VIPInfo[playerid][e_VIPGPAssault]);
  218.         cache_get_value_name_int(0, "WeaponRifleSlot", VIPInfo[playerid][e_VIPGPRifle]);
  219.  
  220.         SetPlayerVIPLevel(playerid, _vip_level);
  221.         VIPInfo[playerid][e_VIPGunPackCoolDown] = 0;
  222.         VIPInfo[playerid][e_VIPBaseTeleportCoolDown] = 0;
  223.         VIPInfo[playerid][e_VIPFirstSpawn] = true;
  224.  
  225.     }
  226.     else{
  227.         new _query[69];
  228.  
  229.         mysql_format(g_SQL, _query, sizeof(_query), "INSERT INTO `VIPs` (`Username`) VALUES('%e')", GetPlayerNameEx(playerid));
  230.         mysql_tquery(g_SQL, _query);
  231.     }
  232. }
  233.  
  234. public OnPlayerDisconnect(playerid, reason)
  235. {
  236.     new _query[300];
  237.  
  238.     DestroyDynamic3DTextLabel(VIPInfo[playerid][e_VIPTagID]);
  239.  
  240.     mysql_format(g_SQL, _query, sizeof(_query), "UPDATE `VIPs` SET \
  241.         `VIPLevel` = %d, \
  242.         `SpawnInBase` = %d, \
  243.         `WeaponPreset` = %d, \
  244.         `WeaponMeleeSlot` = %d, \
  245.         `WeaponPistolSlot` = %d, \
  246.         `WeaponShotgunSlot` = %d, \
  247.         `WeaponSubMachineSlot` = %d, \
  248.         `WeaponAssaultSlot` = %d, \
  249.         `WeaponRifleSlot` = %d WHERE `Username` = '%e'",
  250.         GetPlayerVIPLevel(playerid),
  251.         VIPInfo[playerid][e_VIPBaseSpawn],
  252.         VIPInfo[playerid][e_VIPGunPackPreset],
  253.         VIPInfo[playerid][e_VIPGPMelee],
  254.         VIPInfo[playerid][e_VIPGPPistol],
  255.         VIPInfo[playerid][e_VIPGPShotgun],
  256.         VIPInfo[playerid][e_VIPGPSubMachine],
  257.         VIPInfo[playerid][e_VIPGPAssault],
  258.         VIPInfo[playerid][e_VIPGPRifle],
  259.         GetPlayerNameEx(playerid));
  260.     mysql_tquery(g_SQL, _query);
  261.  
  262.     //Stats reset
  263.     SetPlayerVIPLevel(playerid, 0);
  264.     VIPInfo[playerid][e_VIPBaseSpawn] = false;
  265.     VIPInfo[playerid][e_VIPGunPackPreset] = false;
  266.     VIPInfo[playerid][e_VIPGPMelee] = -1;
  267.     VIPInfo[playerid][e_VIPGPPistol] = -1;
  268.     VIPInfo[playerid][e_VIPGPShotgun] = -1;
  269.     VIPInfo[playerid][e_VIPGPSubMachine] = -1;
  270.     VIPInfo[playerid][e_VIPGPAssault] = -1;
  271.     VIPInfo[playerid][e_VIPGPRifle] = -1;
  272.     VIPInfo[playerid][e_VIPFirstSpawn] = false;
  273.     VIPInfo[playerid][e_IsVIPInLounge] = false;
  274.  
  275.     return 1;
  276. }
  277.  
  278. public OnPlayerSpawn(playerid)
  279. {
  280.     new str[128];
  281.     if(IsPlayerVIP(playerid)){
  282.         if(VIPInfo[playerid][e_VIPFirstSpawn]){
  283.             format(str, sizeof(str), "Welcome "VIPCOL_WHITE"%s "VIPCOL_YELLOW", your VIP level is "VIPCOL_WHITE"%i "VIPCOL_YELLOW"|| account type: "VIPCOL_WHITE"%s", GetPlayerNameEx(playerid), GetPlayerVIPLevel(playerid), GetPlayerVIPName(playerid));
  284.             SendClientMessage(playerid, VIPCOLOR_YELLOW, str);
  285.             SendClientMessage(playerid, VIPCOLOR_ORANGE, "[EO_VIP]: "VIPCOL_YELLOW"Use "VIPCOL_WHITE"/vipcmds "VIPCOL_YELLOW"to display a useful collection of VIP commands, for information help use "VIPCOL_WHITE"/viphelp");
  286.             VIPInfo[playerid][e_VIPFirstSpawn] = false;
  287.         }
  288.    
  289.         if(GetPlayerVIPLevel(playerid) == EOVIP_VIPLEVEL_3){
  290.             SendClientMessage(playerid, VIPCOLOR_ORANGE, "[EO_VIP]: "VIPCOL_YELLOW"Your Armour has been set to "VIPCOL_WHITE"40%\%");
  291.             SetPlayerArmour(playerid, 40);
  292.         }
  293.         else if(GetPlayerVIPLevel(playerid) == EOVIP_VIPLEVEL_4){
  294.             SendClientMessage(playerid, VIPCOLOR_ORANGE, "[EO_VIP]: "VIPCOL_YELLOW"Your Armour has been set to "VIPCOL_WHITE"90%\%");
  295.             SetPlayerArmour(playerid, 90);
  296.         }
  297.  
  298.     }
  299.     if(VIPInfo[playerid][e_VIPBaseSpawn]){
  300.         SendClientMessage(playerid, VIPCOLOR_ORANGE, "[EO_VIP]: "VIPCOL_YELLOW"You have spawned at VIP Base, you can change this option via "VIPCOL_WHITE"/vipbs");
  301.         TogglePlayerControllable(playerid, false);
  302.         SetPlayerPos(playerid, 3049.6392,-668.2963,2.8086);
  303.         defer VIPBaseTeleportTimer(playerid);
  304.     }
  305.    
  306.     return 1;
  307. }
  308.  
  309. public OnPlayerStateChange(playerid, newstate, oldstate)
  310. {
  311.     new VehID = GetPlayerVehicleID(playerid);
  312.     if(newstate == PLAYER_STATE_DRIVER && IsVIPVehicle(VehID)) {
  313.         if(IsPlayerVIP(playerid))
  314.             SendClientMessage(playerid, VIPCOLOR_ORANGE, "[EO_VIP]: "VIPCOL_YELLOW"Welcome to VIP Vehicle");
  315.         else{
  316.             RemovePlayerFromVehicle(playerid);
  317.             SendClientMessage(playerid, VIPCOLOR_RED, "[EO_VIP]: You cannot drive a VIP vehicle!");
  318.         }
  319.  
  320.     }
  321.     return 1;
  322. }
  323.  
  324. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  325. {
  326.     if(PRESSED(KEY_NO)){
  327.         new Float:X, Float:Y, Float:Z, str[96];
  328.         GetPlayerPos(playerid, X, Y, Z);
  329.         if(IsPlayerInRangeOfPoint(playerid, 4, 3002.3396, -683.2094, 1.9951)){
  330.             if(!IsPlayerVIP(playerid)) return 0;
  331.             if(!IsVIPGateOpened()){
  332.                 if(IsDynamicObjectMoving(VIPGate[e_Gate1]))
  333.                     return SendClientMessage(playerid, VIPCOLOR_RED, "[EO_VIP]: Wait for the gate to fully close!");
  334.                 ControllVIPGate(VIPGATE_OPEN);
  335.                 SendClientMessage(playerid, VIPCOLOR_GREEN, "[EO_VIP]: VIP Base gate is opening!");
  336.             }
  337.             else{
  338.                 if(IsDynamicObjectMoving(VIPGate[e_Gate1]))
  339.                     return SendClientMessage(playerid, VIPCOLOR_RED, "[EO_VIP]: Wait for the gate to fully open!");
  340.                 ControllVIPGate(VIPGATE_CLOSE);
  341.                 SendClientMessage(playerid, VIPCOLOR_GREEN, "[EO_VIP]: VIP Base gate is closing!");
  342.             }
  343.         }
  344.  
  345.         else if(IsPlayerInRangeOfPoint(playerid, 2, 3024.9241, -692.5798, 3.3770)){
  346.  
  347.             if(!IsPlayerVIP(playerid)) return SendClientMessage(playerid, VIPCOLOR_RED, "[ERROR]: You are not a VIP, you cannot enter this lounge!");
  348.             if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, VIPCOLOR_RED, "[ERROR]: You cannot enter the lounge while being in a vehicle!");
  349.             format(str, sizeof(str), "[VIP Lounge]: "VIPCOL_YELLOW"VIP "VIPCOL_WHITE"%s"VIPCOL_YELLOW" has entered The VIP Lounge", GetPlayerNameEx(playerid));
  350.             foreach(new i : Player){
  351.                 if(IsPlayerVIP(i) && VIPInfo[i][e_IsVIPInLounge])
  352.                     SendClientMessage(i, VIPCOLOR_ORANGE, str);
  353.             }
  354.             SetPlayerInterior(playerid, 3);
  355.             SetPlayerPos(playerid, 942.171997, -16.542755, 1000.929687);
  356.             SendClientMessage(playerid, VIPCOLOR_ORANGE, "[EO_VIP]: "VIPCOL_YELLOW"press "VIPCOL_WHITE"N "VIPCOL_YELLOW"to get outside");
  357.             SendClientMessage(playerid, VIPCOLOR_ORANGE, "[EO_VIP]: "VIPCOL_YELLOW"Welcome to the VIP Lounge");
  358.             VIPInfo[playerid][e_IsVIPInLounge] = true;
  359.         }
  360.  
  361.         else if(IsPlayerInRangeOfPoint(playerid, 2, 942.1549,-16.8236,1000.9297)){
  362.  
  363.             format(str, sizeof(str), "[VIP Lounge]: "VIPCOL_ORANGE"VIP "VIPCOL_WHITE"%s "VIPCOL_ORANGE"has left The VIP Lounge", GetPlayerNameEx(playerid));
  364.             VIPInfo[playerid][e_IsVIPInLounge] = false;
  365.             foreach(new i : Player){
  366.             if(IsPlayerVIP(i) && VIPInfo[i][e_IsVIPInLounge])
  367.                 SendClientMessage(i, VIPCOLOR_ORANGE, str);
  368.             }
  369.             SetPlayerInterior(playerid, 0);
  370.             SetPlayerPos(playerid, 3024.9241, -692.5798, 3.3770);
  371.             TogglePlayerControllable(playerid, false);
  372.             SendClientMessage(playerid, VIPCOLOR_ORANGE, "[EO_VIP]: You have been temporarily frozen, please wait for the environment to lead!");
  373.             defer VIPBaseTeleportTimer(playerid);
  374.         }
  375.     }
  376.  
  377.     return 1;
  378. }
  379.  
  380. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  381. {
  382.  
  383.     switch(dialogid){
  384.  
  385.         case DIALOG_VIPSKINS:{
  386.             if(!response) return 0;
  387.             switch(listitem){
  388.                 case 0: SetPlayerSkin(playerid, 2), SendClientMessage(playerid, VIPCOLOR_ORANGE, "[EO_VIP]: "VIPCOL_YELLOW"You have changed your skin to "VIPCOL_WHITE"Maccer");
  389.                 case 1: SetPlayerSkin(playerid, 3), SendClientMessage(playerid, VIPCOLOR_ORANGE, "[EO_VIP]: "VIPCOL_YELLOW"You have changed your skin to "VIPCOL_WHITE"Andre");
  390.                 case 2: SetPlayerSkin(playerid, 12), SendClientMessage(playerid, VIPCOLOR_ORANGE, "[EO_VIP]: "VIPCOL_YELLOW"You have changed your skin to "VIPCOL_WHITE"Rich Woman");
  391.                 case 3: SetPlayerSkin(playerid, 0), SendClientMessage(playerid, VIPCOLOR_ORANGE, "[EO_VIP]: "VIPCOL_YELLOW"You have changed your skin to "VIPCOL_WHITE"CJ");
  392.                 case 4: SetPlayerSkin(playerid, 45), SendClientMessage(playerid, VIPCOLOR_ORANGE, "[EO_VIP]: "VIPCOL_YELLOW"You have changed your skin to "VIPCOL_WHITE"Stunter");
  393.                 case 5: SetPlayerSkin(playerid, 86), SendClientMessage(playerid, VIPCOLOR_ORANGE, "[EO_VIP]: "VIPCOL_YELLOW"You have changed your skin to "VIPCOL_WHITE"Ryder");
  394.                 case 6: SetPlayerSkin(playerid, 120), SendClientMessage(playerid, VIPCOLOR_ORANGE, "[EO_VIP]: "VIPCOL_YELLOW"You have changed your skin to "VIPCOL_WHITE"Triad Boss");
  395.                 case 7: SetPlayerSkin(playerid, 269), SendClientMessage(playerid, VIPCOLOR_ORANGE, "[EO_VIP]: "VIPCOL_YELLOW"You have changed your skin to "VIPCOL_WHITE"Big Smoke");
  396.                 case 8: SetPlayerSkin(playerid, 167), SendClientMessage(playerid, VIPCOLOR_ORANGE, "[EO_VIP]: "VIPCOL_YELLOW"You have changed your skin to "VIPCOL_WHITE"Cluckin' bell worker");
  397.                 case 9: SetPlayerSkin(playerid, 192), SendClientMessage(playerid, VIPCOLOR_ORANGE, "[EO_VIP]: "VIPCOL_YELLOW"You have changed your skin to "VIPCOL_WHITE"Michelle");
  398.             }
  399.         }
  400.  
  401.         case DIALOG_VIPBASESPAWN:{
  402.             if(!response) return 0;
  403.             if(!VIPInfo[playerid][e_VIPBaseSpawn]){
  404.                 VIPInfo[playerid][e_VIPBaseSpawn] = true;
  405.                 SendClientMessage(playerid, VIPCOLOR_ORANGE, "[EO_VIP]: "VIPCOL_YELLOW"Your spawn position was set to the VIP Base!");
  406.             }
  407.             else{
  408.                 VIPInfo[playerid][e_VIPBaseSpawn] = false;
  409.                 SendClientMessage(playerid, VIPCOLOR_ORANGE, "[EO_VIP]: "VIPCOL_YELLOW"You will not spawn on the VIP Base the next time!");
  410.             }
  411.         }
  412.  
  413.         case DIALOG_VIPGPPRESETCREATE:{
  414.             if(!response) return 0;
  415.             ShowPlayerDialog(playerid, DIALOG_PRESETGUNLIST, DIALOG_STYLE_LIST, "VIP Gunpack Preset - Weapon List", "Melee\nPistol\nShotgun\nSubMachine\nAssault\nRifle\nSave Gunpack Preset", "Select", "Cancel");
  416.         }
  417.         case DIALOG_PRESETGUNLIST:{
  418.             if(!response) return SendClientMessage(playerid, VIPCOLOR_BLUE, "[EO_VIP]: You have canceled Gunpack preset creation!");
  419.             switch(listitem){
  420.                 case 0: ShowPlayerDialog(playerid, DIALOG_GUNLISTMELEE, DIALOG_STYLE_LIST, "Weapon List - Melee", "Knife\nBaseball Bat\nNightStick\nDildo\nGolf Club\nShovel\nKatana", "Select", "Cancel");
  421.                 case 1: ShowPlayerDialog(playerid, DIALOG_GUNLISTPISTOL, DIALOG_STYLE_LIST, "Weapon List - Pistol", "9mm Pistol\nSilenced Pistol\nDeagle", "Select", "Cancel");
  422.                 case 2: ShowPlayerDialog(playerid, DIALOG_GUNLISTSHOTGUN, DIALOG_STYLE_LIST, "Weapon List - Shotgun", "Shotgun\nCombat Shotgun\nSwan-off Shotgun", "Select", "Cancel");
  423.                 case 3: ShowPlayerDialog(playerid, DIALOG_GUNLISTSUBMACHINE, DIALOG_STYLE_LIST, "Weapon List - SubMachine", "MP5\nTec-9\nMicro UZI", "Select", "Cancel");
  424.                 case 4: ShowPlayerDialog(playerid, DIALOG_GUNLISTASSAULT, DIALOG_STYLE_LIST, "Weapon List - Assault", "M4\nAK-47", "Select", "Cancel");
  425.                 case 5: ShowPlayerDialog(playerid, DIALOG_GUNLISTRIFLE, DIALOG_STYLE_LIST, "Weapon List - Rifle", "Country Rifle\nSniper Rifle", "Select", "Cancel");
  426.                 case 6:{
  427.                     VIPInfo[playerid][e_VIPGunPackPreset] = true;
  428.                     SendClientMessage(playerid, VIPCOLOR_ORANGE, "[EO_VIP]: "VIPCOL_YELLOW"You have saved your Gunpack preset, next time you use /vipgunpack you will spawn your Gunpack preset!");
  429.                 }
  430.             }
  431.         }
  432.  
  433.         case DIALOG_GUNLISTMELEE:{
  434.             if(!response) return ShowPlayerDialog(playerid, DIALOG_PRESETGUNLIST, DIALOG_STYLE_LIST, "VIP Gunpack Preset - Weapon List", "Melee\nPistol\nShotgun\nSubMachine\nAssault\nRifle\nSave Gunpack Preset", "Select", "Cancel");
  435.             switch(listitem){
  436.                 case 0: VIPInfo[playerid][e_VIPGPMelee] = 4, SendClientMessage(playerid, VIPCOLOR_BLUE, "[EO_VIP]: You have selected \"Knife\"");
  437.                 case 1: VIPInfo[playerid][e_VIPGPMelee] = 5, SendClientMessage(playerid, VIPCOLOR_BLUE, "[EO_VIP]: You have selected \"Baseball Bat\"");
  438.                 case 2: VIPInfo[playerid][e_VIPGPMelee] = 3, SendClientMessage(playerid, VIPCOLOR_BLUE, "[EO_VIP]: You have selected \"NightStick\"");
  439.                 case 3: VIPInfo[playerid][e_VIPGPMelee] = 10, SendClientMessage(playerid, VIPCOLOR_BLUE, "[EO_VIP]: You have selected \"Dildo\"");
  440.                 case 4: VIPInfo[playerid][e_VIPGPMelee] = 2, SendClientMessage(playerid, VIPCOLOR_BLUE, "[EO_VIP]: You have selected \"Golf Club\"");
  441.                 case 5: VIPInfo[playerid][e_VIPGPMelee] = 6, SendClientMessage(playerid, VIPCOLOR_BLUE, "[EO_VIP]: You have selected \"Shovel\"");
  442.                 case 6: VIPInfo[playerid][e_VIPGPMelee] = 8, SendClientMessage(playerid, VIPCOLOR_BLUE, "[EO_VIP]: You have selected \"Katana\"");
  443.             }
  444.             ShowPlayerDialog(playerid, DIALOG_PRESETGUNLIST, DIALOG_STYLE_LIST, "VIP Gunpack Preset - Weapon List", "Melee\nPistol\nShotgun\nSubMachine\nAssault\nRifle\nSave Gunpack Preset", "Select", "Cancel");
  445.         }
  446.  
  447.         case DIALOG_GUNLISTPISTOL:{
  448.             if(!response) return ShowPlayerDialog(playerid, DIALOG_PRESETGUNLIST, DIALOG_STYLE_LIST, "VIP Gunpack Preset - Weapon List", "Melee\nPistol\nShotgun\nSubMachine\nAssault\nRifle\nSave Gunpack Preset", "Select", "Cancel");
  449.             switch(listitem){
  450.                 case 0: VIPInfo[playerid][e_VIPGPPistol] = 22, SendClientMessage(playerid, VIPCOLOR_BLUE, "[EO_VIP]: You have selected \"9mm Pistol\"");
  451.                 case 1: VIPInfo[playerid][e_VIPGPPistol] = 23, SendClientMessage(playerid, VIPCOLOR_BLUE, "[EO_VIP]: You have selected \"Silenced Pistol\"");
  452.                 case 2: VIPInfo[playerid][e_VIPGPPistol] = 24, SendClientMessage(playerid, VIPCOLOR_BLUE, "[EO_VIP]: You have selected \"Deagle\"");
  453.  
  454.             }
  455.             ShowPlayerDialog(playerid, DIALOG_PRESETGUNLIST, DIALOG_STYLE_LIST, "VIP Gunpack Preset - Weapon List", "Melee\nPistol\nShotgun\nSubMachine\nAssault\nRifle\nSave Gunpack Preset", "Select", "Cancel");
  456.         }
  457.  
  458.         case DIALOG_GUNLISTSHOTGUN:{
  459.             if(!response) return ShowPlayerDialog(playerid, DIALOG_PRESETGUNLIST, DIALOG_STYLE_LIST, "VIP Gunpack Preset - Weapon List", "Melee\nPistol\nShotgun\nSubMachine\nAssault\nRifle\nSave Gunpack Preset", "Select", "Cancel");
  460.             switch(listitem){
  461.                 case 0: VIPInfo[playerid][e_VIPGPShotgun] = 25, SendClientMessage(playerid, VIPCOLOR_BLUE, "[EO_VIP]: You have selected \"Shotgun\"");
  462.                 case 1: VIPInfo[playerid][e_VIPGPShotgun] = 27, SendClientMessage(playerid, VIPCOLOR_BLUE, "[EO_VIP]: You have selected \"Combat Shotgun\"");
  463.                 case 2: VIPInfo[playerid][e_VIPGPShotgun] = 26, SendClientMessage(playerid, VIPCOLOR_BLUE, "[EO_VIP]: You have selected \"Swan-off Shotgun\"");
  464.  
  465.             }
  466.             ShowPlayerDialog(playerid, DIALOG_PRESETGUNLIST, DIALOG_STYLE_LIST, "VIP Gunpack Preset - Weapon List", "Melee\nPistol\nShotgun\nSubMachine\nAssault\nRifle\nSave Gunpack Preset", "Select", "Cancel");
  467.         }
  468.  
  469.         case DIALOG_GUNLISTSUBMACHINE:{
  470.             if(!response) return ShowPlayerDialog(playerid, DIALOG_PRESETGUNLIST, DIALOG_STYLE_LIST, "VIP Gunpack Preset - Weapon List", "Melee\nPistol\nShotgun\nSubMachine\nAssault\nRifle\nSave Gunpack Preset", "Select", "Cancel");
  471.             switch(listitem){
  472.                 case 0: VIPInfo[playerid][e_VIPGPSubMachine] = 29, SendClientMessage(playerid, VIPCOLOR_BLUE, "[EO_VIP]: You have selected \"MP5\"");
  473.                 case 1: VIPInfo[playerid][e_VIPGPSubMachine] = 32, SendClientMessage(playerid, VIPCOLOR_BLUE, "[EO_VIP]: You have selected \"Tec-9\"");
  474.                 case 2: VIPInfo[playerid][e_VIPGPSubMachine] = 28, SendClientMessage(playerid, VIPCOLOR_BLUE, "[EO_VIP]: You have selected \"Micro UZI\"");
  475.  
  476.             }
  477.             ShowPlayerDialog(playerid, DIALOG_PRESETGUNLIST, DIALOG_STYLE_LIST, "VIP Gunpack Preset - Weapon List", "Melee\nPistol\nShotgun\nSubMachine\nAssault\nRifle\nSave Gunpack Preset", "Select", "Cancel");
  478.         }
  479.  
  480.         case DIALOG_GUNLISTASSAULT:{
  481.             if(!response) return ShowPlayerDialog(playerid, DIALOG_PRESETGUNLIST, DIALOG_STYLE_LIST, "VIP Gunpack Preset - Weapon List", "Melee\nPistol\nShotgun\nSubMachine\nAssault\nRifle\nSave Gunpack Preset", "Select", "Cancel");
  482.             switch(listitem){
  483.                 case 0: VIPInfo[playerid][e_VIPGPAssault] = 31, SendClientMessage(playerid, VIPCOLOR_BLUE, "[EO_VIP]: You have selected \"M4\"");
  484.                 case 1: VIPInfo[playerid][e_VIPGPAssault] = 30, SendClientMessage(playerid, VIPCOLOR_BLUE, "[EO_VIP]: You have selected \"AK-47\"");
  485.  
  486.             }
  487.             ShowPlayerDialog(playerid, DIALOG_PRESETGUNLIST, DIALOG_STYLE_LIST, "VIP Gunpack Preset - Weapon List", "Melee\nPistol\nShotgun\nSubMachine\nAssault\nRifle\nSave Gunpack Preset", "Select", "Cancel");
  488.         }
  489.  
  490.         case DIALOG_GUNLISTRIFLE:{
  491.             if(!response) return ShowPlayerDialog(playerid, DIALOG_PRESETGUNLIST, DIALOG_STYLE_LIST, "VIP Gunpack Preset - Weapon List", "Melee\nPistol\nShotgun\nSubMachine\nAssault\nRifle\nSave Gunpack Preset", "Select", "Cancel");
  492.             switch(listitem){
  493.                 case 0: VIPInfo[playerid][e_VIPGPRifle] = 33, SendClientMessage(playerid, VIPCOLOR_BLUE, "[EO_VIP]: You have selected \"Country Rifle\"");
  494.                 case 1: VIPInfo[playerid][e_VIPGPRifle] = 34, SendClientMessage(playerid, VIPCOLOR_BLUE, "[EO_VIP]: You have selected \"Sniper Rifle\"");
  495.  
  496.             }
  497.             ShowPlayerDialog(playerid, DIALOG_PRESETGUNLIST, DIALOG_STYLE_LIST, "VIP Gunpack Preset - Weapon List", "Melee\nPistol\nShotgun\nSubMachine\nAssault\nRifle\nSave Gunpack Preset", "Select", "Cancel");
  498.         }
  499.  
  500.         case DIALOG_VIPGPPRESETEDIT:{
  501.             if(!response) return 0;
  502.             switch(listitem){
  503.                 case 0: ShowPlayerDialog(playerid, DIALOG_PRESETGUNLIST, DIALOG_STYLE_LIST, "VIP Gunpack Preset - Weapon List", "Melee\nPistol\nShotgun\nSubMachine\nAssault\nRifle\nSave Gunpack Preset", "Select", "Cancel");
  504.                 case 1: ShowPlayerDialog(playerid, DIALOG_VIPGPPRESETDELETE, DIALOG_STYLE_MSGBOX, "VIP Gunpack Preset", "Are you sure you want to delete your Gunpack preset?\n"VIPCOL_YELLOW"you can create another one anytime via "VIPCOL_WHITE"/vipgppreset", "Yes", "No");
  505.             }
  506.         }
  507.  
  508.         case DIALOG_VIPGPPRESETDELETE:{
  509.             if(!response) return 0;
  510.             VIPInfo[playerid][e_VIPGunPackPreset] = false;
  511.             VIPInfo[playerid][e_VIPGPMelee] = -1;
  512.             VIPInfo[playerid][e_VIPGPPistol] = -1;
  513.             VIPInfo[playerid][e_VIPGPShotgun] = -1;
  514.             VIPInfo[playerid][e_VIPGPSubMachine] = -1;
  515.             VIPInfo[playerid][e_VIPGPAssault] = -1;
  516.             VIPInfo[playerid][e_VIPGPRifle] = -1;
  517.             SendClientMessage(playerid, VIPCOLOR_BLUE, "[EO_VIP]: You have deleted your Gunpack preset!");
  518.         }
  519.     }
  520.  
  521.     return 0;
  522. }
  523.  
  524. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  525. {
  526.     new _header[54];
  527.     if(IsPlayerVIP(clickedplayerid)){
  528.         new _content[76];
  529.         format(_header, sizeof(_header), ""VIPCOL_BLUE"%s"VIPCOL_WHITE"'s VIP Info", GetPlayerNameEx(clickedplayerid));
  530.         format(_content, sizeof(_content), ""VIPCOL_WHITE"VIP Level: "VIPCOL_YELLOW"%d\n"VIPCOL_WHITE"Account Type: "VIPCOL_YELLOW"%s\n", GetPlayerVIPLevel(clickedplayerid), GetPlayerVIPName(clickedplayerid));
  531.         ShowPlayerDialog(playerid, DIALOG_MSG, DIALOG_STYLE_MSGBOX, _header, _content, "Close", "");
  532.     }
  533.     else{
  534.         format(_header, sizeof(_header), ""VIPCOL_BLUE"%s"VIPCOL_WHITE"'s VIP Info", GetPlayerNameEx(clickedplayerid));
  535.         ShowPlayerDialog(playerid, DIALOG_MSG, DIALOG_STYLE_MSGBOX, _header, ""VIPCOL_RED"This player is not a VIP", "Close", "");
  536.     }
  537.     return 1;
  538. }
  539.  
  540. //**Commands---------------------------------------------------------------------------------------------------------------------------------
  541.  
  542. //VIP Admin Commands
  543. CMD:vipcount(playerid){
  544.     if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, VIPCOLOR_RED, "[ERROR]: You are not authorized to use this command!");
  545.     new str[60];
  546.     format(str, sizeof(str), "");
  547.     mysql_tquery(g_SQL, "SELECT `ID` FROM `VIPs`");
  548.    
  549.     format(str, sizeof(str), ""VIPCOL_WHITE"There is a total of "VIPCOL_YELLOW"%d "VIPCOL_WHITE"VIPs", cache_num_rows());
  550.     ShowPlayerDialog(playerid, DIALOG_MSG, DIALOG_STYLE_MSGBOX, "VIP information", str, "Close", "");
  551.  
  552.     return 1;
  553. }
  554.  
  555. CMD:setvip(playerid, params[]) {
  556.  
  557.     if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, VIPCOLOR_RED, "[ERROR]: You are not authorized to use this command!");
  558.     new _string[128], _query[145], level, targetid;
  559.     if(sscanf(params, "ud", targetid, level)){
  560.         SendClientMessage(playerid, VIPCOLOR_GREEN, "[USAGE]: /setvip [playerid] [level]");
  561.         SendClientMessage(playerid, VIPCOLOR_GREEN, "[FUNCTION]: Set someone's VIP status");
  562.         return 1;
  563.     }
  564.     if(level < 0 || level > 4) return SendClientMessage(playerid, VIPCOLOR_RED, "[ERROR]: You have entered an invalid VIP level, Valid levels: [1-4]!");
  565.     if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, VIPCOLOR_RED, "[ERROR]: This player is not connected!");
  566.     if(level == GetPlayerVIPLevel(targetid)) return SendClientMessage(playerid, VIPCOLOR_RED, "[ERROR]: This player already has this VIP level!");
  567.  
  568.     if(GetPlayerVIPLevel(targetid) > level){       
  569.  
  570.         format(_string, sizeof(_string), "[INFO]: You have been demoted from VIP level "VIPCOL_WHITE"%d "VIPCOL_RED"to VIP level "VIPCOL_WHITE"%d!", GetPlayerVIPLevel(targetid), level);
  571.         SendClientMessage(targetid, VIPCOLOR_RED, _string);
  572.  
  573.         GameTextForPlayer(playerid, "~r~Demoted", 2000, 0);
  574.  
  575.         format(_string, sizeof(_string), "[INFO]: You have demoted %s from VIP level "VIPCOL_WHITE"%d "VIPCOL_ORANGE"to VIP level "VIPCOL_WHITE"%d!", GetPlayerNameEx(targetid), GetPlayerVIPLevel(targetid), level);
  576.         SendClientMessage(playerid, VIPCOLOR_ORANGE, _string);
  577.     }
  578.     else{
  579.  
  580.         format(_string, sizeof(_string), "[INFO]: You have been promoted from VIP level "VIPCOL_WHITE"%d "VIPCOL_YELLOW"to VIP level "VIPCOL_WHITE"%d!", GetPlayerVIPLevel(targetid), level);
  581.         SendClientMessage(targetid, VIPCOLOR_YELLOW, _string);
  582.  
  583.         GameTextForPlayer(playerid, "~g~Promoted~n~~y~Congratulations", 2000, 0);
  584.  
  585.         format(_string, sizeof(_string), "[INFO]: You have promoted %s from VIP level "VIPCOL_WHITE"%d "VIPCOL_ORANGE"to VIP level "VIPCOL_WHITE"%d!", GetPlayerNameEx(targetid), GetPlayerVIPLevel(targetid), level);
  586.         SendClientMessage(playerid, VIPCOLOR_ORANGE, _string);
  587.     }
  588.  
  589.     format(_string, sizeof(_string), "[INFO]: Administrator %s has given VIP level %d to %s", GetPlayerNameEx(playerid), level, GetPlayerNameEx(targetid));
  590.     SendClientMessageToAll(VIPCOLOR_ORANGE, _string);
  591.  
  592.     SetPlayerVIPLevel(targetid, level);
  593.  
  594.     mysql_format(g_SQL, _query, sizeof(_query), "UPDATE `VIPs` SET `VIPLevel` = %d, `Timestamp` = CURRENT_TIMESTAMP WHERE `Username` = '%e'", GetPlayerVIPLevel(playerid), GetPlayerNameEx(playerid));
  595.     mysql_tquery(g_SQL, _query);
  596.  
  597.     return 1;
  598. }
  599.  
  600.  
  601.  
  602. //vip level 0 Commands
  603. CMD:isvip(playerid, params[]){
  604.    
  605.     new tid, _header[54];
  606.     if(sscanf(params, "u", tid)){
  607.         SendClientMessage(playerid, VIPCOLOR_GREEN, "[USAGE]: /isvip [playerid]");
  608.         SendClientMessage(playerid, VIPCOLOR_GREEN, "[FUNCTION]: Check if player is a VIP");
  609.         return 1;
  610.     }
  611.     if(!IsPlayerConnected(tid)) return SendClientMessage(playerid, VIPCOLOR_RED, "[ERROR]: This player is not connected");
  612.    
  613.     if(IsPlayerVIP(tid)){
  614.         new _content[76];
  615.         format(_header, sizeof(_header), ""VIPCOL_BLUE"%s"VIPCOL_WHITE"'s VIP Info", GetPlayerNameEx(tid));
  616.         format(_content, sizeof(_content), ""VIPCOL_WHITE"VIP Level: "VIPCOL_YELLOW"%d\n"VIPCOL_WHITE"Account Type: "VIPCOL_YELLOW"%s\n", GetPlayerVIPLevel(tid), GetPlayerVIPName(tid));
  617.         ShowPlayerDialog(playerid, DIALOG_MSG, DIALOG_STYLE_MSGBOX, _header, _content, "Close", "");
  618.     }
  619.     else{
  620.         format(_header, sizeof(_header), ""VIPCOL_BLUE"%s"VIPCOL_WHITE"'s VIP Info", GetPlayerNameEx(tid));
  621.         ShowPlayerDialog(playerid, DIALOG_MSG, DIALOG_STYLE_MSGBOX, _header, ""VIPCOL_RED"This player is not a VIP", "Close", "");
  622.     }
  623.  
  624.     return 1;
  625. }
  626.  
  627. CMD:vips(playerid) {
  628.     new _header[50], _content[3000], _count;
  629.  
  630.     foreach(new i : Player){
  631.         if(IsPlayerVIP(i)){
  632.             format(_content, sizeof(_content), "%s[%s : level %d] %s\n", _content, GetPlayerVIPName(i), GetPlayerVIPLevel(i), GetPlayerNameEx(i));
  633.             _count++;
  634.         }
  635.  
  636.     }
  637.  
  638.     if(_count){
  639.         format(_header, sizeof(_header), ""VIPCOL_WHITE"VIPs Online ["VIPCOL_GREEN"%d"VIPCOL_WHITE"]", _count);
  640.         ShowPlayerDialog(playerid, DIALOG_MSG, DIALOG_STYLE_MSGBOX, _header, _content, "Close", "");
  641.     }
  642.     else{
  643.         format(_header, sizeof(_header), ""VIPCOL_WHITE"VIPs Online ["VIPCOL_GREEN"%d"VIPCOL_WHITE"]", _count);
  644.         ShowPlayerDialog(playerid, DIALOG_MSG, DIALOG_STYLE_MSGBOX, ""VIPCOL_WHITE"VIPs Online ["VIPCOL_RED"0"VIPCOL_WHITE"]", ""VIPCOL_RED"There are no VIPs online!", "Close", "");
  645.     }
  646.  
  647.     return 1;
  648. }
  649.  
  650.  
  651. //VIP Level 1 Commands
  652. CMD:vipcmds(playerid) {
  653.  
  654.  
  655.     new _content[1500], _header[32];
  656.     switch(GetPlayerVIPLevel(playerid)){
  657.  
  658.         case EOVIP_VIPLEVEL_0:{
  659.  
  660.             strcat(_content, ""VIPCOL_ORANGE"/isvip - "VIPCOL_WHITE" View if player is a VIP\n");
  661.             strcat(_content, ""VIPCOL_ORANGE"/vips - "VIPCOL_WHITE" View all online VIPs");
  662.  
  663.             strcpy(_header, "VIP Level 0 [None] Commands", sizeof(_header));
  664.         }
  665.  
  666.         case EOVIP_VIPLEVEL_1:{
  667.  
  668.             strcat(_content, ""VIPCOL_ORANGE"/isvip - "VIPCOL_WHITE" View if player is a VIP\n");
  669.             strcat(_content, ""VIPCOL_ORANGE"/vips - "VIPCOL_WHITE" View all online VIPs\n");
  670.             strcat(_content, ""VIPCOL_ORANGE"/vchat - "VIPCOL_WHITE" Chat with other VIPs\n");
  671.             strcat(_content, ""VIPCOL_ORANGE"/vipcmds - "VIPCOL_WHITE" View VIP commands\n");
  672.             strcat(_content, ""VIPCOL_ORANGE"/viphelp - "VIPCOL_WHITE" View VIP help panel\n");
  673.             strcat(_content, ""VIPCOL_ORANGE"/vipaccount - "VIPCOL_WHITE" View you're VIP account information\n");
  674.             strcat(_content, ""VIPCOL_ORANGE"/viptag - "VIPCOL_WHITE" Toggle VIP tag on you\n");
  675.             strcat(_content, ""VIPCOL_ORANGE"/vipgunpack - "VIPCOL_WHITE" Spawn VIP gun pack\n");
  676.             strcat(_content, ""VIPCOL_ORANGE"/viptoys - "VIPCOL_WHITE" Manage VIP toys\n");
  677.             strcat(_content, ""VIPCOL_ORANGE"/viptime - "VIPCOL_WHITE" Change the time\n");
  678.             strcat(_content, ""VIPCOL_ORANGE"/vipweather - "VIPCOL_WHITE" Change the weather\n");
  679.             strcat(_content, ""VIPCOL_ORANGE"/weatherids - "VIPCOL_WHITE" View weather IDs\n");
  680.             strcat(_content, ""VIPCOL_ORANGE"/vipbs - "VIPCOL_WHITE" Manage VIP bane spawn\n");
  681.             strcat(_content, ""VIPCOL_ORANGE"/vipvehflip - "VIPCOL_WHITE" Flip up your vehicle");
  682.  
  683.             strcpy(_header, "VIP Level 1 [Silver] Commands", sizeof(_header));
  684.         }
  685.         case EOVIP_VIPLEVEL_2:{
  686.  
  687.             strcat(_content, ""VIPCOL_ORANGE"/isvip - "VIPCOL_WHITE" View if player is a VIP\n");
  688.             strcat(_content, ""VIPCOL_ORANGE"/vips - "VIPCOL_WHITE" View all online VIPs\n");
  689.             strcat(_content, ""VIPCOL_ORANGE"/vchat - "VIPCOL_WHITE" Chat with other VIPs\n");
  690.             strcat(_content, ""VIPCOL_ORANGE"/vipcmds - "VIPCOL_WHITE" View VIP commands\n");
  691.             strcat(_content, ""VIPCOL_ORANGE"/viphelp - "VIPCOL_WHITE" View VIP help panel\n");
  692.             strcat(_content, ""VIPCOL_ORANGE"/vipaccount - "VIPCOL_WHITE" View you're VIP account information\n");
  693.             strcat(_content, ""VIPCOL_ORANGE"/viptag - "VIPCOL_WHITE" Toggle VIP tag on you\n");
  694.             strcat(_content, ""VIPCOL_ORANGE"/vipgunpack - "VIPCOL_WHITE" Spawn VIP gun pack\n");
  695.             strcat(_content, ""VIPCOL_ORANGE"/viptoys - "VIPCOL_WHITE" Manage VIP toys\n");
  696.             strcat(_content, ""VIPCOL_ORANGE"/viptime - "VIPCOL_WHITE" Change the time\n");
  697.             strcat(_content, ""VIPCOL_ORANGE"/vipweather - "VIPCOL_WHITE" Change the weather\n");
  698.             strcat(_content, ""VIPCOL_ORANGE"/weatherids - "VIPCOL_WHITE" View weather IDs\n");
  699.             strcat(_content, ""VIPCOL_ORANGE"/vipbs - "VIPCOL_WHITE" Manage VIP bane spawn\n");
  700.             strcat(_content, ""VIPCOL_ORANGE"/vipvehflip - "VIPCOL_WHITE" Flip up your vehicle\n");
  701.             strcat(_content, ""VIPCOL_ORANGE"/changevehcolor - "VIPCOL_WHITE" Change your vehicle's color\n");
  702.             strcat(_content, ""VIPCOL_ORANGE"/vipnos - "VIPCOL_WHITE" Add nitrous to your vehicle\n");
  703.             strcat(_content, ""VIPCOL_ORANGE"/vipenginefix - "VIPCOL_WHITE" Fix your vehicle's engine\n");
  704.             strcat(_content, ""VIPCOL_ORANGE"/vipbodyfix - "VIPCOL_WHITE" Fix your vehicle's body\n");
  705.             strcat(_content, ""VIPCOL_ORANGE"/vipbasetp - "VIPCOL_WHITE" Teleport to the VIP base");
  706.  
  707.             strcpy(_header, "VIP Level 2 [Gold] Commands", sizeof(_header));
  708.         }
  709.         case EOVIP_VIPLEVEL_3:{
  710.  
  711.             strcat(_content, ""VIPCOL_ORANGE"/isvip - "VIPCOL_WHITE" View if player is a VIP\n");
  712.             strcat(_content, ""VIPCOL_ORANGE"/vips - "VIPCOL_WHITE" View all online VIPs\n");
  713.             strcat(_content, ""VIPCOL_ORANGE"/vchat - "VIPCOL_WHITE" Chat with other VIPs\n");
  714.             strcat(_content, ""VIPCOL_ORANGE"/vipcmds - "VIPCOL_WHITE" View VIP commands\n");
  715.             strcat(_content, ""VIPCOL_ORANGE"/viphelp - "VIPCOL_WHITE" View VIP help panel\n");
  716.             strcat(_content, ""VIPCOL_ORANGE"/vipaccount - "VIPCOL_WHITE" View you're VIP account information\n");
  717.             strcat(_content, ""VIPCOL_ORANGE"/viptag - "VIPCOL_WHITE" Toggle VIP tag on you\n");
  718.             strcat(_content, ""VIPCOL_ORANGE"/vipgunpack - "VIPCOL_WHITE" Spawn VIP gun pack\n");
  719.             strcat(_content, ""VIPCOL_ORANGE"/viptoys - "VIPCOL_WHITE" Manage VIP toys\n");
  720.             strcat(_content, ""VIPCOL_ORANGE"/viptime - "VIPCOL_WHITE" Change the time\n");
  721.             strcat(_content, ""VIPCOL_ORANGE"/vipweather - "VIPCOL_WHITE" Change the weather\n");
  722.             strcat(_content, ""VIPCOL_ORANGE"/weatherids - "VIPCOL_WHITE" View weather IDs\n");
  723.             strcat(_content, ""VIPCOL_ORANGE"/vipbs - "VIPCOL_WHITE" Manage VIP bane spawn\n");
  724.             strcat(_content, ""VIPCOL_ORANGE"/vipvehflip - "VIPCOL_WHITE" Flip up your vehicle\n");
  725.             strcat(_content, ""VIPCOL_ORANGE"/changevehcolor - "VIPCOL_WHITE" Change your vehicle's color\n");
  726.             strcat(_content, ""VIPCOL_ORANGE"/vipnos - "VIPCOL_WHITE" Add nitrous to your vehicle\n");
  727.             strcat(_content, ""VIPCOL_ORANGE"/vipenginefix - "VIPCOL_WHITE" Fix your vehicle's engine\n");
  728.             strcat(_content, ""VIPCOL_ORANGE"/vipbodyfix - "VIPCOL_WHITE" Fix your vehicle's body\n");
  729.             strcat(_content, ""VIPCOL_ORANGE"/vipbasetp - "VIPCOL_WHITE" Teleport to the VIP base\n");
  730.             strcat(_content, ""VIPCOL_ORANGE"/vipgppreset - "VIPCOL_WHITE" Manage your gun pack preset\n");
  731.             strcat(_content, ""VIPCOL_ORANGE"/vipskin - "VIPCOL_WHITE" Change your skin");
  732.  
  733.             strcpy(_header, "VIP Level 3 [Diamond] Commands", sizeof(_header));
  734.         }
  735.         case EOVIP_VIPLEVEL_4:{
  736.  
  737.             strcat(_content, ""VIPCOL_ORANGE"/isvip - "VIPCOL_WHITE" View if player is a VIP\n");
  738.             strcat(_content, ""VIPCOL_ORANGE"/vips - "VIPCOL_WHITE" View all online VIPs\n");
  739.             strcat(_content, ""VIPCOL_ORANGE"/vchat - "VIPCOL_WHITE" Chat with other VIPs\n");
  740.             strcat(_content, ""VIPCOL_ORANGE"/vipcmds - "VIPCOL_WHITE" View VIP commands\n");
  741.             strcat(_content, ""VIPCOL_ORANGE"/viphelp - "VIPCOL_WHITE" View VIP help panel\n");
  742.             strcat(_content, ""VIPCOL_ORANGE"/vipaccount - "VIPCOL_WHITE" View you're VIP account information\n");
  743.             strcat(_content, ""VIPCOL_ORANGE"/viptag - "VIPCOL_WHITE" Toggle VIP tag on you\n");
  744.             strcat(_content, ""VIPCOL_ORANGE"/vipgunpack - "VIPCOL_WHITE" Spawn VIP gun pack\n");
  745.             strcat(_content, ""VIPCOL_ORANGE"/viptoys - "VIPCOL_WHITE" Manage VIP toys\n");
  746.             strcat(_content, ""VIPCOL_ORANGE"/viptime - "VIPCOL_WHITE" Change the time\n");
  747.             strcat(_content, ""VIPCOL_ORANGE"/vipweather - "VIPCOL_WHITE" Change the weather\n");
  748.             strcat(_content, ""VIPCOL_ORANGE"/weatherids - "VIPCOL_WHITE" View weather IDs\n");
  749.             strcat(_content, ""VIPCOL_ORANGE"/vipbs - "VIPCOL_WHITE" Manage VIP bane spawn\n");
  750.             strcat(_content, ""VIPCOL_ORANGE"/vipvehflip - "VIPCOL_WHITE" Flip up your vehicle\n");
  751.             strcat(_content, ""VIPCOL_ORANGE"/changevehcolor - "VIPCOL_WHITE" Change your vehicle's color\n");
  752.             strcat(_content, ""VIPCOL_ORANGE"/vipnos - "VIPCOL_WHITE" Add nitrous to your vehicle\n");
  753.             strcat(_content, ""VIPCOL_ORANGE"/vipenginefix - "VIPCOL_WHITE" Fix your vehicle's engine\n");
  754.             strcat(_content, ""VIPCOL_ORANGE"/vipbodyfix - "VIPCOL_WHITE" Fix your vehicle's body\n");
  755.             strcat(_content, ""VIPCOL_ORANGE"/vipbasetp - "VIPCOL_WHITE" Teleport to the VIP base\n");
  756.             strcat(_content, ""VIPCOL_ORANGE"/vipgppreset - "VIPCOL_WHITE" Manage your gun pack preset\n");
  757.             strcat(_content, ""VIPCOL_ORANGE"/vipskin - "VIPCOL_WHITE" Change your skin");
  758.  
  759.             strcpy(_header, "VIP Level 4 [Platinum] Commands", sizeof(_header));
  760.         }
  761.     }
  762.     ShowPlayerDialog(playerid, DIALOG_MSG, DIALOG_STYLE_LIST, _header, _content, "Close", "");
  763.    
  764.     return 1;
  765. }
  766.  
  767. CMD:vchat(playerid, params[]) {
  768.  
  769.     if(!IsPlayerVIP(playerid)) return SendClientMessage(playerid, VIPCOLOR_RED, "[ERROR]: You are not a VIP, you cannot use this command!");
  770.     if(isnull(params)){
  771.         SendClientMessage(playerid, VIPCOLOR_GREEN, "[USAGE]: /vchat [message]");
  772.         SendClientMessage(playerid, VIPCOLOR_GREEN, "[FUNCTION]: Chat with other VIPs");
  773.         return 1;
  774.     }
  775.     if(strlen(params) > 79) return SendClientMessage(playerid, VIPCOLOR_RED, "[ERROR]: Message given is too long!");
  776.     new message[128];
  777.  
  778.     format(message, sizeof(message), "[VIP CHAT][Level %d]%s: %s", GetPlayerVIPLevel(playerid), GetPlayerNameEx(playerid), params);
  779.     SendClientMessageToAllVIPs(message, VIPCOLOR_BLUE);
  780.     return 1;
  781. }
  782.  
  783. CMD:vipaccount(playerid, params[]) {
  784.     if(!IsPlayerVIP(playerid)) return SendClientMessage(playerid, VIPCOLOR_RED, "[ERROR]: You are not a VIP, you cannot use this command!");
  785.     new _content[212];
  786.  
  787.     format(_content, sizeof(_content), ""VIPCOL_WHITE"Username: "VIPCOL_YELLOW"%s\n \
  788.         "VIPCOL_WHITE"VIP Level: "VIPCOL_YELLOW"%d\n \
  789.         "VIPCOL_WHITE"Account Type: "VIPCOL_YELLOW"%s\n \
  790.         "VIPCOL_WHITE"VIP Acquired Date: "VIPCOL_YELLOW"%s\n \
  791.         "VIPCOL_WHITE"Days Left: "VIPCOL_YELLOW"%d\n \
  792.         "VIPCOL_WHITE"Spawn in VIP Base: "VIPCOL_YELLOW"%s",
  793.         GetPlayerNameEx(playerid),
  794.         GetPlayerVIPLevel(playerid),
  795.         GetPlayerVIPName(playerid));
  796.  
  797.     ShowPlayerDialog(playerid, DIALOG_MSG, DIALOG_STYLE_MSGBOX, "VIP information", _content, "Close", "");
  798.     return 1;
  799. }
  800.  
  801. CMD:viphelp(playerid, params[]) {
  802.     if(!IsPlayerVIP(playerid)) return SendClientMessage(playerid, VIPCOLOR_RED, "[ERROR]: You are not a VIP, you cannot use this command!");
  803.        
  804.     switch(GetPlayerVIPLevel(playerid)){
  805.  
  806.         case EOVIP_VIPLEVEL_1:{
  807.  
  808.             ShowPlayerDialog(playerid, DIALOG_MSG, DIALOG_STYLE_MSGBOX, "[Silver] VIP Help", "Features:\n\n* You can change up to 2 different weather types.", "Close","");
  809.         }
  810.         case EOVIP_VIPLEVEL_2:{
  811.  
  812.             ShowPlayerDialog(playerid, DIALOG_MSG, DIALOG_STYLE_MSGBOX, "[GOLD] VIP Help", "Features:\n\n* /vipgunpack Gives you 2 weapons.\n\n* You can change up to 3 different weather types.","Close","");
  813.         }
  814.         case EOVIP_VIPLEVEL_3:{
  815.  
  816.             ShowPlayerDialog(playerid, DIALOG_MSG, DIALOG_STYLE_MSGBOX, "[DIAMOND] VIP Help", "Features:\n\n* Spawn with 40% of Armour.\n\n* /vipgunpack Gives you 3 weapons.\n\n* You can change up to 4 different weather types.\n\n* You choose between 5 skin via /vipskin.","Close","");
  817.         }
  818.         case EOVIP_VIPLEVEL_4:{
  819.  
  820.             ShowPlayerDialog(playerid, DIALOG_MSG, DIALOG_STYLE_MSGBOX, "[PLATINUM] VIP Help", "Features:\n\n* Spawn with 90% of Armour.\n\n* /vipgunpack Gives you 4 weapons.\n\n* You can change up to 6 different weather types.\n\n* You choose between 10 skin via /vipskin.","Close","");
  821.         }
  822.     }
  823.  
  824.     return 1;
  825. }
  826.  
  827. CMD:viptag(playerid) {
  828.  
  829.     if(!IsPlayerVIP(playerid)) return SendClientMessage(playerid, VIPCOLOR_RED, "[ERROR]: You are not a VIP, you cannot use this command!");  
  830.     if(!IsPlayerVIPTagActive(playerid))
  831.         TogglePlayerVIPTag(playerid, true);
  832.     else
  833.         TogglePlayerVIPTag(playerid, false);
  834.  
  835.     return 1;
  836. }
  837.  
  838. CMD:vipgunpack(playerid) {
  839.     if(!IsPlayerVIP(playerid)) return SendClientMessage(playerid, VIPCOLOR_RED, "[ERROR]: You are not a VIP, you cannot use this command!");
  840.     if(gettime() - VIPInfo[playerid][e_VIPGunPackCoolDown] < 900) SendClientMessage(playerid, VIPCOLOR_RED, "[ERROR]: You have just used that command, please wait for a 15 mins");
  841.     if(!VIPInfo[playerid][e_VIPGunPackPreset]){
  842.         switch(GetPlayerVIPLevel(playerid)){
  843.  
  844.             case EOVIP_VIPLEVEL_2:{
  845.                 GivePlayerWeapon(playerid, 22, 50);
  846.                 GivePlayerWeapon(playerid, 25, 30);
  847.             }
  848.             case EOVIP_VIPLEVEL_3:{
  849.                 GivePlayerWeapon(playerid, 4, 1);
  850.                 GivePlayerWeapon(playerid, 24, 10);
  851.                 GivePlayerWeapon(playerid, 27, 50);
  852.             }
  853.             case EOVIP_VIPLEVEL_4:{
  854.                 GivePlayerWeapon(playerid, 9, 1);
  855.                 GivePlayerWeapon(playerid, 24, 25);
  856.                 GivePlayerWeapon(playerid, 26, 30);
  857.                 GivePlayerWeapon(playerid, 31, 100);
  858.             }
  859.         }
  860.         SendClientMessage(playerid, VIPCOLOR_ORANGE, "[EO_VIP]: "VIPCOL_YELLOW"VIP Weapon pack given");
  861.         SendClientMessage(playerid, VIPCOLOR_ORANGE, "[EO_VIP]: "VIPCOL_YELLOW"You have loaded the default preset of guns, you can create your customized one via "VIPCOL_WHITE"/vipgppreset");
  862.  
  863.     }
  864.     else{
  865.  
  866.         SendClientMessage(playerid, VIPCOLOR_ORANGE, "[EO_VIP]: "VIPCOL_YELLOW"You have loaded customized preset of guns, you can manage it anytime via "VIPCOL_WHITE"/vipgppreset");
  867.        
  868.         if(VIPInfo[playerid][e_VIPGPMelee] != -1)
  869.             GivePlayerWeapon(playerid, VIPInfo[playerid][e_VIPGPMelee], 1);
  870.         if(VIPInfo[playerid][e_VIPGPPistol] != -1)
  871.             GivePlayerWeapon(playerid, VIPInfo[playerid][e_VIPGPPistol], 25);
  872.         if(VIPInfo[playerid][e_VIPGPShotgun] != -1)
  873.             GivePlayerWeapon(playerid, VIPInfo[playerid][e_VIPGPShotgun], 30);
  874.         if(VIPInfo[playerid][e_VIPGPSubMachine] != -1)
  875.             GivePlayerWeapon(playerid, VIPInfo[playerid][e_VIPGPSubMachine], 40);
  876.         if(VIPInfo[playerid][e_VIPGPAssault] != -1)
  877.             GivePlayerWeapon(playerid, VIPInfo[playerid][e_VIPGPAssault], 100);
  878.         if(VIPInfo[playerid][e_VIPGPRifle] != -1)
  879.             GivePlayerWeapon(playerid, VIPInfo[playerid][e_VIPGPRifle], 15);
  880.  
  881.     }
  882.  
  883.     VIPInfo[playerid][e_VIPGunPackCoolDown] = gettime();
  884.  
  885.     return 1;
  886. }
  887.  
  888. CMD:viptoys(playerid){
  889.    
  890.     if(!IsPlayerVIP(playerid)) return SendClientMessage(playerid, VIPCOLOR_RED, "[ERROR]: You are not a VIP, you cannot use this command!");
  891.     new _content[300];
  892.    
  893.     for(new i; i<MAX_PLAYER_ATTACHED_OBJECTS; i++){
  894.         format(_content, sizeof(_content), "%s%s\t%s" ,_content, gPlayerBone[i], IsPlayerAttachedObjectSlotUsed(playerid, i) ? (""VIPCOL_RED"[USED]") : (""VIPCOL_GREEN"[EMPTY]"));
  895.     }
  896.  
  897.     //ShowPlayerDialog(playerid, DIALOG_TOYSINDEX, DIALOG_STYLE_LIST, "VIP Attachments", _content, "Select", "Cancel");
  898.     SendClientMessage(playerid, VIPCOLOR_WHITE, "* Coming soon!");
  899.  
  900.     return 1;
  901. }
  902.  
  903. CMD:viptime(playerid, params[]){
  904.    
  905.     new _hour, _minute, str[70];
  906.     if(!IsPlayerVIP(playerid)) return SendClientMessage(playerid, VIPCOLOR_RED, "[ERROR]: You are not a VIP, you cannot use this command!");
  907.     if(sscanf(params, "ii", _hour, _minute)){
  908.         SendClientMessage(playerid, VIPCOLOR_GREEN ,"[USAGE]: /viptime [Hour] [Minute]");
  909.         SendClientMessage(playerid, VIPCOLOR_GREEN ,"[FUNCTION]: Change your time");
  910.         return 1;  
  911.     }
  912.     if(_hour > 23 || _hour < 0 || _minute > 59 || _minute < 0) return SendClientMessage(playerid, VIPCOLOR_RED, "[ERROR]: You have entered an invalid hour/minute value!");
  913.    
  914.     format(str, sizeof(str), "[EO_VIP]: You have set your time to "VIPCOL_WHITE"%02d"VIPCOL_ORANGE":"VIPCOL_WHITE"%02d", _hour, _minute);
  915.     SendClientMessage(playerid, VIPCOLOR_ORANGE, str);
  916.     SetPlayerTime(playerid, _hour, _minute);
  917.  
  918.     return 1;
  919. }
  920.  
  921. CMD:vipbs(playerid){
  922.    
  923.     if(!IsPlayerVIP(playerid)) return SendClientMessage(playerid, VIPCOLOR_RED, "[ERROR]: You are not a VIP, you cannot use this command!");
  924.        
  925.     if(!VIPInfo[playerid][e_VIPBaseSpawn])
  926.         ShowPlayerDialog(playerid, DIALOG_VIPBASESPAWN, DIALOG_STYLE_MSGBOX, "VIP Base Spawn Option", "Do you want to always spawn in VIP Base?\n\nYou can change this this anytime with "VIPCOL_WHITE"/vipbs", "Yes", "No");
  927.  
  928.     else
  929.         ShowPlayerDialog(playerid, DIALOG_VIPBASESPAWN, DIALOG_STYLE_MSGBOX, "VIP Base Spawn Option", "Do you want to disable Spawning in VIP base option?\n\nYou can change this this anytime with "VIPCOL_WHITE"/vipbs", "Yes", "No");
  930.  
  931.     return 1;
  932. }
  933.  
  934. CMD:weatherids(playerid) {
  935.    
  936.     if(!IsPlayerVIP(playerid)) return SendClientMessage(playerid, VIPCOLOR_RED, "[ERROR]: You are not a VIP, you cannot use this command!");
  937.     switch(GetPlayerVIPLevel(playerid)){
  938.  
  939.         case EOVIP_VIPLEVEL_1: ShowPlayerDialog(playerid, DIALOG_MSG, DIALOG_STYLE_MSGBOX, "Weather IDs", ""VIPCOL_YELLOW"1- "VIPCOL_WHITE"Sunny\n\n"VIPCOL_YELLOW"2- "VIPCOL_WHITE"Extra Sunny Smog", "Close", "");
  940.         case EOVIP_VIPLEVEL_2: ShowPlayerDialog(playerid, DIALOG_MSG, DIALOG_STYLE_MSGBOX, "Weather IDs", ""VIPCOL_YELLOW"1- "VIPCOL_WHITE"Sunny\n\n"VIPCOL_YELLOW"2- "VIPCOL_WHITE"Extra Sunny Smog\n\n"VIPCOL_YELLOW"3- "VIPCOL_WHITE"Sunny Smog", "Close", "");
  941.         case EOVIP_VIPLEVEL_3: ShowPlayerDialog(playerid, DIALOG_MSG, DIALOG_STYLE_MSGBOX, "Weather IDs", ""VIPCOL_YELLOW"1- "VIPCOL_WHITE"Sunny\n\n"VIPCOL_YELLOW"2- "VIPCOL_WHITE"Extra Sunny Smog\n\n"VIPCOL_YELLOW"3- "VIPCOL_WHITE"Sunny Smog\n\n"VIPCOL_YELLOW"4- "VIPCOL_WHITE"Cloudy", "Close", "");
  942.         case EOVIP_VIPLEVEL_4: ShowPlayerDialog(playerid, DIALOG_MSG, DIALOG_STYLE_MSGBOX, "Weather IDs", ""VIPCOL_YELLOW"1- "VIPCOL_WHITE"Sunny\n\n"VIPCOL_YELLOW"2- "VIPCOL_WHITE"Extra Sunny Smog\n\n"VIPCOL_YELLOW"3- "VIPCOL_WHITE"Sunny Smog\n\n"VIPCOL_YELLOW"4- "VIPCOL_WHITE"Cloudy\n\n"VIPCOL_YELLOW"5- "VIPCOL_WHITE"Summer Sun\n\n"VIPCOL_YELLOW"6- "VIPCOL_WHITE"Summer Extra Sunny", "Close", "");
  943.     }
  944.  
  945.     return 1;
  946. }
  947.  
  948. CMD:vipweather(playerid, params[]) {
  949.  
  950.     new wid, str[65];
  951.     if(!IsPlayerVIP(playerid)) return SendClientMessage(playerid, VIPCOLOR_RED, "[ERROR]: You are not a VIP, you cannot use this command!");
  952.     if(sscanf(params, "i", wid)){
  953.         SendClientMessage(playerid, VIPCOLOR_GREEN ,"[USAGE]: /vipweather [Weather ID] - use /weatherids to view available weather IDs");
  954.         SendClientMessage(playerid, VIPCOLOR_GREEN ,"[FUNCTION]: Change your weather");
  955.         return 1;
  956.     }
  957.     switch(GetPlayerVIPLevel(playerid)){
  958.         case EOVIP_VIPLEVEL_1:{
  959.             if(wid > 2 || wid < 1) return SendClientMessage(playerid, VIPCOLOR_RED,"[ERROR]: You have entered an invalid weather ID, available Weather IDs are {92979C}[1-2]");
  960.             format(str, sizeof(str), "[EO_VIP]: "VIPCOL_YELLOW"You have set the weather ID to "VIPCOL_WHITE"%i", wid);
  961.             SendClientMessage(playerid, VIPCOLOR_ORANGE,str);
  962.             SetPlayerWeather(playerid, wid);
  963.         }
  964.         case EOVIP_VIPLEVEL_2:{
  965.             if(wid > 3 || wid < 1) return SendClientMessage(playerid, VIPCOLOR_RED ,"[ERROR]: You have entered an invalid weather ID, available Weather IDs are {92979C}[1-3]");
  966.             format(str, sizeof(str), "[EO_VIP]: "VIPCOL_YELLOW"You have set the weather ID to "VIPCOL_WHITE"%i", wid);
  967.             SendClientMessage(playerid, VIPCOLOR_ORANGE ,str);
  968.             SetPlayerWeather(playerid, wid);
  969.         }
  970.         case EOVIP_VIPLEVEL_3:{
  971.             if(wid > 4 || wid < 1) return SendClientMessage(playerid, VIPCOLOR_RED,"[ERROR]: You have entered an invalid weather ID, available Weather IDs are {92979C}[1-4]");
  972.             format(str, sizeof(str), "[EO_VIP]: "VIPCOL_YELLOW"You have set the weather ID to "VIPCOL_WHITE"%i", wid);
  973.             SendClientMessage(playerid, VIPCOLOR_ORANGE,str);
  974.             SetPlayerWeather(playerid, wid);
  975.         }
  976.         case EOVIP_VIPLEVEL_4:{
  977.             if(wid > 6 || wid < 1) return SendClientMessage(playerid, VIPCOLOR_RED ,"[ERROR]: You have entered an invalid weather ID, available Weather IDs are {92979C}[1-6]");
  978.             format(str, sizeof(str), "[EO_VIP]: "VIPCOL_YELLOW"You have set the weather ID to "VIPCOL_WHITE"%i", wid);
  979.             SendClientMessage(playerid, VIPCOLOR_ORANGE ,str);
  980.             SetPlayerWeather(playerid, wid);
  981.  
  982.         }
  983.     }
  984.  
  985.     return 1;
  986. }
  987.  
  988. CMD:vipvehflip(playerid) {
  989.    
  990.     if(!IsPlayerVIP(playerid)) return SendClientMessage(playerid, VIPCOLOR_RED, "[ERROR]: You are not a VIP, you cannot use this command!");
  991.     if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, VIPCOLOR_RED, "[ERROR]: You need to be in a vehicle to use this command!");
  992.    
  993.     new currentveh = GetPlayerVehicleID(playerid), Float:_angle;
  994.     GetVehicleZAngle(currentveh, _angle);
  995.     SetVehicleZAngle(currentveh, _angle);
  996.     SendClientMessage(playerid, VIPCOLOR_ORANGE, "[EO_VIP]: Your vehicle has been flipped!");
  997.  
  998.     return 1;
  999. }
  1000.  
  1001.  
  1002. //VIP Level 2 Commands
  1003. CMD:changevehcolor(playerid, params[]) {
  1004.    
  1005.     if(!IsPlayerVIP(playerid)) return SendClientMessage(playerid, VIPCOLOR_RED, "[ERROR]: You are not a VIP, you cannot use this command!");
  1006.     if(GetPlayerVIPLevel(playerid) < 2) return SendClientMessage(playerid, VIPCOLOR_RED, "[ERROR]: You need to have VIP level 2 or above to use this command!");
  1007.     new str[128], color1, color2;
  1008.     if(sscanf(params, "ii", color1, color2)){
  1009.         SendClientMessage(playerid, VIPCOLOR_GREEN, "[USAGE]: /changevehcolor [color 1] [color 2]");
  1010.         SendClientMessage(playerid, VIPCOLOR_GREEN, "[FUNCTION]: Change a vehicle's color");
  1011.         return 1;
  1012.     }
  1013.     if(color1 > 255 || color1 < 0 || color2 > 255 || color2 < 0) return SendClientMessage(playerid, VIPCOLOR_RED, "[ERROR]: You have entered an invalid Color ID!");
  1014.     if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, VIPCOLOR_RED, "[ERROR]: You need to be in a vehicle to use this command!");
  1015.    
  1016.     switch(GetPlayerVIPLevel(playerid)){
  1017.  
  1018.         case EOVIP_VIPLEVEL_2:{
  1019.             if(GetPlayerMoney(playerid) < 1000) return SendClientMessage(playerid, VIPCOLOR_RED, "[ERROR]: You can't afford changing this vehicle's color");
  1020.             GivePlayerMoney(playerid, -1000);
  1021.             format(str, sizeof(str), "[EO_VIP]: "VIPCOL_YELLOW"Vehicle color changed to ( "VIPCOL_YELLOW"%i "VIPCOL_WHITE", "VIPCOL_YELLOW"%i "VIPCOL_WHITE"), you've been charged with "VIPCOL_YELLOW"$1000", color1, color2);
  1022.             SendClientMessage(playerid, VIPCOLOR_ORANGE, str);
  1023.             ChangeVehicleColor(GetPlayerVehicleID(playerid), color1, color2);
  1024.         }
  1025.         case EOVIP_VIPLEVEL_3:{
  1026.             if(GetPlayerMoney(playerid) < 500) return SendClientMessage(playerid, VIPCOLOR_RED, "[ERROR]: You can't afford changing this vehicle's color");
  1027.             GivePlayerMoney(playerid, -500);
  1028.             format(str, sizeof(str), "[EO_VIP]: "VIPCOL_YELLOW"Vehicle color changed to ( "VIPCOL_YELLOW"%i "VIPCOL_WHITE", "VIPCOL_YELLOW"%i "VIPCOL_WHITE"), you've been charged with "VIPCOL_YELLOW"$500", color1, color2);
  1029.             SendClientMessage(playerid, VIPCOLOR_ORANGE, str);
  1030.             ChangeVehicleColor(GetPlayerVehicleID(playerid), color1, color2);
  1031.         }
  1032.         case EOVIP_VIPLEVEL_4:{
  1033.             if(GetPlayerMoney(playerid) < 250) return SendClientMessage(playerid, VIPCOLOR_RED, "[ERROR]: You can't afford changing this vehicle's color");
  1034.             GivePlayerMoney(playerid, -250);
  1035.             format(str, sizeof(str), "[EO_VIP]: "VIPCOL_YELLOW"Vehicle color changed to ( "VIPCOL_YELLOW"%i "VIPCOL_WHITE", "VIPCOL_YELLOW"%i "VIPCOL_WHITE"), you've been charged with "VIPCOL_YELLOW"$250", color1, color2);
  1036.             SendClientMessage(playerid, VIPCOLOR_ORANGE, str);
  1037.             ChangeVehicleColor(GetPlayerVehicleID(playerid), color1, color2);
  1038.         }
  1039.     }
  1040.  
  1041.     return 1;
  1042. }
  1043.  
  1044. CMD:vipnos(playerid) {
  1045.     if(!IsPlayerVIP(playerid)) return SendClientMessage(playerid, VIPCOLOR_RED, "[ERROR]: You are not a VIP, you cannot use this command!");
  1046.     if(GetPlayerVIPLevel(playerid) < 2) return SendClientMessage(playerid, VIPCOLOR_RED, "[ERROR]: You need to have VIP level 2 or above to use this command!");
  1047.     if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, VIPCOLOR_RED, "[ERROR]: You need to be in a vehicle to use this command!");  
  1048.    
  1049.     switch(GetPlayerVIPLevel(playerid)){
  1050.         case EOVIP_VIPLEVEL_2:{
  1051.             if(GetPlayerMoney(playerid) < 1000) return SendClientMessage(playerid, VIPCOLOR_RED, "[ERROR]: You can't afford to buy this");
  1052.             GivePlayerMoney(playerid, -1000);
  1053.             SendClientMessage(playerid, VIPCOLOR_ORANGE, "[ERROR]: "VIPCOL_YELLOW"You have added nitrous to this vehicle, you've been charged with "VIPCOL_WHITE"$1000");
  1054.         }
  1055.         case EOVIP_VIPLEVEL_3:{
  1056.             if(GetPlayerMoney(playerid) < 500) return SendClientMessage(playerid, VIPCOLOR_RED, "[ERROR]: You can't afford to buy this");
  1057.             GivePlayerMoney(playerid, -500);
  1058.             SendClientMessage(playerid, VIPCOLOR_ORANGE, "[EO_VIP]: "VIPCOL_YELLOW"You have added nitrous to this vehicle, you've been charged with "VIPCOL_WHITE"$500");
  1059.         }
  1060.         case EOVIP_VIPLEVEL_4:{
  1061.             if(GetPlayerMoney(playerid) < 150) return  SendClientMessage(playerid, VIPCOLOR_RED, "[ERROR]: You can't afford to buy this");
  1062.             GivePlayerMoney(playerid, -150);
  1063.             SendClientMessage(playerid, VIPCOLOR_ORANGE, "[EO_VIP]: "VIPCOL_YELLOW"You have added nitrous to this vehicle, you've been charged with "VIPCOL_WHITE"$150");
  1064.         }
  1065.     }
  1066.     AddVehicleComponent(GetPlayerVehicleID(playerid), 1010);
  1067.     PlayerPlaySound(playerid, 1133, 0.0, 0.0, 10.0);
  1068.     return 1;
  1069. }
  1070.  
  1071.  
  1072. CMD:vipenginefix(playerid){
  1073.  
  1074.     if(!IsPlayerVIP(playerid)) return SendClientMessage(playerid, VIPCOLOR_RED, "[ERROR]: You are not a VIP, you cannot use this command!");
  1075.     if(GetPlayerVIPLevel(playerid) < 2) return SendClientMessage(playerid, VIPCOLOR_RED, "[ERROR]: You need to have VIP level 2 or above to use this command!");
  1076.     if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, VIPCOLOR_RED, "[ERROR]: You need to be in a vehicle to use this command!");  
  1077.    
  1078.     switch(GetPlayerVIPLevel(playerid)){
  1079.         case EOVIP_VIPLEVEL_3:{
  1080.             if(GetPlayerMoney(playerid) < 600)
  1081.             GivePlayerMoney(playerid, -600);
  1082.             SendClientMessage(playerid, VIPCOLOR_ORANGE, "[EO_VIP]: "VIPCOL_YELLOW"vehicle fixed, you've been charged with "VIPCOL_WHITE"$600");
  1083.         }
  1084.         case EOVIP_VIPLEVEL_4:{
  1085.             if(GetPlayerMoney(playerid) < 150)
  1086.             GivePlayerMoney(playerid, -150);
  1087.             SendClientMessage(playerid, VIPCOLOR_ORANGE, "[EO_VIP]: "VIPCOL_YELLOW"vehicle fixed, you've been charged with "VIPCOL_WHITE"$150");
  1088.         }
  1089.     }
  1090.     SetVehicleHealth(GetPlayerVehicleID(playerid), 1000);
  1091.  
  1092.     return 1;
  1093. }
  1094.  
  1095. CMD:vipbodyfix(playerid) {
  1096.    
  1097.     if(!IsPlayerVIP(playerid)) return SendClientMessage(playerid, VIPCOLOR_RED, "[ERROR]: You are not a VIP, you cannot use this command!");
  1098.     if(GetPlayerVIPLevel(playerid) < 2) return SendClientMessage(playerid, VIPCOLOR_RED, "[ERROR]: You need to have VIP level 2 or above to use this command!");
  1099.     if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, VIPCOLOR_RED, "[ERROR]: You need to be in a vehicle to use this command!");
  1100.     if(GetPlayerMoney(playerid) < 450) return SendClientMessage(playerid, VIPCOLOR_RED, "[ERROR]: You can't afford this!");
  1101.  
  1102.     RepairVehicle(GetPlayerVehicleID(playerid));
  1103.     GivePlayerMoney(playerid, -450);
  1104.     SendClientMessage(playerid, VIPCOLOR_ORANGE, "[EO_VIP]: "VIPCOL_YELLOW"vehicle fixed, you've been charged with "VIPCOL_WHITE"$200");
  1105.     PlayerPlaySound(playerid, 1133, 0.0, 0.0, 10.0);
  1106.  
  1107.     return 1;
  1108. }
  1109.  
  1110. CMD:vipbasetp(playerid) {
  1111.    
  1112.     if(!IsPlayerVIP(playerid)) return SendClientMessage(playerid, VIPCOLOR_RED, "[ERROR]: You are not a VIP, you cannot use this command!");
  1113.     if(GetPlayerVIPLevel(playerid) < 2) return SendClientMessage(playerid, VIPCOLOR_RED, "[ERROR]: You need to have VIP level 2 or above to use this command!");
  1114.     if(gettime() - VIPInfo[playerid][e_VIPBaseTeleportCoolDown] < 600) return SendClientMessage(playerid, VIPCOLOR_RED, "[ERROR]: You cannot use this command now, wait for 10 minutes!");
  1115.  
  1116.     VIPInfo[playerid][e_VIPBaseTeleportCoolDown] = gettime();
  1117.     TogglePlayerControllable(playerid, false);
  1118.     SetPlayerPos(playerid, 3024.9241, -692.5798, 3.3770);
  1119.     GameTextForPlayer(playerid, "~y~VIP Base", 2000, 1);
  1120.     SendClientMessage(playerid, VIPCOLOR_ORANGE, "[EO_VIP]: You have teleported to the VIP base!");
  1121.     SendClientMessage(playerid, VIPCOLOR_ORANGE, "[EO_VIP]: You have been temporarily frozen, please wait for the environment to lead!");
  1122.     defer VIPBaseTeleportTimer(playerid);
  1123.  
  1124.     return 1;
  1125. }
  1126.  
  1127.  
  1128. //VIP Level 3 Commands
  1129. CMD:vipgppreset(playerid){
  1130.    
  1131.     if(!IsPlayerVIP(playerid)) return SendClientMessage(playerid, VIPCOLOR_RED, "[ERROR]: You are not a VIP, you cannot use this command!");
  1132.     if(GetPlayerVIPLevel(playerid) < 3) return SendClientMessage(playerid, VIPCOLOR_RED, "[ERROR]: You need to have VIP level 3 or above to use this command!");
  1133.    
  1134.     if(!VIPInfo[playerid][e_VIPGunPackPreset])
  1135.         ShowPlayerDialog(playerid, DIALOG_VIPGPPRESETCREATE, DIALOG_STYLE_MSGBOX, "VIP GunPack Preset Option", "Here you can make a new Gunpack set to spawn via "VIPCOL_WHITE"/vipgppreset\n\n"VIPCOL_YELLOW"You Don't have a GunPack Preset yet, do you want to create one?", "Yes", "No");
  1136.     else{
  1137.         ShowPlayerDialog(playerid, DIALOG_VIPGPPRESETEDIT, DIALOG_STYLE_LIST, "VIP GunPack Preset Option",
  1138.         "Edit Gunpack Preset\n\
  1139.         Delete Gunpack Preset\n",
  1140.         "Select", "Cancel");
  1141.     }
  1142.  
  1143.     return 1;
  1144. }
  1145.  
  1146. CMD:vipskin(playerid) {
  1147.  
  1148.     if(!IsPlayerVIP(playerid)) return SendClientMessage(playerid, VIPCOLOR_RED, "[ERROR]: You are not a VIP, you cannot use this command!");
  1149.     if(GetPlayerVIPLevel(playerid) < 3) return SendClientMessage(playerid, VIPCOLOR_RED, "[ERROR]: You need to have VIP level 3 or above to use this command!");
  1150.     switch(GetPlayerVIPLevel(playerid)){
  1151.  
  1152.         case EOVIP_VIPLEVEL_3:{
  1153.             ShowPlayerDialog(playerid, DIALOG_VIPSKINS, DIALOG_STYLE_LIST, "VIP SKINS SELECTION "VIPCOL_YELLOW"[DIAMOND]",
  1154.             "Maccer\n\
  1155.             Andre\n\
  1156.             Rich Woman\n\
  1157.             CJ\n\
  1158.             Stunner\n",
  1159.             "Select", "Cancel");
  1160.         }
  1161.         case EOVIP_VIPLEVEL_4:{
  1162.             ShowPlayerDialog(playerid, DIALOG_VIPSKINS, DIALOG_STYLE_LIST, "VIP SKINS SELECTION "VIPCOL_YELLOW"[PLATINUM]",
  1163.             "Maccer\n\
  1164.             Andre\n\
  1165.             Rich Woman\n\
  1166.             CJ\n\
  1167.             Stunner\n\
  1168.             Ryder\n\
  1169.             Triad Boss\n\
  1170.             Big Smoke\n\
  1171.             Cluckin' bell worker\n\
  1172.             Michelle\n",
  1173.             "Select", "Cancel");
  1174.         }
  1175.     }
  1176.  
  1177.     return 1;
  1178. }
  1179.  
  1180.  
  1181. //VIP Level 4 Commands
  1182.  
  1183.  
  1184.  
  1185. //**Timers---------------------------------------------------------------------------------------------------------------------------------
  1186. //-VIP un-Freeze
  1187. timer VIPBaseTeleportTimer[2000](playerid){
  1188.     TogglePlayerControllable(playerid, true);
  1189.     SendClientMessage(playerid, VIPCOLOR_ORANGE, "[EO_VIP]: Thanks for your patience, you can now move!");
  1190. }
  1191. //-VIP Advertisement
  1192. task VIPAdvertisementTimer[1800000](){
  1193.     foreach(new i : Player){
  1194.         if(!IsPlayerVIP(i))
  1195.             SendClientMessage(i, VIPCOLOR_GREEN, "[EO_VIP]: "VIPCOL_WHITE"Buy one of four different VIP Levels and gain countless awesome features!");
  1196.     }
  1197. }
  1198.  
  1199. //-VIP Messages
  1200. task VIPMessages[900000](){
  1201.  
  1202.     SendClientMessageToAllVIPs(VIPTips[random(sizeof(VIPTips))], -1);
  1203.  
  1204. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement