Advertisement
MichaelFR

Untitled

Mar 17th, 2024
619
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 4.98 KB | None | 0 0
  1. new bool:GunGame = false;
  2. new GGRank[MAX_PLAYERS] = 0;
  3. new bool:GG[MAX_PLAYERS] = false;
  4.  
  5. new Float:GGSpawns[8][4] =
  6. {
  7.     {119.5620,1459.4753,10.6226,272.7749},
  8.     {120.4306,1343.0110,10.5859,8.6558},
  9.     {177.1469,1358.5471,10.5859,315.5569},
  10.     {198.9355,1431.2059,10.5859,91.6898},
  11.     {223.5451,1466.9707,10.5859,178.0023},
  12.     {275.1293,1476.7314,10.5859,174.5556},
  13.     {265.3375,1375.9758,10.5859,268.3882},
  14.     {218.4930,1381.8516,10.5859,86.8215}
  15. };
  16.  
  17. new GGGuns[13][1] =
  18. {
  19.     {22},
  20.     {23},
  21.     {24},
  22.     {28},
  23.     {29},
  24.     {32},
  25.     {25},
  26.     {27},
  27.     {30},
  28.     {31},
  29.     {33},
  30.     {34},
  31.     {26}
  32. };
  33. OPD
  34.     if(GG[playerid] && GG[killerid])
  35.     {
  36.         GGRank[killerid]++;
  37.         new str[128];
  38.         if(GGRank[killerid] == 13)
  39.         {
  40.             foreach(Player, i)
  41.             {
  42.                 if(GG[i])
  43.                 {
  44.                     GG[i] = false;
  45.                     format(str,128,"~y~GunGame je gotov!~n~~y~Pobjednik: ~g~%s", pime(killerid));
  46.                     GameTextForPlayer(i, str, 3000, 3);
  47.                     SpawnPlayer(i);
  48.                 }
  49.             }
  50.             format(str,128," GUNGAME | Pobjednik GunGame-a je %s!", pime(killerid));
  51.             SendClientMessageToAll(COLOR_LIME, str);
  52.             GunGame = false;
  53.         }
  54.         else
  55.         {
  56.             D_ResetPlayerWeapons(killerid);
  57.             D_GivePlayerWeapon(killerid, GGGuns[GGRank[killerid]][0], 500);
  58.             format(str,128," GUNGAME | Tvoj rank: %d/13", GGRank[killerid]);
  59.             SendClientMessage(killerid, COLOR_LIME, str);
  60.         }
  61.     }
  62.  
  63. gh  SendClientMessage(playerid, COLOR_AQUA,"[Gungame] | /gungame /gungamestart /gungamestop /ggizbaci");
  64. CMD:ggigraci(playerid,params[]) {
  65.     if(PI[playerid][pAdmin] > 0 || PI[playerid][pGS] > 0 || Race[playerid]) {
  66.         new str[100];
  67.         SendClientMessage(playerid,COLOR_SALMON, " ===== EVENT VOZACI ===== ");
  68.         foreach(Player,i) {
  69.             if(GG[i]) {
  70.                 format(str,100,"  == %s[%d]",pime(i),i);
  71.                 SendClientMessage(playerid,COLOR_WHITE,str);
  72.             }
  73.         }
  74.     }
  75.     return 1;
  76. }
  77.  
  78. CMD:gungame(playerid,params[])
  79. {
  80.     if(PI[playerid][pAdmin] == 0 && PI[playerid][pGS] == 0) return NISTE_OVLASTENI;
  81.     new id;
  82.     if(sscanf(params,"u",id)) return SendClientMessage(playerid, COLOR_IVORY4, " *Koristi: /gungame [id igraca]");
  83.     else if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_IVORY4, "Korisnik nije online!");
  84.     GG[id] = true;
  85.     GGRank[id] = 0;
  86.     new str[128];
  87.     format(str,128," *Admin/GS %s vas je prozvao na GunGame!", pime(playerid));//Dodad admin/gs odvojeno
  88.     SendClientMessage(id, COLOR_LIME, str);
  89.     format(str,128," *Prozvali ste igraca %s na gungame!", pime(id));
  90.     SendClientMessage(playerid, COLOR_LIME, str);
  91.     LOG("admin_komande","Igrac: %s, Komanda: /gungame",pime(playerid));
  92.     return 1;
  93. }
  94.  
  95. CMD:ggizbaci(playerid,params[])
  96. {
  97.     if(PI[playerid][pAdmin] == 0 && PI[playerid][pGS] == 0) return NISTE_OVLASTENI;
  98.     new id;
  99.     if(sscanf(params,"u",id)) return SendClientMessage(playerid, COLOR_IVORY4, " *Koristi: /ggizbaci [id igraca]");
  100.     else if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_IVORY4, "Korisnik nije online!");
  101.     GG[id] = false;
  102.     GGRank[id] = 0;
  103.     new str[128];
  104.     format(str,128," *Admin/GS %s vas je izbacio iz GunGame-a!", pime(playerid));//dodat admin/gs odvojeno
  105.     SendClientMessage(id, COLOR_LIME, str);
  106.     format(str,128," *Izbacili ste igraca %s iz gungame-a!", pime(id));
  107.     SendClientMessage(playerid, COLOR_LIME, str);
  108.     LOG("admin_komande","Igrac: %s, Komanda: /ggizbaci",pime(playerid));
  109.     return 1;
  110. }
  111.  
  112. CMD:gungamestart(playerid,params[])
  113. {
  114.     if(PI[playerid][pAdmin] == 0 && PI[playerid][pGS] == 0) return NISTE_OVLASTENI;
  115.     if(GunGame == true) return SendClientMessage(playerid, COLOR_IVORY4, "*Gungame je vec u tijeku!");
  116.     foreach(Player, i)
  117.     {
  118.         if(GG[i])
  119.         {
  120.             SpawnPlayer(i);
  121.             GameTextForPlayer(i, "~w~GunGame je poceo!", 3000, 3);
  122.         }
  123.     }
  124.     new str[128]; format(str,128,"*Admin/GS %s je pokrenuo gungame!",pime(playerid));//dodat admin/gs odvojeno
  125.     SendAdminMessage(COLOR_LIME,str);
  126.     GunGame = true;
  127.     sessionStaffStats[ playerid ][ sessionGunGames ] ++;
  128.     LOG("admin_komande","Igrac: %s, Komanda: /gungamestart",pime(playerid));
  129.     return 1;
  130. }
  131.  
  132. CMD:gungamestop(playerid,params[])
  133. {
  134.     if(PI[playerid][pAdmin] == 0 && PI[playerid][pGS] == 0) return NISTE_OVLASTENI;
  135.     if(GunGame == false) return SendClientMessage(playerid, COLOR_IVORY4, "*Gungame nije u tijeku!");
  136.     foreach(Player, i)
  137.     {
  138.         if(GG[i])
  139.         {
  140.             GG[i] = false;
  141.             SendClientMessage(i,COLOR_ORANGERED, " GUNGAME | Admin/GS je prekinuo GunGame!");
  142.             SpawnPlayer(i);
  143.         }
  144.     }
  145.     new str[128]; format(str,128,"*Admin/GS %s je zaustavio gungame!",pime(playerid));//dodat admin/gs odvojeno
  146.     SendAdminMessage(COLOR_LIME,str);
  147.     GunGame = false;
  148.     LOG("admin_komande","Igrac: %s, Komanda: /gungamestop",pime(playerid));
  149.     return 1;
  150. }
  151. OPC     GG[playerid] = false;
  152. OPS if(GG[playerid]) {
  153.         new rand = random(sizeof(GGSpawns));
  154.         x = GGSpawns[rand][0]; y = GGSpawns[rand][1]; z = GGSpawns[rand][2]; a = GGSpawns[rand][3]; Int = 0; vw = 5;
  155. SPW if(GG[playerid]) {
  156.         D_GivePlayerWeapon(playerid, GGGuns[GGRank[playerid]][0], 500);
  157.         SetPlayerHealth(playerid,100); SetPlayerArmour(playerid,0);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement