• Страница 1 из 1
  • 1
Дуэль зоны
ZioHikДата: Среда, 22.08.2012, 03:02 | Сообщение # 1
.::Offline::.
http://u.to/N46EAw
Сообщений: 831
[ 82 ]
Награды: 29

Статус отсутствует
Дуэль зоны через меню.

Команда для входа /vtcduel.







Ко всем new:

Code
new Menu:weaponduelzones;


Если нету этих цветов,то ко всем define :

Code
#define BLUE 0x33AAFFFF
#define GREEN 0x33AA33AA


В OnGameModeInit:

Code
print("\n======================================");
  print("       Loaded Succsesfully              ");
  print("      Was LiL' Bit buggy But fixed             ");
  print("            By [vTc]                   ");
  print("======================================\n");

  weaponduelzones = CreateMenu("Duel Areas", 1, 220.0, 100.0, 150.0, 150.0);
  AddMenuItem(weaponduelzones, 0, "Deagle");
  AddMenuItem(weaponduelzones, 0, "Silenced Pistol");
  AddMenuItem(weaponduelzones, 0, "9mm");
  AddMenuItem(weaponduelzones, 0, "Combat Shotgun");
  AddMenuItem(weaponduelzones, 0, "Sawnoff Shotgun");
  AddMenuItem(weaponduelzones, 0, "Shotgun");
  AddMenuItem(weaponduelzones, 0, "MP5");
  AddMenuItem(weaponduelzones, 0, "Uzi");
  AddMenuItem(weaponduelzones, 0, "AK47");
  AddMenuItem(weaponduelzones, 0, "M4");
  AddMenuItem(weaponduelzones, 0, "Sniper Rifle");
  AddMenuItem(weaponduelzones, 0, "Country Rifle");


В public OnPlayerSelectedMenuRow(playerid, row):

