Advertisement
Frost12

Duel Command script

Sep 16th, 2015
3,316
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MagikSF 40.93 KB | None | 0 0
  1. #include <a_samp>
  2. #include <zcmd>
  3. #include <sscanf>
  4.  
  5. #define FILTERSCRIPT
  6. #define COLOR_MAGENTA                   0xFF00FFFF
  7. #define COLOR_AQUA                              0xF0F8FFAA
  8. #define COLOR_GREEN                     0x33AA33AA
  9.  
  10. #define DIALOG_DUELWEAPONS              429
  11. #define DIALOG_DUELWEAPONSTWO   430
  12. #define DIALOG_DUELROUNDS               431
  13.  
  14. forward DuelStart(playerid);
  15. forward DuelTimer(playerid);
  16. forward DelayedDuelSpawn(playerid);
  17. forward DuelbetEnd(playerid);
  18. forward UnnormalDuelend(playerid);
  19.  
  20. public OnFilterScriptInit()
  21. {
  22.         print("--- Duelsystem ---");
  23.         CreateObject(5791, 2807.30005, -1763.09998, 34.2, 0, 0, 0);
  24.         CreateObject(3452, 3394.56006, -1749.20007, 14, 0, 0, 90);
  25.         CreateObject(13607, 3358.3994, -1750, 11.8, 0, 0, 0);
  26.         CreateObject(3452, 3358, -1714.42004, 14, 0, 0, 179.995);
  27.         CreateObject(3453, 3388.2002, -1719.9004, 14, 0, 0, 90);
  28.         CreateObject(3453, 3328.69995, -1720.80005, 14, 0, 0, 180);
  29.         CreateObject(3453, 3389.0801, -1779.3994, 14, 0, 0, 0);
  30.         CreateObject(3452, 3359.77002, -1785.77002, 14, 0, 0, 0);
  31.         CreateObject(3452, 3323.21997, -1751.04004, 14, 0, 0, 270);
  32.         CreateObject(3453, 3329.5898, -1780.2988, 14, 0, 0, 270);
  33.         CreateObject(8572, 3376.0234, -1724.7446, 10.1506, 0, 0, 0);
  34.         CreateObject(8572, 3384.2329, -1768.0134, 10.1506, 0, 0, 270);
  35.         CreateObject(8572, 3340.9165, -1775.4479, 10.1598, 0, 0, 179.995);
  36.         CreateObject(8572, 3333.5444, -1732.9769, 10.1506, 0, 0, 90);
  37.         CreateObject(3095, 3342.2317, -1723.2845, 6.88609, 90, 0, 0);
  38.         CreateObject(3095, 3351.2288, -1723.2832, 6.88609, 90, 0, 0);
  39.         CreateObject(3095, 3360.2168, -1723.2844, 6.88609, 90, 0, 0);
  40.         CreateObject(3095, 3369.2134, -1723.2875, 6.88609, 90, 0, 0);
  41.         CreateObject(3095, 3375.531, -1723.2854, 6.88609, 90, 0, 0);
  42.         CreateObject(3095, 3385.7004, -1733.4332, 6.88609, 90, 0, 270);
  43.         CreateObject(3095, 3385.7007, -1742.4258, 6.88609, 90, 0, 269.995);
  44.         CreateObject(3095, 3385.7019, -1751.4208, 6.88609, 90, 0, 269.995);
  45.         CreateObject(3095, 3385.6987, -1760.411, 6.88609, 90, 0, 269.995);
  46.         CreateObject(3095, 3385.7026, -1766.7291, 6.88609, 90, 0, 269.995);
  47.         CreateObject(3095, 3375.5408, -1776.9016, 6.88609, 90, 0, 180);
  48.         CreateObject(3095, 3375.541, -1776.9014, 6.88609, 90, 0, 179.995);
  49.         CreateObject(3095, 3366.561, -1776.9048, 6.88609, 90, 0, 179.995);
  50.         CreateObject(3095, 3357.593, -1776.901, 6.88609, 90, 0, 179.995);
  51.         CreateObject(3095, 3348.6008, -1776.9082, 6.88609, 90, 0, 179.995);
  52.         CreateObject(3095, 3342.2478, -1776.9099, 6.88609, 90, 0, 179.995);
  53.         CreateObject(3095, 3332.0815, -1766.7762, 6.88609, 90, 0, 90);
  54.         CreateObject(3095, 3332.084, -1757.7804, 6.88609, 90, 0, 90);
  55.         CreateObject(3095, 3332.084, -1748.7902, 6.88609, 90, 0, 90);
  56.         CreateObject(3095, 3332.0813, -1739.7958, 6.88609, 90, 0, 90);
  57.         CreateObject(3095, 3332.0747, -1733.4602, 6.88609, 90, 0, 90);
  58.         CreateObject(3095, 3383.7539, -1774.3701, 6.37089, 90, 0, 225);
  59.         CreateObject(3095, 3384.5127, -1774.2695, 6.37089, 90, 0, 248);
  60.         CreateObject(3095, 3382.7236, -1775.8574, 6.37089, 90, 0, 201.995);
  61.         CreateObject(3095, 3333.9805, -1774.3906, 6.36629, 90, 0, 135);
  62.         CreateObject(3095, 3335.4199, -1776.0186, 6.36629, 90, 0, 158);
  63.         CreateObject(3095, 3332.8809, -1773.335, 6.36629, 90, 0, 111.995);
  64.         CreateObject(3095, 3333.9707, -1725.9053, 6.37089, 90, 0, 44.995);
  65.         CreateObject(3095, 3335.3193, -1724.2227, 6.37089, 90, 0, 21.995);
  66.         CreateObject(3095, 3333.0635, -1726.5205, 6.37089, 90, 0, 66.995);
  67.         CreateObject(3095, 3383.6084, -1725.66406, 6.37089, 90, 0, 315);
  68.         CreateObject(3095, 3384.1719, -1725.2324, 6.37089, 90, 0, 293);
  69.         CreateObject(3095, 3381.4678, -1723.8301, 6.37089, 90, 0, 338);
  70.         CreateObject(2395, 3385.6082, -1770.8044, 10.89134, 0, 90, 248);
  71.         CreateObject(2395, 3384.7749, -1772.9844, 10.89134, 0, 90, 225);
  72.         CreateObject(2395, 3382.1633, -1775.7682, 10.89134, 0, 90, 202);
  73.         CreateObject(2395, 3383.5215, -1774.2402, 10.89134, 0, 90, 225);
  74.         CreateObject(2395, 3338.1655, -1776.8087, 10.89134, 0, 90, 158);
  75.         CreateObject(2395, 3336.0039, -1775.9884, 10.89134, 0, 90, 135);
  76.         CreateObject(2395, 3334.9548, -1774.9421, 10.89134, 0, 90, 135);
  77.         CreateObject(2395, 3333.2173, -1773.3767, 10.89134, 0, 90, 112);
  78.         CreateObject(2395, 3332.177, -1729.3234, 10.89134, 0, 90, 67);
  79.         CreateObject(2395, 3333.0676, -1727.174, 10.89134, 0, 90, 45);
  80.         CreateObject(2395, 3334.0354, -1726.2052, 10.89134, 0, 90, 45);
  81.         CreateObject(2395, 3335.6382, -1724.4154, 10.89134, 0, 90, 22);
  82.         CreateObject(2395, 3379.6348, -1723.3929, 10.89134, 0, 90, 338);
  83.         CreateObject(2395, 3381.7717, -1724.2012, 10.89134, 0, 90, 315);
  84.         CreateObject(2395, 3382.8872, -1725.3167, 10.89134, 0, 90, 314.995);
  85.         CreateObject(2395, 3384.5247, -1726.7509, 10.89134, 0, 90, 293);
  86.         return 1;
  87. }
  88.  
  89. new Duel[MAX_PLAYERS],
  90.         DuelEndTimer[MAX_PLAYERS],
  91.         Duelmaker[MAX_PLAYERS],
  92.         Duelopponent[MAX_PLAYERS],
  93.         Gotrequest[MAX_PLAYERS],
  94.         Maderequest[MAX_PLAYERS],
  95.         Duelbet[MAX_PLAYERS],
  96.         DuelbetPlayer[MAX_PLAYERS],
  97.         DuelbetEnabled[MAX_PLAYERS],
  98.         UnDuelend[MAX_PLAYERS],
  99.         Duelrounds[MAX_PLAYERS],
  100.         Duelwins[MAX_PLAYERS],
  101.         Duelweap1[MAX_PLAYERS],
  102.         Duelweap2[MAX_PLAYERS],
  103.         bool:DuelToggle;
  104.        
  105. //------------------------------------------------------------------------------
  106.  
  107. CMD:duel(playerid,params[])
  108. {
  109.     new PID;
  110.     if(DuelToggle == true)return SendClientMessage(playerid,COLOR_GREEN,"SERVER: You're not allowed to use this command.");
  111.         if(sscanf(params,"u",PID))return SendClientMessage(playerid,COLOR_GREEN,"/duel [id]");
  112.         if(!IsPlayerConnected(PID)) return SendClientMessage(playerid,COLOR_GREEN,"SERVER: There is no player with this id.");
  113.     if(Duel[playerid] >=1) return SendClientMessage(playerid,COLOR_GREEN,"SERVER: You're already in a duel.");
  114.         {
  115.                 if(Duel[PID] >=1)
  116.                 {
  117.                         SendClientMessage(playerid,COLOR_MAGENTA,"* This player is already in a duel.");
  118.                 }
  119.                 else
  120.                 {
  121.             if(PID == playerid) return SendClientMessage(playerid,COLOR_GREEN,"SERVER: You can't duel yourself.");
  122.                         Duelmaker[PID] = playerid;
  123.                         Duelopponent[playerid] = PID;
  124.                         Gotrequest[PID] = 1;
  125.                         Maderequest[playerid] = 1;
  126.                         ShowPlayerDialog(playerid, DIALOG_DUELWEAPONS, DIALOG_STYLE_LIST, "{FF00FF}First Duelweapon","{F0F8FF}Desert Eagle\n{F0F8FF}Shotgun\n{F0F8FF}Sawnoff Shotgun\n{F0F8FF}Combat Shotgun\n{F0F8FF}Micro SMG\n{F0F8FF}MP5\n{F0F8FF}AK-47\n{F0F8FF}M4\n{F0F8FF}Tec-9\n{F0F8FF}Country Rifle\n{F0F8FF}Sniper Rifle\n{F0F8FF}Fist\n{F0F8FF}Knife\n{F0F8FF}Katana\n{F0F8FF}Chainsaw\n{F0F8FF}Colt\n{F0F8FF}Silenced 9mm","Okey","");
  127.                 }
  128.         }
  129.         return 1;
  130. }
  131.  
  132. CMD:accept(playerid,params[])
  133. {
  134.         new PID = Duelmaker[playerid];
  135.         if(Duel[playerid] ==0) return SendClientMessage(playerid,COLOR_MAGENTA,"* You're not invited for a duel.");
  136.         if(Gotrequest[playerid]==1)
  137.         if(IsPlayerConnected(PID))
  138.         {
  139.                 if(Duel[PID] ==1)
  140.                 {
  141.                         new string[150],Weaponname[32],Weaponname2[32];
  142.                         ResetPlayerWeapons(PID);
  143.                         ResetPlayerWeapons(playerid);
  144.                         GetWeaponName(Duelweap1[PID],Weaponname,32);
  145.                         GetWeaponName(Duelweap2[PID],Weaponname2,32);
  146.                         format(string,sizeof(string),"DUEL: {F0F8FF}%s {FF00FF}vs {F0F8FF}%s. {FF00FF}Weapons: {F0F8FF}%s, %s {FF00FF}Rounds: {F0F8FF}%d",PlayerName(playerid),PlayerName(PID),Weaponname,Weaponname2,Duelrounds[PID]);
  147.                         SendClientMessageToAll(COLOR_MAGENTA,string);
  148.                         SendClientMessageToAll(COLOR_AQUA,"DUEL: You can use now /duelbet [id] [amount] for this duel.");
  149.                         SendClientMessage(PID,COLOR_MAGENTA,"* Your duelrequest has been accepted.");
  150.                         SendClientMessage(playerid,COLOR_MAGENTA,"* You accepted the duelrequest.");
  151.             SetPlayerFacingAngle(PID,135);
  152.                         SetPlayerPos(PID,3374.6348,-1734.9648,9.2609);
  153.                         SetCameraBehindPlayer(PID);
  154.                         SetPlayerFacingAngle(playerid,-45);
  155.                         SetPlayerPos(playerid,3341.7039,-1766.2764,9.2609);
  156.                         SetCameraBehindPlayer(playerid);
  157.                     SetPlayerVirtualWorld(playerid,PID);
  158.                     SetPlayerVirtualWorld(PID,PID);
  159.                     Duel[PID] = 3;
  160.                     Duel[playerid] = 2;
  161.                         GivePlayerWeapon(PID,Duelweap1[PID],2000);
  162.                         GivePlayerWeapon(playerid,Duelweap1[playerid],2000);
  163.                         GivePlayerWeapon(PID,Duelweap2[PID],2000);
  164.                         GivePlayerWeapon(playerid,Duelweap2[playerid],2000);
  165.                         TogglePlayerControllable(PID,0);
  166.                         TogglePlayerControllable(playerid,0);
  167.                         SetPlayerArmour(PID,100);
  168.                         SetPlayerHealth(PID,100);
  169.                         SetPlayerArmour(playerid,100);
  170.                         SetPlayerHealth(playerid,100);
  171.                         SetTimerEx("DuelStart",5000,false,"i",PID);
  172.                         SetTimerEx("DuelStart",5000,false,"i",playerid);
  173.                         GameTextForPlayer(PID,"~g~Ready, Steady",5000,4);
  174.                         GameTextForPlayer(playerid,"~g~Ready, Steady",5000,4);
  175.                         DuelbetEnabled[PID] = 1;
  176.                         DuelbetEnabled[playerid] = 1;
  177.                         SetTimerEx("DuelbetEnd",10000,false,"i",PID);
  178.                         SetTimerEx("DuelbetEnd",10000,false,"i",playerid);
  179.                         KillTimer(DuelEndTimer[playerid]);
  180.                         KillTimer(DuelEndTimer[PID]);
  181.                         UnDuelend[PID] = SetTimerEx("UnnormalDuelend",80000,false,"i",PID);//Here you can change the time after which the duel
  182.                         UnDuelend[playerid] = SetTimerEx("UnnormalDuelend",80000,false,"i",playerid);//will end when noone was killed.(Or when one went afk)
  183.                 }
  184.         }
  185.         return 1;
  186. }
  187.  
  188. CMD:cancel(playerid,params[])
  189. {
  190.     new PID = Duelmaker[playerid];
  191.         if(Duel[playerid] ==0) return SendClientMessage(playerid,COLOR_MAGENTA,"* You're not invited for a duel.");
  192.         if(Gotrequest[playerid]==1)
  193.         if(IsPlayerConnected(PID))
  194.         {
  195.                 if(Duel[PID] ==1)
  196.                 {
  197.                         SendClientMessage(PID,COLOR_MAGENTA,"* Your duelrequest has been denied.");
  198.                     Duel[PID] = 0;
  199.                     SendClientMessage(playerid,COLOR_MAGENTA,"* You denied the duelrequest.");
  200.                     Duel[playerid] = 0;
  201.                     KillTimer(DuelEndTimer[playerid]);
  202.                     KillTimer(DuelEndTimer[PID]);
  203.                 }
  204.         }
  205.         return 1;
  206. }
  207.  
  208. //------------------------------------------------------------------------------
  209.  
  210. CMD:toggleduel(playerid,params[])
  211. {
  212.         if(!IsPlayerAdmin(playerid))return SendClientMessage(playerid,COLOR_GREEN,"You are not allowed to use this command!");
  213.         if(DuelToggle == false)
  214.         {
  215.             DuelToggle = true;
  216.                 SendClientMessage(playerid,COLOR_MAGENTA,"DUEL: You disabled the duelrequests.");
  217.         }
  218.         else if(DuelToggle == true)
  219.         {
  220.             DuelToggle = false;
  221.                 SendClientMessage(playerid,COLOR_MAGENTA,"DUEL: You enabled the duelrequests.");
  222.         }
  223.         return 1;
  224. }
  225.  
  226. CMD:duellist(playerid,params[])
  227. {
  228.         new count,string[160];
  229.         SendClientMessage(playerid,COLOR_MAGENTA," --> Running Duels:");
  230.         for(new i=0;i<MAX_PLAYERS;i++)
  231.         if(IsPlayerConnected(i))
  232.         {
  233.                 if(Duel[i] ==2)
  234.                 {
  235.                         new PID=Duelmaker[i],Weaponname[32],Weaponname2[32];
  236.                         GetWeaponName(Duelweap1[PID],Weaponname,32);
  237.                         GetWeaponName(Duelweap2[PID],Weaponname2,32);
  238.                         format(string,sizeof(string)," -> {F0F8FF}%s {FF00FF}vs {F0F8FF}%s{FF00FF} Weapons:{F0F8FF} %s, %s {FF00FF}Rounds:{F0F8FF} %i",PlayerName(i),PlayerName(PID),Weaponname,Weaponname2,Duelrounds[PID]);
  239.                         SendClientMessage(playerid,COLOR_MAGENTA,string);
  240.                         count++;
  241.                 }
  242.  
  243.         }
  244.         if(count==0)
  245.         {
  246.                 SendClientMessage(playerid,COLOR_AQUA,"* Currently there aren't any duels running.");
  247.         }
  248.         return 1;
  249. }
  250.  
  251. CMD:duelhelp(playerid,params[])
  252. {
  253.         SendClientMessage(playerid,COLOR_MAGENTA,"-------------------------------------------------------------------");
  254.         SendClientMessage(playerid,COLOR_MAGENTA," --> Duelhelp:");
  255.         SendClientMessage(playerid,COLOR_AQUA," * /duel [id]  - /accept  - /cancel");
  256.         SendClientMessage(playerid,COLOR_AQUA," * /duelbet [id] [amount]  - /duellist  - /endduel  - /toggleduel");
  257.         SendClientMessage(playerid,COLOR_MAGENTA,"-------------------------------------------------------------------");
  258.         return 1;
  259. }
  260.  
  261. CMD:endduel(playerid,params[])
  262. {
  263.         if(Duel[playerid] <2) return SendClientMessage(playerid,COLOR_GREEN,"SERVER: You're not in a duel.");
  264.         if(Maderequest[playerid] == 1)
  265.     {
  266.                 new string[150];
  267.                 new PID = Duelopponent[playerid];
  268.                 Duelrounds[playerid] = 0;
  269.                 Duelrounds[PID] = 0;
  270.                 Duel[playerid] = 0;
  271.                 Duel[PID] = 0;
  272.                 SetPlayerVirtualWorld(playerid,0);
  273.                 SetPlayerVirtualWorld(PID,0);
  274.                 Maderequest[playerid] = 0;
  275.                 SpawnPlayer(playerid);
  276.                 SpawnPlayer(PID);
  277.                 format(string,sizeof(string),"DUEL: {F0F8FF}%s {FF00FF}has won the duel against {F0F8FF}%s{FF00FF}. Reason: {F0F8FF}Cancelled by %s ",PlayerName(PID),PlayerName(playerid),PlayerName(playerid));
  278.                 SendClientMessageToAll(COLOR_MAGENTA,string);
  279.                 GivePlayerMoney(playerid, - 5000);//Here you can change the amount the /endduel cmd costs.
  280.                 KillTimer(UnDuelend[playerid]);
  281.                 KillTimer(UnDuelend[PID]);
  282.         }
  283.         else if(Gotrequest[playerid] == 1)
  284.         {
  285.                 new string2[150];
  286.                 new PID = Duelmaker[playerid];
  287.                 Duelrounds[playerid] = 0;
  288.                 Duelrounds[PID] = 0;
  289.                 Duel[playerid] = 0;
  290.                 Duel[PID] = 0;
  291.                 SetPlayerVirtualWorld(playerid,0);
  292.                 SetPlayerVirtualWorld(PID,0);
  293.                 Gotrequest[playerid] = 0;
  294.                 SpawnPlayer(playerid);
  295.                 SpawnPlayer(PID);
  296.                 format(string2,sizeof(string2),"DUEL: {F0F8FF}%s {FF00FF}has won the duel against {F0F8FF}%s{FF00FF}. Reason: {F0F8FF}Cancelled by %s ",PlayerName(PID),PlayerName(playerid),PlayerName(playerid));
  297.                 SendClientMessageToAll(COLOR_MAGENTA,string2);
  298.                 GivePlayerMoney(playerid, - 5000);//Here you can change the amount the /endduel cmd costs.
  299.                 KillTimer(UnDuelend[playerid]);
  300.                 KillTimer(UnDuelend[PID]);
  301.         }
  302.         return 1;
  303. }
  304.  
  305. //------------------------------------------------------------------------------
  306.  
  307. CMD:duelbet(playerid,params[])
  308. {
  309.         new PID,amount;
  310.         if(sscanf(params,"ui",PID,amount)) return SendClientMessage(playerid,COLOR_GREEN,"/duelbet [id] [amount]");
  311.         //if(Duel[playerid]>=1) return SendClientMessage(playerid,COLOR_GREEN,"SERVER: You can't bet while being in a duel.");
  312.         if(Duel[PID]<2) return SendClientMessage(playerid,COLOR_GREEN,"SERVER: This player isn't in a duel.");
  313.         if(DuelbetEnabled[PID] == 0) return SendClientMessage(playerid,COLOR_GREEN,"SERVER: The bet time for this duel is over.");
  314.         if(amount<1000 || amount>100000) return SendClientMessage(playerid,COLOR_GREEN,"SERVER: The duelbet amount need to be between $1,000 and $100,000");
  315.         if(GetPlayerMoney(playerid) < 0) return SendClientMessage(playerid,COLOR_GREEN,"SERVER: You don't have enough money.");
  316.         if(Duelbet[playerid] > 0)
  317.         {
  318.             SendClientMessage(playerid,COLOR_GREEN,"SERVER: You already placed a bet on a duel.");
  319.         }
  320.         else
  321.         {
  322.                 new string[128];
  323.                 DuelbetPlayer[playerid] = PID;
  324.                 Duelbet[playerid] = amount;
  325.             GivePlayerMoney(playerid, - amount);
  326.             format(string,sizeof(string),"* You have placed a bet of %i on %s.",amount,PlayerName(PID));
  327.             SendClientMessage(playerid,COLOR_AQUA,string);
  328.         }
  329.         return 1;
  330. }
  331.  
  332. //------------------------------------------------------------------------------
  333.  
  334. public OnPlayerDisconnect(playerid)
  335. {
  336.         if(Duel[playerid] >=2)
  337.         {
  338.         if(Maderequest[playerid] == 1)
  339.         {
  340.                         new PID = Duelopponent[playerid];
  341.                         SpawnPlayer(PID);
  342.                         KillTimer(UnDuelend[playerid]);
  343.                         KillTimer(UnDuelend[PID]);
  344.                         Duel[PID] = 0;
  345.                         Duelrounds[PID] = 0;
  346.                 }
  347.                 else if(Gotrequest[playerid] == 1)
  348.         {
  349.                 new PID = Duelmaker[playerid];
  350.                         SpawnPlayer(PID);
  351.                         KillTimer(UnDuelend[playerid]);
  352.                         KillTimer(UnDuelend[PID]);
  353.                         Duel[PID] = 0;
  354.                         Duelrounds[PID] = 0;
  355.                 }
  356.         }
  357.         DuelEndTimer[playerid] = 0;
  358.         Duelmaker[playerid] = 0;
  359.         Duelopponent[playerid] = 0;
  360.         Gotrequest[playerid] = 0;
  361.         Maderequest[playerid] = 0;
  362.         Duelbet[playerid] = 0;
  363.         DuelbetPlayer[playerid] = 0;
  364.         DuelbetEnabled[playerid] = 0;
  365.         Duel[playerid] = 0;
  366.         Duelrounds[playerid] = 0;
  367.         Duelweap1[playerid] = 0;
  368.         Duelweap2[playerid] = 0;
  369.         return 1;
  370. }
  371.  
  372. //------------------------------------------------------------------------------
  373.  
  374. public DelayedDuelSpawn(playerid)
  375. {
  376.     if(Maderequest[playerid] == 1)
  377.     {
  378.                 new string[150],Weaponname[32],Weaponname2[32];
  379.                 new PID = Duelopponent[playerid];
  380.             ResetPlayerWeapons(PID);
  381.                 ResetPlayerWeapons(playerid);
  382.                 GetWeaponName(Duelweap1[playerid],Weaponname,32);
  383.                 GetWeaponName(Duelweap2[playerid],Weaponname2,32);
  384.                 format(string,sizeof(string),"DUEL: {F0F8FF}%s {FF00FF}vs {F0F8FF}%s. {FF00FF}Weapons: {F0F8FF}%s, %s {FF00FF}Round: {F0F8FF}%i",PlayerName(playerid),PlayerName(PID),Weaponname,Weaponname2,Duelrounds[playerid]);
  385.                 SendClientMessageToAll(COLOR_MAGENTA,string);
  386.                 SendClientMessageToAll(COLOR_AQUA,"DUEL: You can use now /duelbet [id] [amount] for this duel.");
  387.                 SetPlayerFacingAngle(PID,135);
  388.                 SetPlayerPos(PID,3374.6348,-1734.9648,9.2609);
  389.                 SetCameraBehindPlayer(PID);
  390.                 SetPlayerFacingAngle(playerid,-45);
  391.                 SetPlayerPos(playerid,3341.7039,-1766.2764,9.2609);
  392.                 SetCameraBehindPlayer(playerid);
  393.             SetPlayerVirtualWorld(playerid,PID);
  394.             SetPlayerVirtualWorld(PID,PID);
  395.             GivePlayerWeapon(PID,Duelweap1[PID],2000);
  396.                 GivePlayerWeapon(playerid,Duelweap1[playerid],2000);
  397.                 GivePlayerWeapon(PID,Duelweap2[PID],2000);
  398.                 GivePlayerWeapon(playerid,Duelweap2[playerid],2000);
  399.                 TogglePlayerControllable(PID,0);
  400.                 TogglePlayerControllable(playerid,0);
  401.                 SetPlayerArmour(PID,100);
  402.                 SetPlayerHealth(PID,100);
  403.                 SetPlayerArmour(playerid,100);
  404.                 SetPlayerHealth(playerid,100);
  405.                 SetTimerEx("DuelStart",5000,false,"i",PID);
  406.                 SetTimerEx("DuelStart",5000,false,"i",playerid);
  407.                 GameTextForPlayer(PID,"~g~Ready, Steady",5000,4);
  408.                 GameTextForPlayer(playerid,"~g~Ready, Steady",5000,4);
  409.                 DuelbetEnabled[PID] = 1;
  410.                 DuelbetEnabled[playerid] = 1;
  411.                 SetTimerEx("DuelbetEnd",10000,false,"i",PID);
  412.                 SetTimerEx("DuelbetEnd",10000,false,"i",playerid);
  413.                 UnDuelend[PID] = SetTimerEx("UnnormalDuelend",80000,false,"i",PID);//Here you can change the time after which the duel
  414.                 UnDuelend[playerid] = SetTimerEx("UnnormalDuelend",80000,false,"i",playerid);//will end when noone was killed.(Or when one went afk)
  415.         }
  416.         else if(Gotrequest[playerid] == 1)
  417.         {
  418.                 new string[150],Weaponname[32],Weaponname2[32];
  419.                 new PID = Duelmaker[playerid];
  420.                 ResetPlayerWeapons(PID);
  421.                 ResetPlayerWeapons(playerid);
  422.                 GetWeaponName(Duelweap1[playerid],Weaponname,32);
  423.                 GetWeaponName(Duelweap2[playerid],Weaponname2,32);
  424.                 format(string,sizeof(string),"DUEL: {F0F8FF}%s {FF00FF}vs {F0F8FF}%s. {FF00FF}Weapons: {F0F8FF}%s, %s {FF00FF}Round: {F0F8FF}%i",PlayerName(playerid),PlayerName(PID),Weaponname,Weaponname2,Duelrounds[playerid]);
  425.                 SendClientMessageToAll(COLOR_MAGENTA,string);
  426.                 SendClientMessageToAll(COLOR_AQUA,"DUEL: You can use now /duelbet [id] [amount] for this duel.");
  427.                 SetPlayerFacingAngle(PID,135);
  428.                 SetPlayerPos(PID,3374.6348,-1734.9648,9.2609);
  429.                 SetCameraBehindPlayer(PID);
  430.                 SetPlayerFacingAngle(playerid,-45);
  431.                 SetPlayerPos(playerid,3341.7039,-1766.2764,9.2609);
  432.                 SetCameraBehindPlayer(playerid);
  433.                 SetPlayerVirtualWorld(playerid,PID);
  434.                 SetPlayerVirtualWorld(PID,PID);
  435.                 GivePlayerWeapon(PID,Duelweap1[PID],2000);
  436.                 GivePlayerWeapon(playerid,Duelweap1[playerid],2000);
  437.                 GivePlayerWeapon(PID,Duelweap2[PID],2000);
  438.                 GivePlayerWeapon(playerid,Duelweap2[playerid],2000);
  439.                 TogglePlayerControllable(PID,0);
  440.                 TogglePlayerControllable(playerid,0);
  441.                 SetPlayerArmour(PID,100);
  442.                 SetPlayerHealth(PID,100);
  443.                 SetPlayerArmour(playerid,100);
  444.                 SetPlayerHealth(playerid,100);
  445.                 SetTimerEx("DuelStart",5000,false,"i",PID);
  446.                 SetTimerEx("DuelStart",5000,false,"i",playerid);
  447.                 GameTextForPlayer(PID,"~g~Ready, Steady",5000,4);
  448.                 GameTextForPlayer(playerid,"~g~Ready, Steady",5000,4);
  449.                 DuelbetEnabled[PID] = 1;
  450.                 DuelbetEnabled[playerid] = 1;
  451.                 SetTimerEx("DuelbetEnd",10000,false,"i",PID);
  452.                 SetTimerEx("DuelbetEnd",10000,false,"i",playerid);
  453.                 UnDuelend[PID] = SetTimerEx("UnnormalDuelend",80000,false,"i",PID);//Here you can change the time after which the duel
  454.                 UnDuelend[playerid] = SetTimerEx("UnnormalDuelend",80000,false,"i",playerid);//will end when noone was killed.(Or when one went afk)
  455.         }
  456.         return 1;
  457. }
  458.  
  459. public OnPlayerSpawn(playerid)
  460. {
  461.         if(Duel[playerid] >=2)
  462.         {
  463.         if(Duelrounds[playerid] >0)
  464.                 {
  465.             SetTimerEx("DelayedDuelSpawn",2000,false,"i",playerid);//Change the "2000" to the spawndelaytime you want. I recommend 2 seconds as a minimum.
  466.                 }
  467.         }
  468.         return 1;
  469. }
  470.  
  471. //------------------------------------------------------------------------------
  472.  
  473. public OnPlayerDeath(playerid, killerid, reason)
  474. {
  475.         if(Duel[killerid] >=2 && Duel[playerid] >=2)
  476.         {
  477.                 if(Duelrounds[playerid] <=1)
  478.             {
  479.                         if(Duel[playerid] >=2)
  480.                         {
  481.                                 Duel[playerid] = 0;
  482.                         SetPlayerVirtualWorld(playerid,0);
  483.                         Gotrequest[playerid] = 0;
  484.                         Maderequest[playerid] = 0;
  485.                         KillTimer(UnDuelend[playerid]);
  486.                         }
  487.                 }
  488.                 if(Duelrounds[playerid] >1)
  489.                 {
  490.                         Duelrounds[playerid] -= 1;
  491.                         KillTimer(UnDuelend[playerid]);
  492.                 }
  493.                 //Killerid
  494.             if(Duelrounds[killerid] <=1)
  495.                 {
  496.                         if(Duel[killerid] >=2)
  497.                         {
  498.                     Gotrequest[killerid] = 0;
  499.                         Maderequest[killerid] = 0;
  500.                                 Duelwins[killerid] += 1;
  501.                                 SetPlayerVirtualWorld(killerid,0);
  502.                                 Duel[killerid] = 0;
  503.                                 new string[160],string2[128];
  504.                                 new Weaponname[32],Weaponname2[32];
  505.                                 GetWeaponName(Duelweap1[playerid],Weaponname,32);
  506.                                 GetWeaponName(Duelweap2[playerid],Weaponname2,32);
  507.                         format(string,sizeof(string),"DUEL: {F0F8FF}%s {FF00FF}has won the last round against {F0F8FF}%s.{FF00FF} Weapons: {F0F8FF}%s, %s",PlayerName(killerid),PlayerName(playerid),Weaponname,Weaponname2);
  508.                                 format(string2,sizeof(string2),"-> Final Result: %s {F0F8FF}%i:%i {FF00FF}%s",PlayerName(killerid),Duelwins[killerid],Duelwins[playerid],PlayerName(playerid));
  509.                                 SendClientMessageToAll(COLOR_MAGENTA,string);
  510.                                 SendClientMessageToAll(COLOR_MAGENTA,string2);
  511.                                 SendClientMessage(killerid,COLOR_AQUA,"* You won the last round and received a reward. Congratulation.");
  512.                         GivePlayerMoney(killerid,5000);//This amount will the duelwinner receive. Change it to your prefered amount.
  513.                                 SpawnPlayer(killerid);
  514.                                 KillTimer(UnDuelend[killerid]);
  515.                         }
  516.                 }
  517.                 if(Duelrounds[killerid] >1)
  518.                 {
  519.                         new string[160];
  520.                         Duelwins[killerid] += 1;
  521.                         Duelrounds[killerid] -= 1;
  522.                         new Weaponname[32],Weaponname2[32];
  523.                         GetWeaponName(Duelweap1[playerid],Weaponname,32);
  524.                         GetWeaponName(Duelweap2[playerid],Weaponname2,32);
  525.                 format(string,sizeof(string),"DUEL: {F0F8FF}%s {FF00FF}has won the duel against {F0F8FF}%s.{FF00FF} Weapons: {F0F8FF}%s, %s",PlayerName(killerid),PlayerName(playerid),Weaponname,Weaponname2);
  526.                 SendClientMessageToAll(COLOR_MAGENTA,string);
  527.                 SendClientMessage(killerid,COLOR_AQUA,"* You won this round and received a reward. Congratulation.");
  528.                         GivePlayerMoney(killerid,5000);//Same like above. This is the reward the duelwinner will receive.
  529.             KillTimer(UnDuelend[killerid]);
  530.                 }
  531.                 for(new i = 0; i < MAX_PLAYERS; i++)
  532.                 {
  533.                         if(Duelbet[i]>0)
  534.                         {
  535.                                 if(DuelbetPlayer[i] == killerid)
  536.                                 {
  537.                                         new string[128];
  538.                                         format(string,sizeof(string),"* You won %i from your duelbet.",Duelbet[i] * 2);
  539.                                         SendClientMessage(i,COLOR_AQUA,string);
  540.                                         GivePlayerMoney(i,Duelbet[i] * 2);
  541.                                         Duelbet[i] = 0;
  542.                                 }
  543.                                 else
  544.                                 {
  545.                                     SendClientMessage(i,COLOR_AQUA,"* Your duelbet were wrong. Good luck next time.");
  546.                                     Duelbet[i] = 0;
  547.                                 }
  548.                         }
  549.                 }
  550.         }
  551.     if(Duel[killerid] >=2 && Duel[playerid] <2)
  552.     {
  553.         if(Gotrequest[killerid] == 1)
  554.         {
  555.                 new PID = Duelmaker[killerid];
  556.                 Gotrequest[killerid] = 0;
  557.                     Maderequest[PID] = 0;
  558.                         SetPlayerVirtualWorld(killerid,0);
  559.                         Duel[killerid] = 0;
  560.                         Duelrounds[killerid] = 0;
  561.                         SetPlayerVirtualWorld(PID,0);
  562.                         Duel[PID] = 0;
  563.                         Duelrounds[PID] = 0;
  564.                         SendClientMessage(killerid,COLOR_MAGENTA,"* The duel ended due to some issues.");
  565.                         SendClientMessage(PID,COLOR_MAGENTA,"* The duel ended due to some issues.");
  566.                         SpawnPlayer(killerid);
  567.                         SpawnPlayer(PID);
  568.                         KillTimer(UnDuelend[killerid]);
  569.                         KillTimer(UnDuelend[PID]);
  570.         }
  571.         if(Maderequest[killerid] == 1)
  572.         {
  573.                 new PID = Duelopponent[killerid];
  574.                 Maderequest[killerid] = 0;
  575.                     Gotrequest[PID] = 0;
  576.                         SetPlayerVirtualWorld(killerid,0);
  577.                         Duel[killerid] = 0;
  578.                         Duelrounds[killerid] = 0;
  579.                         SetPlayerVirtualWorld(PID,0);
  580.                         Duel[PID] = 0;
  581.                         Duelrounds[PID] = 0;
  582.                         SendClientMessage(killerid,COLOR_MAGENTA,"* The duel ended due to some issues.");
  583.                         SendClientMessage(PID,COLOR_MAGENTA,"* The duel ended due to some issues.");
  584.                         SpawnPlayer(killerid);
  585.                         SpawnPlayer(PID);
  586.                         KillTimer(UnDuelend[killerid]);
  587.                         KillTimer(UnDuelend[PID]);
  588.         }
  589.     }
  590.     if(Duel[killerid] <2 && Duel[playerid] >=2)
  591.     {
  592.         if(Gotrequest[playerid] == 1)
  593.         {
  594.                 new PID = Duelmaker[playerid];
  595.                 Gotrequest[playerid] = 0;
  596.                     Maderequest[PID] = 0;
  597.                         SetPlayerVirtualWorld(playerid,0);
  598.                         Duel[playerid] = 0;
  599.                         Duelrounds[playerid] = 0;
  600.                         SetPlayerVirtualWorld(PID,0);
  601.                         Duel[PID] = 0;
  602.                         Duelrounds[PID] = 0;
  603.                         SendClientMessage(playerid,COLOR_MAGENTA,"* The duel ended due to some issues.");
  604.                         SendClientMessage(PID,COLOR_MAGENTA,"* The duel ended due to some issues.");
  605.                         SpawnPlayer(playerid);
  606.                         SpawnPlayer(PID);
  607.                         KillTimer(UnDuelend[playerid]);
  608.                         KillTimer(UnDuelend[PID]);
  609.         }
  610.         if(Maderequest[playerid] == 1)
  611.         {
  612.                 new PID = Duelopponent[playerid];
  613.                 Maderequest[playerid] = 0;
  614.                     Gotrequest[PID] = 0;
  615.                         SetPlayerVirtualWorld(playerid,0);
  616.                         Duel[playerid] = 0;
  617.                         Duelrounds[playerid] = 0;
  618.                         SetPlayerVirtualWorld(PID,0);
  619.                         Duel[PID] = 0;
  620.                         Duelrounds[PID] = 0;
  621.                         SendClientMessage(playerid,COLOR_MAGENTA,"* The duel ended due to some issues.");
  622.                         SendClientMessage(PID,COLOR_MAGENTA,"* The duel ended due to some issues.");
  623.                         SpawnPlayer(playerid);
  624.                         SpawnPlayer(PID);
  625.                         KillTimer(UnDuelend[playerid]);
  626.                         KillTimer(UnDuelend[PID]);
  627.         }
  628.     }
  629.         return 1;
  630. }
  631.  
  632. //------------------------------------------------------------------------------
  633.  
  634. public DuelStart(playerid)
  635. {
  636.     TogglePlayerControllable(playerid,1);
  637.         GameTextForPlayer(playerid,"~b~GO GO GO",3000,4);
  638.         PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
  639. }
  640.  
  641. public DuelTimer(playerid)
  642. {
  643.     if(Duel[playerid] <2)
  644.     {
  645.                 Duel[playerid] = 0;
  646.                 SendClientMessage(playerid,COLOR_AQUA,"* The duelrequest has not been answered within 30 seconds, so it's declined.");
  647.         }
  648.         return 1;
  649. }
  650.  
  651. public DuelbetEnd(playerid)
  652. {
  653.         DuelbetEnabled[playerid] = 0;
  654.         return 1;
  655. }
  656.  
  657. public UnnormalDuelend(playerid)
  658. {
  659.     Maderequest[playerid] = 0;
  660.     Gotrequest[playerid] = 0;
  661.         SetPlayerVirtualWorld(playerid,0);
  662.         Duel[playerid] = 0;
  663.         Duelrounds[playerid] = 0;
  664.         SendClientMessage(playerid,COLOR_MAGENTA,"* The duel ended because it took to long.");
  665.         SpawnPlayer(playerid);
  666.         return 1;
  667. }
  668.  
  669. //------------------------------------------------------------------------------
  670.  
  671. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  672. {
  673.     if(dialogid == DIALOG_DUELWEAPONS)
  674.     {
  675.         if(response)
  676.         {
  677.                 switch(listitem)
  678.                 {
  679.                                 case 0: {
  680.                                 PrepareDuelWeapon(playerid,24);}
  681.                                 case 1: {
  682.                                 PrepareDuelWeapon(playerid,25);}
  683.                     case 2: {
  684.                                 PrepareDuelWeapon(playerid,26);}
  685.                     case 3: {
  686.                                 PrepareDuelWeapon(playerid,27);}
  687.                     case 4: {
  688.                                 PrepareDuelWeapon(playerid,28);}
  689.                     case 5: {
  690.                                 PrepareDuelWeapon(playerid,29);}
  691.                     case 6: {
  692.                                 PrepareDuelWeapon(playerid,30);}
  693.                     case 7: {
  694.                                 PrepareDuelWeapon(playerid,31);}
  695.                     case 8: {
  696.                                 PrepareDuelWeapon(playerid,32);}
  697.                     case 9: {
  698.                                 PrepareDuelWeapon(playerid,33);}
  699.                     case 10: {
  700.                                 PrepareDuelWeapon(playerid,34);}
  701.                     case 11: {
  702.                                 PrepareDuelWeapon(playerid,0);}
  703.                     case 12: {
  704.                                 PrepareDuelWeapon(playerid,4);}
  705.                     case 13: {
  706.                                 PrepareDuelWeapon(playerid,8);}
  707.                     case 14: {
  708.                                 PrepareDuelWeapon(playerid,9);}
  709.                     case 15: {
  710.                                 PrepareDuelWeapon(playerid,22);}
  711.                     case 16: {
  712.                                 PrepareDuelWeapon(playerid,23);}
  713.                 }
  714.         }
  715.         return 1;
  716.     }
  717.     if(dialogid == DIALOG_DUELWEAPONSTWO)
  718.     {
  719.         if(response)
  720.         {
  721.                 switch(listitem)
  722.                 {
  723.                 case 0: {
  724.                                 PrepareDuelWeapon2(playerid,24);}
  725.                                 case 1: {
  726.                                 PrepareDuelWeapon2(playerid,25);}
  727.                     case 2: {
  728.                                 PrepareDuelWeapon2(playerid,26);}
  729.                     case 3: {
  730.                                 PrepareDuelWeapon2(playerid,27);}
  731.                     case 4: {
  732.                                 PrepareDuelWeapon2(playerid,28);}
  733.                     case 5: {
  734.                                 PrepareDuelWeapon2(playerid,29);}
  735.                     case 6: {
  736.                                 PrepareDuelWeapon2(playerid,30);}
  737.                     case 7: {
  738.                                 PrepareDuelWeapon2(playerid,31);}
  739.                     case 8: {
  740.                                 PrepareDuelWeapon2(playerid,32);}
  741.                     case 9: {
  742.                                 PrepareDuelWeapon2(playerid,33);}
  743.                     case 10: {
  744.                                 PrepareDuelWeapon2(playerid,34);}
  745.                     case 11: {
  746.                                 PrepareDuelWeapon2(playerid,0);}
  747.                     case 12: {
  748.                                 PrepareDuelWeapon2(playerid,4);}
  749.                     case 13: {
  750.                                 PrepareDuelWeapon2(playerid,8);}
  751.                     case 14: {
  752.                                 PrepareDuelWeapon2(playerid,9);}
  753.                     case 15: {
  754.                                 PrepareDuelWeapon2(playerid,22);}
  755.                     case 16: {
  756.                                 PrepareDuelWeapon2(playerid,23);}
  757.                 }
  758.         }
  759.                 else
  760.         {
  761.             EndDuel(playerid);
  762.         }
  763.         return 1;
  764.         }
  765.     if(dialogid == DIALOG_DUELROUNDS)
  766.     {
  767.         if(response)
  768.         {
  769.             switch(listitem)
  770.             {
  771.                 case 0: {
  772.                                 PrepareDuelRounds(playerid,1);}
  773.                                 case 1: {
  774.                                 PrepareDuelRounds(playerid,2);}
  775.                                 case 2: {
  776.                                 PrepareDuelRounds(playerid,3);}
  777.                                 case 3: {
  778.                                 PrepareDuelRounds(playerid,4);}
  779.                                 case 4: {
  780.                                 PrepareDuelRounds(playerid,5);}
  781.                                 case 5: {
  782.                                 PrepareDuelRounds(playerid,6);}
  783.                                 case 6: {
  784.                                 PrepareDuelRounds(playerid,7);}
  785.             }
  786.         }
  787.                 else
  788.         {
  789.             EndDuel(playerid);
  790.         }
  791.         return 1;
  792.     }
  793.         return 0;
  794. }
  795.  
  796. //------------------------------------------------------------------------------
  797. //This stocks just make the script a bit shorter.
  798. stock PrepareDuelWeapon(playerid,weaponid)
  799. {
  800.         new PID = Duelopponent[playerid];
  801.         if(Duel[PID] >=1) return SendClientMessage(playerid,COLOR_MAGENTA,"* This player is already in a duel.");
  802.         {
  803.         Duelweap1[playerid] = weaponid;
  804.                 Duelweap1[PID] = weaponid;
  805.                 Duel[PID] = 1;
  806.                 Duel[playerid] = 1;
  807.                 Duelwins[PID] = 0;
  808.                 Duelwins[playerid] = 0;
  809.                 ShowPlayerDialog(playerid, DIALOG_DUELWEAPONSTWO, DIALOG_STYLE_LIST, "{FF00FF}Second Duelweapon","{F0F8FF}Desert Eagle\n{F0F8FF}Shotgun\n{F0F8FF}Sawnoff Shotgun\n{F0F8FF}Combat Shotgun\n{F0F8FF}Micro SMG\n{F0F8FF}MP5\n{F0F8FF}AK-47\n{F0F8FF}M4\n{F0F8FF}Tec-9\n{F0F8FF}Country Rifle\n{F0F8FF}Sniper Rifle\n{F0F8FF}Fist\n{F0F8FF}Knife\n{F0F8FF}Katana\n{F0F8FF}Chainsaw\n{F0F8FF}Colt\n{F0F8FF}Silenced 9mm","Okey","Cancel");
  810.         }
  811.         return 1;
  812. }
  813.  
  814. stock PrepareDuelWeapon2(playerid,weaponid)
  815. {
  816.     new PID = Duelopponent[playerid];
  817.         Duelweap2[playerid] = weaponid;
  818.         Duelweap2[PID] = weaponid;
  819.         SendClientMessage(playerid,COLOR_MAGENTA,"* You have chosen the duelweapons.");
  820.         ShowPlayerDialog(playerid,DIALOG_DUELROUNDS,DIALOG_STYLE_LIST,"{FF00FF}How many rounds shall the duel last?","{F0F8FF}1 Round\n{F0F8FF}2 Rounds\n{F0F8FF}3 Rounds\n{F0F8FF}4 Rounds\n{F0F8FF}5 Rounds\n{F0F8FF}6 Rounds\n{F0F8FF}7 Rounds","Select","Cancel");
  821.         return 1;
  822. }
  823.  
  824. stock PrepareDuelRounds(playerid,rounds)
  825. {
  826.     new PID = Duelopponent[playerid];
  827.         new string[160],Weaponname[32],Weaponname2[32];
  828.         Duelrounds[playerid] = rounds;
  829.         Duelrounds[PID] = rounds;
  830.         GetWeaponName(Duelweap1[playerid],Weaponname,32);
  831.         GetWeaponName(Duelweap2[playerid],Weaponname2,32);
  832.         format(string,sizeof(string),"--> DUELINVITATION from %s [id:%i]. Weapons: {F0F8FF}%s, %s {FF00FF}Rounds: {F0F8FF}%i",PlayerName(playerid),playerid,Weaponname,Weaponname2,rounds);
  833.     SendClientMessage(PID,-1," ");
  834.         SendClientMessage(PID,COLOR_MAGENTA,string);
  835.         SendClientMessage(PID,COLOR_AQUA,"* You're invited to have a duel.");
  836.         SendClientMessage(PID,COLOR_AQUA,"* Use /accept or /cancel to answer the duelrequest.");
  837.         SendClientMessage(playerid,COLOR_MAGENTA,"* Your duelrequest has been send successfully.");
  838.         DuelEndTimer[playerid] = SetTimerEx("DuelTimer",30000,false,"i",playerid);//Here you can change the time after which the duel will be automatically denied.
  839.         DuelEndTimer[PID] = SetTimerEx("DuelTimer",30000,false,"i",PID);//Same, just for the other duelopponent.
  840.         return 1;
  841. }
  842.  
  843. stock EndDuel(playerid)
  844. {
  845.     new PID = Duelopponent[playerid];
  846.     Duel[playerid] = 0;
  847.     Duel[PID] = 0;
  848.         return 1;
  849. }
  850.  
  851. stock PlayerName(playerid)
  852. {
  853.         new name[MAX_PLAYER_NAME];
  854.         GetPlayerName(playerid,name,sizeof(name));
  855.         return name;
  856.  
  857.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement