Preda

GUN GAME GAMEMODE BETA/PREDA

Aug 14th, 2012
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 39.18 KB | None | 0 0
  1. //=======INCLUDES=========//      // CREATOR: PREDA // // CREDITS MUST STAY SAME //     // M.O.A.B IS INSPIRED FROM CALL OF DUTY:MODERN WARFARE 3 //
  2. #include <a_samp>
  3. #include <YSI\y_ini>//CREDITS/DOWNLOAD LINK IN DESCRIPTION              // ! ATTENTION ! MapChange = 0 MEANS THAT MAP IS 1 ; ! ATTENTION ! MapChenge = 1 MEANS THAT MAP IS 2 ! //
  4. #include <sscanf2>//CREDITS/DOWNLOAD LINK IN DESCRIPTION
  5. #include <zcmd> //CREDITS/DOWNLOAD LINK IN DESCRIPTION
  6. //==DEFINES==//
  7. #define Path "/GunGameAccounts/%s.ini"    //=========== FOLDER WHERE ALL PLAYER's DATA ARE SAVED =============//
  8. #define COLOR_WHITE "{FFFFFF}"                          //=========== Colour Embedding =============//
  9. #define COLOR_RED "{F81414}"                            //=========== Colour Embedding =============//
  10. #define COLOR_GREEN "{00FF22}"                          //=========== Colour Embedding =============//
  11. #define COLOR_LIGHTBLUE "{00CED1}"                      //=========== Colour Embedding =============//
  12. #define DIALOG_REGISTER 1       //=========== DIALOG ID's EX: DIALOG_LOGIN IS DIALOG ID 2 ; DIALOG_REGISTER IS DIALOG ID 1 =============//
  13. #define DIALOG_LOGIN 2          //=========== Dialog DEFINING =============//
  14. #define DIALOG_SUCCESS_1 3      //=========== Dialog DEFINING =============//
  15. #define DIALOG_SUCCESS_2 4      //=========== Dialog DEFINING =============//
  16. //=========== DEFINING NUM 4 KEY FOR M.O.A.B ( CAN BE CHANGED AT END OF SCRIPT ) ===========//
  17. #define PRESSED(%0) \            
  18.     (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
  19. //=========== == ===========//
  20. //==NEW==//
  21. new Text:Kill_Streak[MAX_PLAYERS];      //=========== TOTAL KILLS MADE IN SPECIFIC ROUND [ TEXTDRAW ] =============//
  22. new kills[MAX_PLAYERS];                 //=========== TOTAL KILLS MADE IN SPECIFIC ROUND [ VARIABLE ] =============//
  23. new moab[MAX_PLAYERS];                  //=========== MOAB [ VARIABLE ] =============//
  24. new MapChange;                          //=========== MAP CHANGING SYSTEM =============//
  25.  
  26. //======TEXTDRAWS======//
  27. new Text:SpectateText;  //=========== SPECTATING AFTER DEATH [ SPECTATING KILLER ] [ TEXTDRAW ] =============//
  28. new Text:LEVEL1;        //=========== GUN_GAME_LEVEL 1 [ TEXTDRAW ] =============//
  29. new Text:LEVEL2;        //=========== GUN_GAME_LEVEL 2 [ TEXTDRAW ] =============//
  30. new Text:LEVEL3;        //=========== GUN_GAME_LEVEL 3 [ TEXTDRAW ] =============//
  31. new Text:LEVEL4;        //=========== GUN_GAME_LEVEL 4 [ TEXTDRAW ] =============//
  32. new Text:JUGGERNAUT;    //=========== JUGGERNAUT [ TEXTDRAW ] =============//
  33. new Text:MOAB;          //=========== MOAB [ TEXTDRAW ] =============//
  34.  
  35. //======FORWARDS=======//
  36. forward Load_GUN_GAME_PLAYER_DATA(playerid,name[],value[]);                     //=========== Loading Player's DATA when it connects [ FORWARD FOR CALLBACK Load_GUN_GAME_PLAYER_DATA(playerid,name[],value[]) ] =============//
  37. forward OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid);        //=========== REALISTIC DAMAGE DONE BY SPECIFIC WEAPONS [ CAN BE CUSTOMIZED] [ FORWARD FOR CALLBACK OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid); ] =============//
  38. forward NewMapTimer(playerid);      //=========== CHANGING MAP SYSTEM TIMER [ FORWARD FOR CALLBACK NewMapTimer{playerid} ] =============//
  39. //=======ENUM=======//
  40. enum pInfo          //=======PLAYER's INFO IN ENUM [ pInfo ]=======//
  41. {
  42.     pPass,  //=======PLAYER's PASSWORD=======//
  43.     pCash,  //=======PLAYER's MONEY=======//
  44.     pScore, //=======PLAYER's SCORE=======//
  45.     pAdmin, //=======PLAYER's ADMIN LEVEL=======//
  46.     pAttentions,    //=======PLAYER's ATTENTIONS [ WARNINGS [ 0/3 ; 1/3 ; 2/3 ; 3/3[ban] ]=======//
  47.     pRespect,       //=======PLAYER's RESPECT POINTS [ LIKE REPUTATION ]=======//
  48.     pKills,         //=======PLAYER's TOTAL KILLS=======//
  49.     pDeaths,        //=======PLAYER's TOTAL DEATHS=======//
  50.     pRank,          //=======PLAYER's RANK=======//
  51.     pMoab           //=======PLAYER's M.O.A.B DONE=======//
  52. }
  53. new PlayerInfo[MAX_PLAYERS][pInfo]; //=======VARIABLE FOR "PLAYING" WIRH PLAYER's DATA=======//
  54. //=====STOCKS=====//
  55. stock GunGameUsersPath(playerid)
  56. {
  57.     new string[128],playername[MAX_PLAYER_NAME];
  58.     GetPlayerName(playerid,playername,sizeof(playername));
  59.     format(string,sizeof(string),Path,playername);
  60.     return string;
  61. }
  62. //=====================================================//
  63. // THIS HASHES PASSWORD WHEN ENTERED //
  64. stock udb_hash(buf[]) {
  65.     new length=strlen(buf);
  66.     new s1 = 1;
  67.     new s2 = 0;
  68.     new n;
  69.     for (n=0; n<length; n++)
  70.     {
  71.        s1 = (s1 + buf[n]) % 65521;
  72.        s2 = (s2 + s1)     % 65521;
  73.     }
  74.     return (s2 << 16) + s1;
  75. }
  76. // THIS HASHES PASSWORD WHEN ENTERED //
  77. //=====================================================//
  78. main()
  79. {
  80.     print("     \n          Signed,Preda------------");
  81.     print("     =================================");
  82.     print("     =================================");
  83.     print("         GUN GAME LOADED V0.1        ");
  84.     print("     =================================");
  85.     print("     =================================");
  86.     print("     ----------Signed, Preda\n");
  87. }
  88.  
  89. public OnGameModeInit()
  90. {
  91.     SetGameModeText("GUN GAME v0.1");
  92.     SetTimer("NewMapTimer",600000,true);
  93.     MapChange = 0;
  94.     SendRconCommand("mapname MAP 1");
  95.    
  96.     //================= MAP THAT COMES WHEN GAMEMODE STARTS ===============//
  97.     //================= MAP THAT COMES WHEN GAMEMODE STARTS ===============//
  98.     //=====TEXTS====//
  99.     for(new i=0;i<MAX_PLAYERS;i++)
  100.     {
  101.     Kill_Streak[i] = TextDrawCreate(11.000000,273.000000,"Kills : 0");
  102.     TextDrawAlignment(Kill_Streak[i],0);
  103.     TextDrawBackgroundColor(Kill_Streak[i],0x000000ff);
  104.     TextDrawFont(Kill_Streak[i],1);
  105.     TextDrawLetterSize(Kill_Streak[i],0.699999,1.600000);
  106.     TextDrawColor(Kill_Streak[i],16711935);
  107.     TextDrawSetOutline(Kill_Streak[i],1);
  108.     TextDrawSetProportional(Kill_Streak[i],1);
  109.     TextDrawSetShadow(Kill_Streak[i],1);
  110.     }
  111.    
  112.     SpectateText = TextDrawCreate(11.000000, 432.000000, "'ENTER'");
  113.     TextDrawBackgroundColor(SpectateText, -16776961);
  114.     TextDrawFont(SpectateText, 2);
  115.     TextDrawLetterSize(SpectateText, 0.519999, 1.100000);
  116.     TextDrawColor(SpectateText, 16777215);
  117.     TextDrawSetOutline(SpectateText, 1);
  118.     TextDrawSetProportional(SpectateText, 0);
  119.    
  120.     LEVEL1 = TextDrawCreate(508.000000, 7.000000, "LEVEL 1");
  121.     TextDrawBackgroundColor(LEVEL1, 255);
  122.     TextDrawFont(LEVEL1, 2);
  123.     TextDrawLetterSize(LEVEL1, 0.500000, 1.000000);
  124.     TextDrawColor(LEVEL1, 16711935);
  125.     TextDrawSetOutline(LEVEL1, 1);
  126.     TextDrawSetProportional(LEVEL1, 1);
  127.     TextDrawUseBox(LEVEL1, 1);
  128.     TextDrawBoxColor(LEVEL1, -16776961);
  129.     TextDrawTextSize(LEVEL1, 590.000000, 50.000000);
  130.    
  131.     LEVEL2 = TextDrawCreate(508.000000, 7.000000, "LEVEL 2");
  132.     TextDrawBackgroundColor(LEVEL2, 255);
  133.     TextDrawFont(LEVEL2, 2);
  134.     TextDrawLetterSize(LEVEL2, 0.500000, 1.000000);
  135.     TextDrawColor(LEVEL2, 16711935);
  136.     TextDrawSetOutline(LEVEL2, 1);
  137.     TextDrawSetProportional(LEVEL2, 1);
  138.     TextDrawUseBox(LEVEL2, 1);
  139.     TextDrawBoxColor(LEVEL2, -16776961);
  140.     TextDrawTextSize(LEVEL2, 595.000000, 50.000000);
  141.  
  142.     LEVEL3 = TextDrawCreate(508.000000, 7.000000, "LEVEL 3");
  143.     TextDrawBackgroundColor(LEVEL3, 255);
  144.     TextDrawFont(LEVEL3, 2);
  145.     TextDrawLetterSize(LEVEL3, 0.500000, 1.000000);
  146.     TextDrawColor(LEVEL3, 16711935);
  147.     TextDrawSetOutline(LEVEL3, 1);
  148.     TextDrawSetProportional(LEVEL3, 1);
  149.     TextDrawUseBox(LEVEL3, 1);
  150.     TextDrawBoxColor(LEVEL3, -16776961);
  151.     TextDrawTextSize(LEVEL3, 595.000000, 50.000000);
  152.  
  153.     LEVEL4 = TextDrawCreate(508.000000, 7.000000, "LEVEL 4");
  154.     TextDrawBackgroundColor(LEVEL4, 255);
  155.     TextDrawFont(LEVEL4, 2);
  156.     TextDrawLetterSize(LEVEL4, 0.500000, 1.000000);
  157.     TextDrawColor(LEVEL4, 16711935);
  158.     TextDrawSetOutline(LEVEL4, 1);
  159.     TextDrawSetProportional(LEVEL4, 1);
  160.     TextDrawUseBox(LEVEL4, 1);
  161.     TextDrawBoxColor(LEVEL4, -16776961);
  162.     TextDrawTextSize(LEVEL4, 595.000000, 50.000000);
  163.  
  164.     JUGGERNAUT = TextDrawCreate(508.000000, 7.000000, "JUGGERNAUT");
  165.     TextDrawBackgroundColor(JUGGERNAUT, 255);
  166.     TextDrawFont(JUGGERNAUT, 2);
  167.     TextDrawLetterSize(JUGGERNAUT, 0.500000, 1.000000);
  168.     TextDrawColor(JUGGERNAUT, 16711935);
  169.     TextDrawSetOutline(JUGGERNAUT, 1);
  170.     TextDrawSetProportional(JUGGERNAUT, 1);
  171.     TextDrawUseBox(JUGGERNAUT, 1);
  172.     TextDrawBoxColor(JUGGERNAUT, -16776961);
  173.     TextDrawTextSize(JUGGERNAUT, 595.000000, 50.000000);
  174.    
  175.     MOAB = TextDrawCreate(508.000000, 7.000000, "M.O.A.B");
  176.     TextDrawBackgroundColor(MOAB, 255);
  177.     TextDrawFont(MOAB, 2);
  178.     TextDrawLetterSize(MOAB, 0.500000, 1.000000);
  179.     TextDrawColor(MOAB, 16711935);
  180.     TextDrawSetOutline(MOAB, 1);
  181.     TextDrawSetProportional(MOAB, 1);
  182.     TextDrawUseBox(MOAB, 1);
  183.     TextDrawBoxColor(MOAB, -16776961);
  184.     TextDrawTextSize(MOAB, 590.000000, 50.000000);
  185.  
  186.     UsePlayerPedAnims();
  187.    
  188.     AddPlayerClass(0, 2,23,24,0,0,0,0,0,0,0);
  189.  
  190.     return 1;
  191. }
  192. ///////////////////////////////   REALISTIC DAMAGE ////////////      YOU CAN CHANGE //////////
  193. public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
  194. {
  195.     new Float:HP;
  196.     GetPlayerHealth(playerid, HP);
  197.  
  198.     if(weaponid == 24) SetPlayerHealth(playerid, HP-60);                //DEAGLE
  199.     if(weaponid == 22) SetPlayerHealth(playerid, HP-35);                //COLT
  200.     if(weaponid == 32) SetPlayerHealth(playerid, HP-10);                //TEC
  201.     if(weaponid == 28) SetPlayerHealth(playerid, HP-10);                //UZZY
  202.     if(weaponid == 23) SetPlayerHealth(playerid, HP-50);                //SD PISTOL
  203.     if(weaponid == 31) SetPlayerHealth(playerid, HP-35);                //M4
  204.     if(weaponid == 30) SetPlayerHealth(playerid, HP-40);                //AK
  205.     if(weaponid == 29) SetPlayerHealth(playerid, HP-18);                //MP5
  206.     if(weaponid == 34) SetPlayerHealth(playerid, HP-300);               //SNIPER
  207.     if(weaponid == 33) SetPlayerHealth(playerid, HP-35);                //CuntGun
  208.     if(weaponid == 25) SetPlayerHealth(playerid, HP-100);               //PumpShotgun
  209.     if(weaponid == 27) SetPlayerHealth(playerid, HP-70);                //Spaz12
  210.     return 1;
  211. }
  212. ///////////////////////////////   REALISTIC DAMAGE ////////////      YOU CAN CHANGE //////////
  213.  
  214. ///////////////////////////////////////////////////////////////////////
  215. //   THIS LOADS USER's DATA  ///
  216. public Load_GUN_GAME_PLAYER_DATA(playerid,name[],value[])
  217. {
  218.     INI_Int("Password",PlayerInfo[playerid][pPass]);
  219.     INI_Int("Moab",PlayerInfo[playerid][pMoab]);
  220.     INI_Int("Attentions",PlayerInfo[playerid][pAttentions]);
  221.     INI_Int("Respect",PlayerInfo[playerid][pRespect]);
  222.     INI_Int("Rank",PlayerInfo[playerid][pRank]);
  223.     INI_Int("Cash",PlayerInfo[playerid][pCash]);
  224.     INI_Int("Score",PlayerInfo[playerid][pScore]);
  225.     INI_Int("Admin",PlayerInfo[playerid][pAdmin]);
  226.     INI_Int("Kills",PlayerInfo[playerid][pKills]);
  227.     INI_Int("Deaths",PlayerInfo[playerid][pDeaths]);
  228.     return 1;
  229. }
  230. ///////////////////////////////////////////////////////////////////////
  231.  
  232. public OnPlayerRequestClass(playerid, classid)
  233. {
  234.     SetPlayerPos(playerid, 502.5411,2381.4548,29.9784);
  235.     SetPlayerFacingAngle(playerid, 248.0);
  236.     SetPlayerCameraPos(playerid,506.5417,2379.3599,30.1421);
  237.     SetPlayerCameraLookAt(playerid,502.5411,2381.4548,29.9784);
  238.     SpawnPlayer(playerid);
  239.     return 1;
  240. }
  241. public OnPlayerConnect(playerid)
  242. {
  243.     if(PlayerInfo[playerid][pAttentions] == 3)
  244.     {
  245.         BanEx(playerid, "! 3/3 ATTENTIONS !");
  246.     }
  247.     //==========REGISTERING & LOGIN SYSTYEM NOTE: DONT CHANGE==========//
  248.     if(fexist(GunGameUsersPath(playerid)))
  249.     {
  250.         INI_ParseFile(GunGameUsersPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
  251.         ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COLOR_GREEN"Login",""COLOR_LIGHTBLUE"Enter PASSWORD in order to LOG IN ","Login","Quit");
  252.     }
  253.     else
  254.     {
  255.         ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,""COLOR_RED"Registering...",""COLOR_GREEN"Enter PASSWORD in order to REGISTER","Register","Disconnect");
  256.     }
  257.     //==================================================================//
  258.     new string[256], pname[MAX_PLAYER_NAME];
  259.     GetPlayerName(playerid, pname, sizeof(pname));
  260.     format(string, sizeof(string), "==   %s [ID: %d] joined Gun Game   ==", pname, playerid);
  261.     SendClientMessageToAll(0xFFA500FF, string);
  262.     SendClientMessage(playerid, 0xFFA500FF, "GameMode CREATOR - Preda.");
  263.     SendClientMessage(playerid, 0xFFA500FF, "| Suggestions / Improvements Are Welcomed |");
  264.     TextDrawShowForPlayer(playerid,Kill_Streak[playerid]);
  265.  
  266.      //----------- RANKS -----------//
  267.     if(PlayerInfo[playerid][pScore] == 10)
  268.     {
  269.         PlayerInfo[playerid][pRank] = 1;
  270.         SendClientMessage(playerid, 0xB8860BAA, "RANK: E-1 PRIVATE");
  271.         new Text3D:label = Create3DTextLabel("E-1 PRIVATE", 0x008080FF, 30.0, 40.0, 50.0, 40.0, 0);
  272.         Attach3DTextLabelToPlayer(label, playerid, 0.0, 0.0, 0.7);
  273.     }
  274.    
  275.     if(PlayerInfo[playerid][pScore] == 20)
  276.     {
  277.         PlayerInfo[playerid][pRank] = 2;
  278.         SendClientMessage(playerid, 0xB8860BAA,"RANK: E-2 PRIVATE 2");
  279.         new Text3D:label = Create3DTextLabel("E-2 PRIVATE 2", 0x008080FF, 30.0, 40.0, 50.0, 40.0, 0);
  280.         Attach3DTextLabelToPlayer(label, playerid, 0.0, 0.0, 0.7);
  281.     }
  282.    
  283.     if(PlayerInfo[playerid][pScore] == 30)
  284.     {
  285.         PlayerInfo[playerid][pRank] = 3;
  286.         SendClientMessage(playerid, 0xB8860BAA,"RANK: E-4 SPECIALIST");
  287.         new Text3D:label = Create3DTextLabel("E-4 SPECIALIST", 0x008080FF, 30.0, 40.0, 50.0, 40.0, 0);
  288.         Attach3DTextLabelToPlayer(label, playerid, 0.0, 0.0, 0.7);
  289.     }
  290.    
  291.     if(PlayerInfo[playerid][pScore] == 40)
  292.     {
  293.         PlayerInfo[playerid][pRank] = 4;
  294.         SendClientMessage(playerid, 0xB8860BAA,"RANK: E-5 CAPORAL");
  295.         new Text3D:label = Create3DTextLabel("E-4 CAPORAL", 0x008080FF, 30.0, 40.0, 50.0, 40.0, 0);
  296.         Attach3DTextLabelToPlayer(label, playerid, 0.0, 0.0, 0.7);
  297.     }
  298.     //======= RANKS ==========//
  299.     //=========================================================================================================//
  300.  
  301.     SendClientMessage(playerid, 0xD2691EFF,"/account = YOUR STATISTICS");
  302.  
  303.     if(PlayerInfo[playerid][pAdmin] >= 1)
  304.     {
  305.         SendClientMessage(playerid, 0x9ACD32FF, "/admincmds");
  306.     }
  307.     return 1;
  308. }
  309.  
  310. public OnPlayerDisconnect(playerid, reason)
  311. {
  312.     new INI:File = INI_Open(GunGameUsersPath(playerid));
  313.     INI_SetTag(File,"data");
  314.     INI_WriteInt(File,"Cash",GetPlayerMoney(playerid));
  315.     INI_WriteInt(File,"Attentions",PlayerInfo[playerid][pAttentions]);
  316.     INI_WriteInt(File,"Rank",PlayerInfo[playerid][pRank]);
  317.     INI_WriteInt(File,"Score",PlayerInfo[playerid][pScore]);
  318.     INI_WriteInt(File,"Respect",PlayerInfo[playerid][pRespect]);
  319.     INI_WriteInt(File,"Moab",PlayerInfo[playerid][pMoab]);
  320.     INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]);
  321.     INI_WriteInt(File,"Kills",PlayerInfo[playerid][pKills]);
  322.     INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]);
  323.     INI_Close(File);
  324.     return 1;
  325. }
  326.  
  327. public OnPlayerSpawn(playerid)
  328. {
  329.  
  330.     switch ( MapChange  ) {                      
  331.         case 0:                                  
  332.         {
  333.             //==========RANDOM GAMEMODE SPAWNS FOR MAP 1================//
  334.             new Float:GunGameSpawns[][] =   // ================= CHANGE COORDONATES IN ORDER TO CHANGE SPAWNS ! ================= //
  335.             {
  336.             {320.3930,2541.8450,16.8101,200.6746},
  337.             {316.5851,2418.2549,17.2402,346.3526},
  338.             {413.9094,2535.3740,19.1484,113.8804}
  339.             };
  340.             new pGGskins[] = {
  341.             82,
  342.             83,
  343.             84
  344.             };
  345.  
  346.             new rand = random(sizeof(GunGameSpawns));
  347.             SetPlayerPos(playerid, GunGameSpawns[rand][0], GunGameSpawns[rand][1], GunGameSpawns[rand][2]);
  348.             SetPlayerSkin(playerid, pGGskins[random(3)]);
  349.             GivePlayerWeapon(playerid, 23, 9999);
  350.         }
  351.         case 1:                                  
  352.         {
  353.             //==========RANDOM GAMEMODE SPAWNS FOR MAP 2================//
  354.             new Float:GunGameSpawnss[][] =
  355.             {
  356.             {422.7695,2436.8044,16.5000,34.9541},
  357.             {422.3787,2471.9563,16.5000,147.7316},
  358.             {385.9537,2472.4307,16.5000,203.1922}
  359.             };
  360.             new pGGskinss[] = {
  361.             78,
  362.             79,
  363.             80,
  364.             81
  365.             };
  366.  
  367.             new rand = random(sizeof(GunGameSpawnss));
  368.             SetPlayerPos(playerid, GunGameSpawnss[rand][0], GunGameSpawnss[rand][1], GunGameSpawnss[rand][2]);
  369.             SetPlayerSkin(playerid, pGGskinss[random(3)]);
  370.             GivePlayerWeapon(playerid, 23, 9999);
  371.  
  372.         }
  373.     }
  374.     if(PlayerInfo[playerid][pAdmin] >= 1)
  375.     {
  376.         SetPlayerSkin(playerid, 285);
  377.     }
  378.     return 1;
  379. }
  380. public OnPlayerDeath(playerid, killerid, reason)
  381. {
  382.     PlayerInfo[killerid][pKills]++;
  383.     PlayerInfo[playerid][pDeaths]++;
  384.    
  385.     SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);
  386.     SetPlayerScore(playerid, GetPlayerScore(playerid) - 1);
  387.    
  388.     //========== LEVELS ==========//
  389.     if(GetPlayerScore(killerid) == 2)
  390.     {
  391.         GivePlayerWeapon(playerid, 22, 99999);
  392.         TextDrawShowForPlayer(playerid, Text:LEVEL1);
  393.         GameTextForPlayer(playerid,"~r~LEVEL ~g~UP - ~b~9MM", 3500, 4);
  394.         SetPlayerHealth(playerid, 100);
  395.     }
  396.     if(GetPlayerScore(killerid) == 4)
  397.     {
  398.         GivePlayerWeapon(playerid, 24, 99999);
  399.         TextDrawHideForPlayer(playerid, Text:LEVEL1);
  400.         TextDrawShowForPlayer(playerid, Text:LEVEL2);
  401.         GameTextForPlayer(playerid,"~r~LEVEL ~g~UP - ~b~DEAGLE", 3500, 4);
  402.         SetPlayerHealth(playerid, 100);
  403.     }
  404.     if(GetPlayerScore(killerid) == 6)
  405.     {
  406.         GivePlayerWeapon(playerid, 25, 99999);
  407.         TextDrawHideForPlayer(playerid, Text:LEVEL2);
  408.         TextDrawShowForPlayer(playerid, Text:LEVEL3);
  409.         GameTextForPlayer(playerid,"~r~LEVEL ~g~UP - ~b~SHOTGUN", 3500, 4);
  410.         SetPlayerHealth(playerid, 100);
  411.     }
  412.     if(GetPlayerScore(killerid) == 7)
  413.     {
  414.         GivePlayerWeapon(playerid, 28, 99999);
  415.         TextDrawHideForPlayer(playerid, Text:LEVEL3);
  416.         TextDrawShowForPlayer(playerid, Text:LEVEL4);
  417.         GameTextForPlayer(playerid,"~r~LEVEL ~g~UP - ~b~UZZY", 3500, 4);
  418.         SetPlayerHealth(playerid, 100);
  419.     }
  420.     if(GetPlayerScore(killerid) == 8)
  421.     {
  422.         GivePlayerWeapon(playerid, 28, 99999);
  423.         TextDrawHideForPlayer(playerid, Text:LEVEL4);
  424.         TextDrawShowForPlayer(playerid, Text:JUGGERNAUT);
  425.         GameTextForPlayer(playerid,"~r~LEVEL ~g~UP - ~b~!JUGGERNAUT!", 3500, 4);
  426.         SetPlayerHealth(playerid, 100);
  427.         SetPlayerArmour(playerid, 100);
  428.         new string[256], pname[MAX_PLAYER_NAME];
  429.         GetPlayerName(playerid, pname, sizeof(pname));
  430.         format(string, sizeof(string), "==   %s [ID: %d] HAS JUGGERNAUT ! KILL HIM FOR EXTRA BONUS !   ==", pname, playerid);
  431.         SendClientMessageToAll(0xFFA500FF, string);
  432.         SetPlayerAttachedObject(playerid,3,18637,1,-0.030000,-0.034000,0.162999,85.799942,0.000000,-88.099952,1.000000,1.038000,1.000000);
  433.         SetPlayerAttachedObject(playerid,1,19036,2,0.066999,0.051000,0.005000,75.099906,71.800003,17.299997,0.978000,1.087999,0.961000);
  434.         SetPlayerAttachedObject(playerid,0,19101,2,0.136999,0.021000,0.005999,0.000000,0.000000,0.000000,1.000000,1.000000,1.000000);
  435.         SetPlayerAttachedObject(playerid,2,18637,1,-0.020000,0.139000,-0.193999,-92.600044,-0.000000,-90.399986,1.000000,0.924998,0.910000);
  436.     }
  437.     if(GetPlayerScore(killerid) == 9)
  438.     {
  439.         moab[playerid] = 1;
  440.         GivePlayerWeapon(playerid, 29, 9999);
  441.         TextDrawHideForPlayer(playerid, Text:JUGGERNAUT);
  442.         TextDrawShowForPlayer(playerid, Text:moab[playerid]);
  443.         GameTextForPlayer(playerid, "~r~M.O.~g~A.B", 3500, 4);
  444.         new string[256], pname[MAX_PLAYER_NAME];
  445.         GetPlayerName(playerid, pname, sizeof(pname));
  446.         format(string, sizeof(string), "==   %s [ID: %d] HAS M.O.A.B !   ==", pname,playerid,pname,playerid);
  447.         SendClientMessageToAll(0xAA3333AA, string);
  448.         new bPname[ MAX_PLAYER_NAME ];
  449.         GetPlayerName( playerid, bPname, sizeof( bPname ) );
  450.         GameTextForPlayer( playerid, bPname, 3500, 1 );
  451.         SendClientMessage(playerid, 0xAA3333AA, "== PRESS 'NUM 4' FOR M.O.A.B ==");
  452.  
  453.     }
  454.    
  455.     SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);
  456.    
  457.     TogglePlayerSpectating(playerid, 1);
  458.     PlayerSpectatePlayer(playerid, killerid);
  459.     TextDrawShowForPlayer(playerid, Text:SpectateText);
  460.    
  461.     GameTextForPlayer(playerid, "~g~DEAD - ~r~LEVEL DOWN", 3500, 4);
  462.  
  463.     new szString[128];
  464.     kills[killerid]++;
  465.     format(szString,sizeof(szString),"Kills :%d",kills[killerid]);
  466.     TextDrawSetString(Kill_Streak[killerid],szString);
  467.     if(GetPlayerScore(playerid) == 9)
  468.     {
  469.         new string[256], pname[MAX_PLAYER_NAME];
  470.         GetPlayerName(killerid, pname, sizeof(pname));
  471.         format(string, sizeof(string), "==   %s [ID: %d] HAS KILLED JUGGERNAUT AND EARNED NEW WEAPON AND 10.000 $ + 5 SCORE  !   ==", pname, killerid);
  472.         SendClientMessageToAll(0xFFA500FF, string);
  473.         GivePlayerMoney(killerid, 10000);
  474.         SetPlayerHealth(killerid, 100);
  475.         SetPlayerArmour(killerid, 100);
  476.         GivePlayerWeapon(killerid, 37, 5000);
  477.         SetPlayerScore(killerid, GetPlayerScore(killerid) + 5);
  478.     }
  479.  
  480.  
  481.     return 1;
  482. }
  483.                                         //===================  Z C M D =====================//
  484.     COMMAND:imstuck(playerid, inputtext[])
  485.     {
  486.         TogglePlayerControllable(playerid, 1);
  487.         return 1;
  488.     }
  489.     // MAKING ADMIN - COMMAND //
  490.     COMMAND:admin(playerid, inputtext[])
  491.     {
  492.         if(IsPlayerAdmin(playerid))
  493.         {
  494.             new target, adminlvl;
  495.             if(sscanf(inputtext,"ud", target, adminlvl)) return SendClientMessage(playerid, 0x9ACD32FF, "CORRECT: /admin [playerID/playerNAME][Admin LEVEL 1 or 2]");
  496.             if(target !=INVALID_PLAYER_ID && IsPlayerConnected(target))
  497.             {
  498.                 if(IsPlayerAdmin(playerid))
  499.                 {
  500.                     if(adminlvl <=2)
  501.                     {
  502.                         PlayerInfo[target][pAdmin] = adminlvl;
  503.                         GameTextForPlayer(target, " PROMOTED ", 3500, 5);
  504.                     }
  505.                 }
  506.             }
  507.         }
  508.         else
  509.         {
  510.         SendClientMessage(playerid, 0x9ACD32FF, " NOT ADMIN ");
  511.         }
  512.         return 1;
  513.     }
  514.  
  515.     COMMAND:punish(playerid, inputtext[])
  516.     {
  517.         new target;
  518.         if(sscanf(inputtext,"u",target)) return SendClientMessage(playerid, 0x9ACD32FF, "CORRECT: /punish [playerID/playerNAME]");
  519.         if(target !=INVALID_PLAYER_ID && IsPlayerConnected(target))
  520.         {
  521.             if(PlayerInfo[playerid][pAdmin] >= 1)
  522.             {
  523.                 new Float:X,Float:Y,Float:Z;
  524.                 GetPlayerPos(target, X,Y,Z);
  525.                 SetPlayerPos(target, X+20000,Y+22222,Z+22222);
  526.                 GameTextForPlayer(target, " ~r~PUNISHED BY ADMIN ", 5000, 5);
  527.             }
  528.         }
  529.         return 1;
  530.     }
  531.  
  532.     COMMAND:account(playerid,inputtext[])
  533.     {
  534.             // STATS -------------------------//
  535.             new money = PlayerInfo[playerid][pCash];
  536.             new score = PlayerInfo[playerid][pScore];
  537.             new killss = PlayerInfo[playerid][pKills];
  538.             new attentions = PlayerInfo[playerid][pAttentions];
  539.             new deaths = PlayerInfo[playerid][pDeaths];
  540.             new adminlevel = PlayerInfo[playerid][pAdmin];
  541.             new respect = PlayerInfo[playerid][pRespect];
  542.             new moabb = PlayerInfo[playerid][pMoab];
  543.             new string1[300],stats[1024];
  544.             format(string1, sizeof string1, ""COLOR_GREEN"| MONEY: "COLOR_RED"%d "COLOR_GREEN"| SCORE: "COLOR_RED"%d "COLOR_GREEN"| KILLS: "COLOR_RED"%d "COLOR_GREEN"| DEATHS: "COLOR_RED"%d | "COLOR_RED"ADMIN LEVEL: "COLOR_RED" %d "COLOR_GREEN"| RESPECT: "COLOR_RED"%d "COLOR_GREEN" | ATTENTIONS: "COLOR_RED"%d / 3"COLOR_RED" |"COLOR_RED" | M.O.A.B: "COLOR_GREEN"%d"COLOR_RED" |", money, score, killss, deaths, adminlevel, respect, attentions, moabb);
  545.             format(stats, sizeof stats, "%s", string1);
  546.             ShowPlayerDialog(playerid,3,DIALOG_STYLE_MSGBOX,"Your account:",stats,"OK","OK");
  547.  
  548.             // STATS -------------------------//
  549.             return 1;
  550.     }
  551.    
  552.     COMMAND:respect(playerid, inputtext[])
  553.     {
  554.         new target;
  555.         if(sscanf(inputtext,"u", target))return SendClientMessage(playerid, 0x9ACD32FF, "CORRECT: /respect [playerID/playerNAME]");
  556.         if(target != INVALID_PLAYER_ID && IsPlayerConnected(target))
  557.         {
  558.             PlayerInfo[target][pRespect]++;
  559.             GameTextForPlayer(target, "~r~YOU GOT + ~g~RESPECT", 5000, 5);
  560.             new string[100], name[MAX_PLAYER_NAME];
  561.             GetPlayerName(playerid, name, sizeof(name));
  562.             format(string, sizeof(string), "! %s GAVE YOU +1 RESPECT !",name);
  563.             SendClientMessage(target, 0x9ACD32FF, string);
  564.             new targetname[MAX_PLAYER_NAME];
  565.             GetPlayerName(target,targetname, sizeof(targetname));
  566.             format(string, sizeof(string), "! YOU GAVE %s +1 RESPECT !", targetname);
  567.         }
  568.         return 1;
  569.     }
  570.            
  571.     COMMAND:view(playerid, inputtext[])
  572.     {
  573.         new target;
  574.         if(sscanf(inputtext,"u", target)) return SendClientMessage(playerid, 0x9ACD32FF, " CORRECT: /view [playerID/playerNAME]");
  575.         if(target != INVALID_PLAYER_ID && IsPlayerConnected(target))
  576.         {
  577.             if(PlayerInfo[playerid][pAdmin] >= 1)
  578.             {
  579.                 //      PLAYER'S                STATS -------------------------//
  580.                 new string1[300],stats[1024],targetname[MAX_PLAYER_NAME],string[10];
  581.                 new money = PlayerInfo[target][pCash];
  582.                 new score = PlayerInfo[target][pScore];
  583.                 new killss = PlayerInfo[target][pKills];
  584.                 new attentions = PlayerInfo[target][pAttentions];
  585.                 new moabb = PlayerInfo[target][pMoab];
  586.                 new deaths = PlayerInfo[target][pDeaths];
  587.                 new adminlevel = PlayerInfo[target][pAdmin];
  588.                 new respect = PlayerInfo[target][pRespect];
  589.                 GetPlayerName(target,targetname, sizeof(targetname));
  590.                 format(string1, sizeof string1, ""COLOR_GREEN"| MONEY: "COLOR_RED"%d "COLOR_GREEN"| SCORE: "COLOR_RED"%d "COLOR_GREEN"| KILLS: "COLOR_RED"%d "COLOR_GREEN"| DEATHS: "COLOR_RED"%d | "COLOR_RED"ADMIN LEVEL: "COLOR_RED" %d "COLOR_GREEN"| RESPECT: "COLOR_RED"%d "COLOR_GREEN" | ATTENTIONS: "COLOR_RED"%d / 3"COLOR_RED" | M.O.A.B: "COLOR_GREEN"%d"COLOR_RED" |", money, score, killss, deaths, adminlevel, respect, attentions, moabb);
  591.                 format(stats, sizeof stats, "%s", string1);
  592.                 format(string, sizeof(string), "... CHECKING %s ...",targetname);
  593.                 SendClientMessage(playerid, 0x9ACD32FF, string);
  594.                 ShowPlayerDialog(playerid,3,DIALOG_STYLE_MSGBOX,"Your account:",stats,"OK","OK");
  595.  
  596.                 //      PLAYER'S                STATS -------------------------//
  597.             }
  598.         }
  599.         return 1;
  600.     }
  601.  
  602.     COMMAND:giveweapon(playerid,inputtext[])
  603.     {
  604.  
  605.         new target, wid, amt;
  606.         if(sscanf(inputtext,"udd",target,wid,amt))return SendClientMessage(playerid,0xff0000FF,"CORRECT: /giveweapon [playerID/playerNAME][weap ID][AMMO]");
  607.         if(wid < 0 || wid >40)return SendClientMessage(playerid,0xff0000FF,"No weapon matching that ID !");
  608.         if(target != INVALID_PLAYER_ID && IsPlayerConnected(target))
  609.         {
  610.             if(PlayerInfo[playerid][pAdmin] >= 1)
  611.             {
  612.                 GivePlayerWeapon(target,wid,amt);
  613.             }
  614.             else SendClientMessage(playerid,0xff0000FF,"NO PERMISSION");
  615.         }
  616.         else  SendClientMessage(playerid,0xff0000FF,"Player not CONNECTED !");
  617.         return 1;
  618.     }
  619.    
  620.     COMMAND:health(playerid, inputtext[])
  621.     {
  622.         new target, health;
  623.         if(sscanf(inputtext,"ud",target, health))return SendClientMessage(playerid, 0x9ACD32FF,"CORRECT: /health [playerID/playerNAME][HEALTH]");
  624.         if(target != INVALID_PLAYER_ID && IsPlayerConnected(target))
  625.         {
  626.             if(PlayerInfo[playerid][pAdmin] >= 1)
  627.             {
  628.                 SetPlayerHealth(target, health);
  629.             }
  630.             else SendClientMessage(playerid, 01, "NO PERMISSION");
  631.         }
  632.         else SendClientMessage(playerid, 0x9ACD32FF, "PLAYER not CONNECTED !");
  633.         return 1;
  634.     }
  635.    
  636.     COMMAND:spectate(playerid, inputtext[])
  637.     {
  638.         new target;
  639.         if(sscanf(inputtext,"u",target)) return SendClientMessage(playerid, 0x9ACD32FF, "CORRECT: /spectate [playerID/playerNAME]");
  640.         if(target != INVALID_PLAYER_ID && IsPlayerConnected(target))
  641.         {
  642.             if(PlayerInfo[playerid][pAdmin] >= 1)
  643.             {
  644.                 TogglePlayerSpectating(playerid, 1);
  645.                 PlayerSpectatePlayer(playerid, target);
  646.                 TextDrawShowForPlayer(playerid, Text:SpectateText);
  647.                 new string[256], targetname[MAX_PLAYER_NAME];
  648.                 GetPlayerName(playerid, targetname, sizeof(targetname));
  649.                 new targetscore = PlayerInfo[target][pScore];
  650.                 new targetadmin = PlayerInfo[target][pAdmin];
  651.                 new targetrank = PlayerInfo[target][pRank];
  652.                 format(string, sizeof(string), "NAME:%s, TOTAL SCORE: %d, ADMIN LEVEL: %d, RANK: %d", targetname, targetscore, targetadmin, targetrank);
  653.                 SendClientMessage(playerid, 0x9ACD32FF, string);
  654.             }
  655.         }
  656.         return 1;
  657.     }
  658.    
  659.     COMMAND:clearattentions(playerid, inputtext[])
  660.     {
  661.         new target;
  662.         if(sscanf(inputtext,"u",target)) return SendClientMessage(playerid, 0x9ACD32FF, " CORRECT: /clearattentions [playerID/playerNAME] ");
  663.         if(target != INVALID_PLAYER_ID && IsPlayerConnected(target))
  664.         {
  665.             if(PlayerInfo[playerid][pAdmin] >= 2)
  666.             {
  667.                 PlayerInfo[target][pAttentions] = 0;
  668.                 new string[70], adminname[MAX_PLAYER_NAME];
  669.                 GetPlayerName(playerid, adminname, sizeof(adminname));
  670.                 format(string, sizeof(string), "ADMIN %s CLEANED YOUR ATTENIONS ! NOW 0/3 !", adminname);
  671.                 SendClientMessage(playerid, 0x9ACD32FF, string);
  672.             }
  673.         }
  674.         return 1;
  675.     }
  676.    
  677.     COMMAND:admincmds(playerid, inputtext[])
  678.     {
  679.         new adminname[MAX_PLAYER_NAME], string[50];
  680.         GetPlayerName(playerid, adminname,sizeof(adminname));
  681.         format(string, sizeof(string), " Hello, %s [ ID: %d ] ", adminname, playerid);
  682.         SendClientMessage(playerid, 0x9ACD32FF, string);
  683.         if(PlayerInfo[playerid][pAdmin] >= 1)
  684.         {
  685.             SendClientMessage(playerid, 0x9ACD32FF, "= ADMIN LEVEL 1 GUN_GAME_COMMANDS =");
  686.             SendClientMessage(playerid, 0x9ACD32FF, "= spectate ; health ; armour ; giveweapon ; score ; givemoney ; punish ; kick = ");
  687.         }
  688.         if(PlayerInfo[playerid][pAdmin] > 1)
  689.         {
  690.             SendClientMessage(playerid, 0x9ACD32FF, "= ADMIN LEVEL 2 GUN_GAME_COMMANDS =");
  691.             SendClientMessage(playerid, 0x9ACD32FF, "= givemoab ; givemoney ; rank ; ban ; clearattentions ; ");
  692.         }
  693.         return 1;
  694.     }
  695.    
  696.     COMMAND:ban(playerid, inputtext[])
  697.     {
  698.         new target;
  699.         if(sscanf(inputtext,"u",target)) return SendClientMessage(playerid, 0x9ACD32FF, " CORRECT: /ban [playerID/playerNAME] ");
  700.         if(target != INVALID_PLAYER_ID && IsPlayerConnected(target))
  701.         {
  702.             if(PlayerInfo[playerid][pAdmin] >= 2)
  703.             {
  704.                 Ban(target);
  705.                 new string[70], targetname[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME];
  706.                 GetPlayerName(target, targetname, sizeof(targetname));
  707.                 GetPlayerName(playerid, adminname, sizeof(adminname));
  708.                 format(string, sizeof(string), "ADMIN %s HAS BANNED PLAYER %s", adminname, targetname);
  709.                 SendClientMessageToAll(0x9ACD32FF, string);
  710.             }
  711.         }
  712.         return 1;
  713.     }
  714.    
  715.     COMMAND:kick(playerid, inputtext[])
  716.     {
  717.         new target;
  718.         if(sscanf(inputtext,"u",target)) return SendClientMessage(playerid, 0x9ACD32FF, " CORRECT: /kick [playerID/playerNAME] ");
  719.         if(target != INVALID_PLAYER_ID && IsPlayerConnected(target))
  720.         {
  721.             if(PlayerInfo[playerid][pAdmin] >= 1)
  722.             {
  723.                 Kick(target);
  724.                 new string[70], targetname[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME];
  725.                 GetPlayerName(target, targetname, sizeof(targetname));
  726.                 GetPlayerName(playerid, adminname, sizeof(adminname));
  727.                 format(string, sizeof(string), "ADMIN %s HAS KICKED PLAYER %s", adminname, targetname);
  728.                 SendClientMessageToAll(0x9ACD32FF, string);
  729.             }
  730.         }
  731.         return 1;
  732.     }
  733.    
  734.     COMMAND:attention(playerid, inputtext[])
  735.     {
  736.         new target;
  737.         if(sscanf(inputtext,"u",target)) return SendClientMessage(playerid, 0x9ACD32FF, " CORRECT: /attention [playerID/playerNAME] ");
  738.         if(target != INVALID_PLAYER_ID && IsPlayerConnected(target))
  739.         {
  740.             if(PlayerInfo[playerid][pAdmin] >= 1)
  741.             {
  742.                 PlayerInfo[playerid][pAttentions]++;
  743.                 GameTextForPlayer(target,"~g~YOU WERE ~r~ATTENTIONED", 5000, 4);
  744.                 new string[100], name[MAX_PLAYER_NAME];
  745.                 new warnings = PlayerInfo[target][pAttentions];
  746.                 GetPlayerName(playerid, name, sizeof(name));
  747.                 format(string, sizeof(string), "ADMIN %s ATTENTIONED YOU ! ATTENTIONS : %d / 3", name, warnings);
  748.                 SendClientMessage(target, 0x9ACD32FF, string);
  749.             }
  750.         }
  751.         return 1;
  752.     }
  753.    
  754.     COMMAND:givemoab(playerid, inputtext[])
  755.     {
  756.         new target;
  757.         if(sscanf(inputtext,"u",target)) return SendClientMessage(playerid, 0x9ACD32FF, " CORRECT: /givemoab [playerID/playerNAME] ");
  758.         if(target != INVALID_PLAYER_ID && IsPlayerConnected(target))
  759.         {
  760.             if(PlayerInfo[playerid][pAdmin] >= 2)
  761.             {
  762.                 moab[target] = 1;
  763.                 new string[100], name[MAX_PLAYER_NAME];
  764.                 GetPlayerName(playerid, name, sizeof(name));
  765.                 format(string, sizeof(string), "ADMIN %s GAVE YOU M.O.A.B / USE NUM 4",name);
  766.                 SendClientMessage(target, 0x9ACD32FF, string);
  767.             }
  768.         }
  769.         return 1;
  770.     }
  771.    
  772.     COMMAND:givemoney(playerid, inputtext[])
  773.     {
  774.         new target, money;
  775.         if(sscanf(inputtext,"ud", target, money)) return SendClientMessage(playerid, 0x9ACD32FF, " CORRECT: /givemoney [playerID/playerNAME] [MONEY] ");
  776.         if(target != INVALID_PLAYER_ID && IsPlayerConnected(target))
  777.         {
  778.             if(PlayerInfo[playerid][pAdmin] >= 2)
  779.             {
  780.                 GivePlayerMoney(target, PlayerInfo[target][pCash] + money);
  781.                 new string[100], name[MAX_PLAYER_NAME];
  782.                 GetPlayerName(playerid, name, sizeof(name));
  783.                 new moneyy = PlayerInfo[target][pCash];
  784.                 format(string, sizeof(string), "ADMIN %s SET YOUR MONEY TO %d",name,moneyy);
  785.                 SendClientMessage(target, 0x9ACD32FF, string);
  786.             }
  787.         }
  788.         return 1;
  789.     }
  790.    
  791.     COMMAND:rank(playerid, inputtext[])
  792.     {
  793.         new target, rank;
  794.         if(sscanf(inputtext,"ud", target, rank)) return SendClientMessage(playerid, 0x9ACD32FF, " CORRECT: /rank [playerID/playerNAME] [RANK] ");
  795.         if(target != INVALID_PLAYER_ID && IsPlayerConnected(target))
  796.         {
  797.             if(PlayerInfo[playerid][pAdmin] == 2)
  798.             {
  799.                 PlayerInfo[target][pRank] = rank;
  800.                 new string[100], name[MAX_PLAYER_NAME];
  801.                 GetPlayerName(playerid, name, sizeof(name));
  802.                 format(string, sizeof(string), "ADMIN %s CHANGED YOUR RANK TO %d",name,PlayerInfo[target][pRank]);
  803.                 SendClientMessage(target, 0x9ACD32FF, string);
  804.             }
  805.         }
  806.         return 1;
  807.     }
  808.    
  809.     COMMAND:score(playerid, inputtext[])
  810.     {
  811.         new target, score;
  812.         if(sscanf(inputtext,"ud",target,score)) return SendClientMessage(playerid, 0x9ACD32FF, " CORRECT: /score [playerID/playerNAME] [AMMOUNT] ");
  813.         if(target != INVALID_PLAYER_ID && IsPlayerConnected(target))
  814.         {
  815.             if(PlayerInfo[playerid][pAdmin] >= 1)
  816.             {
  817.                 PlayerInfo[target][pScore] = score;
  818.             }
  819.         }
  820.         return 1;
  821.     }
  822.    
  823.     COMMAND:calladmin(playerid, inputtext[])
  824.     {
  825.     }
  826.    
  827.                                         //===================  Z C M D =====================//
  828. public NewMapTimer(playerid)                      
  829. {
  830.     switch ( MapChange ) {
  831.         case 0:
  832.         {
  833.             MapChange++;
  834.         }
  835.         case 1:
  836.         {
  837.             MapChange--;
  838.         }
  839.     }
  840.  
  841.     GameTextForAll("~b~ Loading new ~w~MAP",4000,3);
  842.     for(new i = 0; i < MAX_PLAYERS; i++)
  843.     {
  844.         SpawnPlayer(i);
  845.     }
  846.  
  847.     return 1;
  848. }
  849. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  850. {
  851.     if(PRESSED(KEY_SECONDARY_ATTACK))
  852.     {
  853.         TogglePlayerSpectating(playerid, 0);
  854.         SpawnPlayer(playerid);
  855.         TextDrawHideForPlayer(playerid, Text:SpectateText);
  856.     }
  857.  
  858.     if(PRESSED(KEY_ANALOG_LEFT))
  859.     {
  860.         if(moab[playerid] == 1)
  861.         {
  862.            switch ( MapChange  )
  863.            {
  864.             case 0:
  865.             {
  866.                     new string[256], pname[MAX_PLAYER_NAME];
  867.                     GetPlayerName(playerid, pname, sizeof(pname));
  868.                     format(string, sizeof(string), "==   %s [ID: %d] ACTIVATED M.O.A.B | !   ==", pname,playerid,pname,playerid);
  869.                     SendClientMessageToAll(0xAA3333AA, string);
  870.                     CreateExplosion(320.3930,2541.8450,16.8101,1, 10000000000000);
  871.                     CreateExplosion(320.3930,2541.8450,16.8101,1, 10000000000000);
  872.                     CreateExplosion(316.5851,2418.2549,17.2402,1, 10000000000000);
  873.                     CreateExplosion(316.5851,2418.2549,17.2402,1, 10000000000000);
  874.                     CreateExplosion(316.5851,2418.2549,17.2402,1, 10000000000000);
  875.                     CreateExplosion(422.3787,2471.9563,16.5000,1, 10000000000000);
  876.                     CreateExplosion(413.9094,2535.3740,19.1484,1, 10000000000000);
  877.                     GivePlayerMoney(playerid, 100000);
  878.                     GameTextForAll("~r~ M.O.A.B DEPLOYED", 3500, 4);
  879.                     PlayerInfo[playerid][pMoab]++;
  880.                     for(new i; i < MAX_PLAYERS; i++)
  881.                     {
  882.                       if(IsPlayerConnected(i))
  883.                       {
  884.                         TogglePlayerSpectating(i, 1);
  885.                         TextDrawShowForPlayer(i, Text:SpectateText);
  886.                        
  887.                       }
  888.                     }
  889.             }
  890.             case 1:                                  
  891.             {
  892.                     new string[256], pname[MAX_PLAYER_NAME];
  893.                     GetPlayerName(playerid, pname, sizeof(pname));
  894.                     format(string, sizeof(string), "==   %s [ID: %d] ACTIVATED M.O.A.B | HE IS THE WINNER !   ==", pname,playerid,pname,playerid);
  895.                     SendClientMessageToAll(0xAA3333AA, string);
  896.                     CreateExplosion(422.7695,2436.8044,16.5000,1, 10000000000000);
  897.                     CreateExplosion(422.7695,2436.8044,16.5000,1, 10000000000000);
  898.                     CreateExplosion(422.3787,2471.9563,16.5000,1, 10000000000000);
  899.                     CreateExplosion(422.3787,2471.9563,16.5000,1, 10000000000000);
  900.                     CreateExplosion(385.9537,2472.4307,16.5000,1, 10000000000000);
  901.                     CreateExplosion(422.3787,2471.9563,16.5000,1, 10000000000000);
  902.                     CreateExplosion(385.9537,2472.4307,16.5000,1, 10000000000000);
  903.                     GivePlayerMoney(playerid, 100000);
  904.                     GameTextForAll("~r~ M.O.A.B DEPLOYED", 3500, 4);
  905.                     PlayerInfo[playerid][pMoab]++;
  906.                     for(new i; i < MAX_PLAYERS; i++)
  907.                     {
  908.                             if(IsPlayerConnected(i))
  909.                             {
  910.                                 SetPlayerHealth(i, 0);
  911.                                 TogglePlayerSpectating(i, 1);
  912.                                 TextDrawShowForPlayer(i, Text:SpectateText);
  913.                                
  914.                             }
  915.                     }
  916.             }
  917.           }
  918.         }
  919.  
  920.     }
  921.     return 1;
  922. }
  923. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  924. {
  925.     switch( dialogid )
  926.     {
  927.         case DIALOG_REGISTER:
  928.         {
  929.             if (!response) return Kick(playerid);
  930.             if(response)
  931.             {
  932.                 if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, ""COLOR_WHITE"Registering...",""COLOR_RED"You have entered an invalid password.\n"COLOR_WHITE"Type your password below to register a new account.","Register","Quit");
  933.                 new INI:File = INI_Open(GunGameUsersPath(playerid));
  934.                 INI_SetTag(File,"data");
  935.                 INI_WriteInt(File,"Password",udb_hash(inputtext));
  936.                 INI_WriteInt(File,"Respect",0);
  937.                 INI_WriteInt(File,"Moab",0);
  938.                 INI_WriteInt(File,"Attentions",0);
  939.                 INI_WriteInt(File,"Rank",0);
  940.                 INI_WriteInt(File,"Score",0);
  941.                 INI_WriteInt(File,"Cash",0);
  942.                 INI_WriteInt(File,"Admin",0);
  943.                 INI_WriteInt(File,"Kills",0);
  944.                 INI_WriteInt(File,"Deaths",0);
  945.                 INI_Close(File);
  946.  
  947.                 SetSpawnInfo(playerid, 0, 0, 1958.33, 1343.12, 15.36, 269.15, 0, 0, 0, 0, 0, 0);
  948.                 SpawnPlayer(playerid);
  949.                 ShowPlayerDialog(playerid, DIALOG_SUCCESS_1, DIALOG_STYLE_MSGBOX,""COLOR_WHITE"Success!",""COLOR_GREEN"","Ok","");
  950.             }
  951.         }
  952.  
  953.         case DIALOG_LOGIN:
  954.         {
  955.             if ( !response ) return Kick ( playerid );
  956.             if( response )
  957.             {
  958.                 if(udb_hash(inputtext) == PlayerInfo[playerid][pPass])
  959.                 {
  960.                     INI_ParseFile(GunGameUsersPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
  961.                     GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]);
  962.                     ShowPlayerDialog(playerid, DIALOG_SUCCESS_2, DIALOG_STYLE_MSGBOX,""COLOR_WHITE"Success!",""COLOR_GREEN"You have successfully logged in!","Ok","");
  963.                 }
  964.                 else
  965.                 {
  966.                     ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COLOR_WHITE"Login",""COLOR_RED"Incorrect PASSWORD entered.\n"COLOR_WHITE"Type your password below to login.","Login","Quit");
  967.                 }
  968.                 return 1;
  969.             }
  970.         }
  971.     }
  972.     return 1;
  973. }
Advertisement
Add Comment
Please, Sign In to add comment