Code
new Menu:CurrentMenu = GetPlayerMenu(playerid);
  if(CurrentMenu == weaponduelzones)
  {
      switch(row)
      {
          case 0: //Aree of duel's Where duel will be held
          {
             new player[24], tmp[256];
             GetPlayerName(playerid,player,sizeof(player));
             format(tmp,sizeof(tmp),"%s присоеденился к дуэль зоне Deagle",player);
             SendClientMessageToAll(GREEN,tmp);
             new zName[MAX_PLAYER_NAME];
             GetPlayerName(playerid, zName, sizeof(zName));
             SetPlayerInterior(playerid, 0);
             new c = random(3);
             if (c == 0){
             SetPlayerPos(playerid, 1812.083862,-1536.135864,13.077413);}
             else if (c == 1){
             SetPlayerPos(playerid, 1754.289428,-1580.498901, 12.233906);}
             else if (c == 2){
             SetPlayerPos(playerid, 1751.747070,-1559.343139,9.577437);}
             ResetPlayerWeapons(playerid);
             ResetPlayerWeapons(playerid);
             GivePlayerWeapon(playerid, 24, 11111); // Deagle
             TogglePlayerControllable(playerid,true);
             SendClientMessage(playerid,BLUE,"Вы присоеденились к дуэль зоне Deagle.");
             printf("[DZ] %s (ID: %d) has teleported to ( Deagle )",zName,playerid);
             return 1;
          }
          case 1: //**SD Pistol Duel Zone**//
          {
          new player[24], tmp[256];
       GetPlayerName(playerid,player,sizeof(player));
       format(tmp,sizeof(tmp),"%s присоеденился к дуэль зоне Silenced Pistol",player);
       SendClientMessageToAll(GREEN,tmp);
          new zName[MAX_PLAYER_NAME];
       GetPlayerName(playerid, zName, sizeof(zName));
       SetPlayerInterior(playerid, 12);
       new c = random(3);
       if (c == 0) {
             SetPlayerPos(playerid, 1121.4545,3.3410,1000.6797);}
             else if (c == 1){
             SetPlayerPos(playerid, 1142.4363,6.0645,1000.6797);}
             else if (c == 2){
             SetPlayerPos(playerid, 1116.3370,-9.2730,1002.0859);}
             ResetPlayerWeapons(playerid);
       GivePlayerWeapon(playerid, 23, 11111); // SD Pistol
       TogglePlayerControllable(playerid,true);
       SendClientMessage(playerid,BLUE,"Вы присоеденились к дуэль зоне Silenced Pistol.");
       printf("[DZ] %s (ID: %d) has teleported to ( SDPistol )",zName,playerid);
       return 1;
          }
          case 2: //**9mm Duel Zone**//
          {
          new player[24], tmp[256];
       GetPlayerName(playerid,player,sizeof(player));
       format(tmp,sizeof(tmp),"%s присоеденился к дуэль зоне 9mm",player);
       SendClientMessageToAll(GREEN,tmp);
          new zName[MAX_PLAYER_NAME];
       GetPlayerName(playerid, zName, sizeof(zName));
       SetPlayerInterior(playerid, 0);
             new c = random(2);
             if (c == 0){
             SetPlayerPos(playerid, 2149.897460,-1800.867553,13.556167);}
             else if (c == 1){
             SetPlayerPos(playerid, 2177.978027,-1816.676391,13.571835);}
             ResetPlayerWeapons(playerid);
       GivePlayerWeapon(playerid, 22, 11111); // 9mm
       TogglePlayerControllable(playerid,true);
       SendClientMessage(playerid,BLUE,"Вы присоеденились к дуэль зоне 9mm.");
       printf("[DZ] %s (ID: %d) has teleported to ( 9mm )",zName,playerid);
       return 1;
          }
          case 3: //**Combat Shotgun Duel Zone**//
          {
          new player[24], tmp[256];
       GetPlayerName(playerid,player,sizeof(player));
       format(tmp,sizeof(tmp),"%s присоеденился к дуэль зоне Combat Shotgun",player);
       SendClientMessageToAll(GREEN,tmp);
          new zName[MAX_PLAYER_NAME];
       GetPlayerName(playerid, zName, sizeof(zName));
       SetPlayerInterior(playerid, 0);
             new c = random(5);
             if (c == 0){
             SetPlayerPos(playerid, 139.693634,1478.122436,10.598002);}
             else if (c == 1){
             SetPlayerPos(playerid, 239.251525,1392.173828,10.585937);}
             else if (c == 2){
             SetPlayerPos(playerid, 246.591339,1434.955322,23.370285);}
             else if (c == 3){
             SetPlayerPos(playerid, 220.571670,1359.297729,10.585937);}
             else if (c == 4){
             SetPlayerPos(playerid, 116.766464, 1343.469848, 10.585937);}
       ResetPlayerWeapons(playerid);
       GivePlayerWeapon(playerid, 27, 11111); // Combat Sh0tgun
       TogglePlayerControllable(playerid,true);
       SendClientMessage(playerid,BLUE,"Вы присоеденились к дуэль зоне Combat Shotgun.");
             printf("[DZ] %s (ID: %d) has teleported to ( CS )",zName,playerid);
       return 1;
          }
          case 4: //**Sawnoff Shotgun Duel Zone**//
          {
          new player[24], tmp[256];
       GetPlayerName(playerid,player,sizeof(player));
       format(tmp,sizeof(tmp),"%s has Joined Sawnoff Shotgun",player);
       SendClientMessageToAll(GREEN,tmp);
             new zName[MAX_PLAYER_NAME];
       GetPlayerName(playerid, zName, sizeof(zName));
       SetPlayerInterior(playerid, 0);
             new c = random(2);
             if (c == 0){
             SetPlayerPos(playerid,  1075.582153,1064.050781,10.835937);}
             else if (c == 1){
             SetPlayerPos(playerid, 1100.426147,1084.215332,10.835937);}
             ResetPlayerWeapons(playerid);
       GivePlayerWeapon(playerid, 26, 11111); // Sawnoff's
       TogglePlayerControllable(playerid,true);
       SendClientMessage(playerid,BLUE,"Вы присоеденились к дуэль зоне Sawnoff Shotgun");
       printf("[DZ] %s (ID: %d) has teleported to ( SS )",zName,playerid);
       return 1;
          }
          case 5: //**Shotgun Duel Zone**//
          {
          new player[24], tmp[256];
       GetPlayerName(playerid,player,sizeof(player));
       format(tmp,sizeof(tmp),"%s присоеденился к дуэль зоне the Shotgun",player);
       SendClientMessageToAll(GREEN,tmp);
             new zName[MAX_PLAYER_NAME];
       GetPlayerName(playerid, zName, sizeof(zName));
       SetPlayerInterior(playerid, 0);
             new c = random(3);
             if (c == 0){
             SetPlayerPos(playerid, -1384.222045,507.441558,3.039062);}
             else if (c == 1){
             SetPlayerPos(playerid, -1403.464477,490.499755,5.271675);}
             else if (c == 2){
             SetPlayerPos(playerid, -1416.739013,508.634429,3.039062);}
       ResetPlayerWeapons(playerid);
       GivePlayerWeapon(playerid, 25, 11111); //Shotgun
       TogglePlayerControllable(playerid,true);
       SendClientMessage(playerid,BLUE,"Вы присоеденились к дуэль зоне Shotgun");
       printf("[DZ] %s (ID: %d) has teleported to ( Shotgun )",zName,playerid);
       return 1;
    }
          case 6: //**MP5 Duel Zone**//
          {
       new player[24], tmp[256];
       GetPlayerName(playerid,player,sizeof(player));
       format(tmp,sizeof(tmp),"%s присоеденился к дуэль зоне MP5",player);
       SendClientMessageToAll(GREEN,tmp);
          new zName[MAX_PLAYER_NAME];
       GetPlayerName(playerid, zName, sizeof(zName));
       SetPlayerInterior(playerid, 0);
       new c = random(4);
       if (c == 0) {
             SetPlayerPos(playerid, -2818.239501,1134.118286,26.110563);}
             else if (c == 1){
             SetPlayerPos(playerid, -2778.716552,1150.354980,29.904952);}
             else if (c == 2){
             SetPlayerPos(playerid, -2799.968017,1185.282836,20.273437);}
             else if (c == 3){
             SetPlayerPos(playerid, -2817.962646,1145.815917,20.3738112);}
             ResetPlayerWeapons(playerid);
       GivePlayerWeapon(playerid, 29, 11111); // MP5
       TogglePlayerControllable(playerid,true);
       SendClientMessage(playerid,GREEN,"Вы присоеденились к дуэль зоне MP5");
       printf("[DZ] %s (ID: %d) has teleported to ( MP5 )",zName,playerid);
       return 1;
    }
          case 7: //**Uzi Duel Zone**//
          {
          new player[24], tmp[256];
       GetPlayerName(playerid,player,sizeof(player));
       format(tmp,sizeof(tmp),"%s has entered on the Uzi",player);
       SendClientMessageToAll(GREEN,tmp);
             new zName[MAX_PLAYER_NAME];
       GetPlayerName(playerid, zName, sizeof(zName));
       SetPlayerInterior(playerid, 0);
             new c = random(4);
             if (c == 0){
             SetPlayerPos(playerid, 2628.627929,1228.832275,26.923290);}
             else if (c == 1){
             SetPlayerPos(playerid, 2628.647949,1192.556884,26.922216);}
             else if (c == 2){
             SetPlayerPos(playerid, 2661.621826,1229.594116,26.923292);}
             else if (c == 3){
             SetPlayerPos(playerid, 2661.643789,1192.267333,26.921859);}
       ResetPlayerWeapons(playerid);
       GivePlayerWeapon(playerid, 28, 11111); // Uzi
       TogglePlayerControllable(playerid,true);
       SendClientMessage(playerid,BLUE,"Вы присоеденились к дуэль зоне uzi");
       printf("[WDZ] %s (ID: %d) has teleported to ( Uzi )",zName,playerid);
       return 1;
    }
    case 8: //**AK47 Duel Zone**//
          {
          new player[24], tmp[256];
       GetPlayerName(playerid,player,sizeof(player));
       format(tmp,sizeof(tmp),"%s присоеденился к дуэль зоне AK47",player);
       SendClientMessageToAll(GREEN,tmp);
          new zName[MAX_PLAYER_NAME];
       GetPlayerName(playerid, zName, sizeof(zName));
       SetPlayerInterior(playerid, 0);
             new c = random(5);
             if (c == 0){
             SetPlayerPos(playerid, 2070.718505,-1550.233032,13.428486);}
             else if (c == 1){
             SetPlayerPos(playerid, 2070.321044,-1595.366333,13.500619);}
             else if (c == 2){
             SetPlayerPos(playerid, 2098.228027,-1550.583496,13.383508);}
             else if (c == 3){
             SetPlayerPos(playerid, 2060.906250,-1582.170898,17.789062);}
             else if (c == 4){
             SetPlayerPos(playerid, 2080.327148,-1546.717407,17.789062);}
       ResetPlayerWeapons(playerid);
          GivePlayerWeapon(playerid, 30, 11111); // AK47
          TogglePlayerControllable(playerid,true);
       SendClientMessage(playerid,BLUE,"Вы присоеденились к дуэль зоне AK47 ");
       printf("[DZ] %s (ID: %d) has teleported to ( AK47 )",zName,playerid);
       return 1;
    }
          case 9: //**M4 Duel Zone**//
          {
          new player[24], tmp[256];
       GetPlayerName(playerid,player,sizeof(player));
       format(tmp,sizeof(tmp),"%s присоеденился к дуэль зоне M4",player);
             SendClientMessageToAll(GREEN,tmp);
             new zName[MAX_PLAYER_NAME];
       GetPlayerName(playerid, zName, sizeof(zName));
       SetPlayerInterior(playerid, 0);
             new c = random(5);
             if (c == 0){
             SetPlayerPos(playerid,  2123.739501,-2272.487304,20.671875);}
             else if (c == 1){
             SetPlayerPos(playerid, 2120.910156,-2271.814941,14.782807);}
             else if (c == 2){
             SetPlayerPos(playerid, 2168.552734, -2247.132080,20.158733);}
             else if (c == 3){
             SetPlayerPos(playerid, 2138.481201,-2290.223876,20.664632);}
             else if (c == 4){
             SetPlayerPos(playerid, 2167.020507, -2262.167968,13.304572);}
             ResetPlayerWeapons(playerid);
          GivePlayerWeapon(playerid, 31, 11111); // M4
          TogglePlayerControllable(playerid,true);
       SendClientMessage(playerid,BLUE,"Вы присоеденились к дуэль зоне M4");
       printf("[DZ] %s (ID: %d) has teleported to ( M4 )",zName,playerid);
       return 1;
          }
          case 10: //**Sniper Rifle Duel Zone**//
          {
          new player[24], tmp[256];
       GetPlayerName(playerid,player,sizeof(player));
          format(tmp,sizeof(tmp),"%s присоеденился к дуэль зоне Sniper",player);
       SendClientMessageToAll(GREEN,tmp);
          new zName[MAX_PLAYER_NAME];
       GetPlayerName(playerid, zName, sizeof(zName));
       SetPlayerInterior(playerid, 0);
       new c = random(7);
       if (c == 0) {
             SetPlayerPos(playerid, 167.8673,1850.9890,33.8984);}
             else if (c == 1){
             SetPlayerPos(playerid, 114.8195,1815.9338,33.8984);}
             else if (c == 2){
             SetPlayerPos(playerid, 163.3029,1930.9475,33.8984);}
             else if (c == 3){
             SetPlayerPos(playerid, 231.4988,1933.6074,33.8984);}
             else if (c == 4){
             SetPlayerPos(playerid, 265.4202,1893.3086,33.8984);}
             else if (c == 5){
             SetPlayerPos(playerid, 260.4896,1809.6788,33.8984);}
             else if (c == 6){
             SetPlayerPos(playerid, 105.7924,1900.5641,33.8984);}
             ResetPlayerWeapons(playerid);
       GivePlayerWeapon(playerid, 34, 11111); // Sniper
       TogglePlayerControllable(playerid,true);
       SendClientMessage(playerid,BLUE,"Вы присоеденились к дуэль зоне Sniper");
          printf("[DZ] %s (ID: %d) has teleported to ( Sniper )",zName,playerid);
       return 1;
          }
          case 11: //Country Rifle Duel Zone**//
          {
       new player[24], tmp[256];
       GetPlayerName(playerid,player,sizeof(player));
       format(tmp,sizeof(tmp),"%s Joined on the Country Rifle",player);
       SendClientMessageToAll(GREEN,tmp);
          new zName[MAX_PLAYER_NAME];
       GetPlayerName(playerid, zName, sizeof(zName));
       SetPlayerInterior(playerid, 0);
       new c = random(6);
       if (c == 0) {
             SetPlayerPos(playerid, -923.9097,-497.5644,26.7656);}
             else if (c == 1){
             SetPlayerPos(playerid, -939.9349,-535.3048,26.6574);}
             else if (c == 2){
             SetPlayerPos(playerid, -921.7430,-541.8849,25.9536);}
             else if (c == 3){
             SetPlayerPos(playerid, -954.1025,-523.7921,25.9536);}
             else if (c == 4){
             SetPlayerPos(playerid, -952.8724,-494.2319,25.9609);}
             else if (c == 5){
             SetPlayerPos(playerid, -967.1008,-508.3553,25.9536);}
             ResetPlayerWeapons(playerid);
       GivePlayerWeapon(playerid, 33, 11111); // Country Rifle
       TogglePlayerControllable(playerid,true);
       SendClientMessage(playerid,BLUE,"Вы присоеденились к дуэль зоне Country Rifle");
       printf("[DZ] %s (ID: %d) has teleported to ( CR )",zName,playerid);
       return 1;
          }
         }
  }


В OnPlayerCommandText:

Code
if(strcmp(cmdtext, "/vtcduel", true) == 0)
  {
      ShowMenuForPlayer(weaponduelzones, playerid);
      TogglePlayerControllable(playerid,false);
      return 1;
  }


Авторы:
vTc]Patroool (AKA) [vTc]Baskin : For Making
[qT]JoOkeR (AKA) Noob : Bug fixing


Перевод и оформление: ZioHik.
 
  • Страница 1 из 1
  • 1
Поиск:


Copyright www.SAMP-TEAM.com (c) 2009-2024
Правила использования материалов сайта

При копировании материалов из нашего сайта
ссылка на www.SAMP-TEAM.com обязательна!
Нарушители правил будут строго наказаны!

Хостинг от uCoz   
Для корректного просмотра мы рекомендуем Вам использовать браузер Google Chrome.
Яндекс.Метрика
Яндекс.Метрика