Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- new bool:GunGame = false;
- new GGRank[MAX_PLAYERS] = 0;
- new bool:GG[MAX_PLAYERS] = false;
- new Float:GGSpawns[8][4] =
- {
- {119.5620,1459.4753,10.6226,272.7749},
- {120.4306,1343.0110,10.5859,8.6558},
- {177.1469,1358.5471,10.5859,315.5569},
- {198.9355,1431.2059,10.5859,91.6898},
- {223.5451,1466.9707,10.5859,178.0023},
- {275.1293,1476.7314,10.5859,174.5556},
- {265.3375,1375.9758,10.5859,268.3882},
- {218.4930,1381.8516,10.5859,86.8215}
- };
- new GGGuns[13][1] =
- {
- {22},
- {23},
- {24},
- {28},
- {29},
- {32},
- {25},
- {27},
- {30},
- {31},
- {33},
- {34},
- {26}
- };
- OPD
- if(GG[playerid] && GG[killerid])
- {
- GGRank[killerid]++;
- new str[128];
- if(GGRank[killerid] == 13)
- {
- foreach(Player, i)
- {
- if(GG[i])
- {
- GG[i] = false;
- format(str,128,"~y~GunGame je gotov!~n~~y~Pobjednik: ~g~%s", pime(killerid));
- GameTextForPlayer(i, str, 3000, 3);
- SpawnPlayer(i);
- }
- }
- format(str,128," GUNGAME | Pobjednik GunGame-a je %s!", pime(killerid));
- SendClientMessageToAll(COLOR_LIME, str);
- GunGame = false;
- }
- else
- {
- D_ResetPlayerWeapons(killerid);
- D_GivePlayerWeapon(killerid, GGGuns[GGRank[killerid]][0], 500);
- format(str,128," GUNGAME | Tvoj rank: %d/13", GGRank[killerid]);
- SendClientMessage(killerid, COLOR_LIME, str);
- }
- }
- gh SendClientMessage(playerid, COLOR_AQUA,"[Gungame] | /gungame /gungamestart /gungamestop /ggizbaci");
- CMD:ggigraci(playerid,params[]) {
- if(PI[playerid][pAdmin] > 0 || PI[playerid][pGS] > 0 || Race[playerid]) {
- new str[100];
- SendClientMessage(playerid,COLOR_SALMON, " ===== EVENT VOZACI ===== ");
- foreach(Player,i) {
- if(GG[i]) {
- format(str,100," == %s[%d]",pime(i),i);
- SendClientMessage(playerid,COLOR_WHITE,str);
- }
- }
- }
- return 1;
- }
- CMD:gungame(playerid,params[])
- {
- if(PI[playerid][pAdmin] == 0 && PI[playerid][pGS] == 0) return NISTE_OVLASTENI;
- new id;
- if(sscanf(params,"u",id)) return SendClientMessage(playerid, COLOR_IVORY4, " *Koristi: /gungame [id igraca]");
- else if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_IVORY4, "Korisnik nije online!");
- GG[id] = true;
- GGRank[id] = 0;
- new str[128];
- format(str,128," *Admin/GS %s vas je prozvao na GunGame!", pime(playerid));//Dodad admin/gs odvojeno
- SendClientMessage(id, COLOR_LIME, str);
- format(str,128," *Prozvali ste igraca %s na gungame!", pime(id));
- SendClientMessage(playerid, COLOR_LIME, str);
- LOG("admin_komande","Igrac: %s, Komanda: /gungame",pime(playerid));
- return 1;
- }
- CMD:ggizbaci(playerid,params[])
- {
- if(PI[playerid][pAdmin] == 0 && PI[playerid][pGS] == 0) return NISTE_OVLASTENI;
- new id;
- if(sscanf(params,"u",id)) return SendClientMessage(playerid, COLOR_IVORY4, " *Koristi: /ggizbaci [id igraca]");
- else if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_IVORY4, "Korisnik nije online!");
- GG[id] = false;
- GGRank[id] = 0;
- new str[128];
- format(str,128," *Admin/GS %s vas je izbacio iz GunGame-a!", pime(playerid));//dodat admin/gs odvojeno
- SendClientMessage(id, COLOR_LIME, str);
- format(str,128," *Izbacili ste igraca %s iz gungame-a!", pime(id));
- SendClientMessage(playerid, COLOR_LIME, str);
- LOG("admin_komande","Igrac: %s, Komanda: /ggizbaci",pime(playerid));
- return 1;
- }
- CMD:gungamestart(playerid,params[])
- {
- if(PI[playerid][pAdmin] == 0 && PI[playerid][pGS] == 0) return NISTE_OVLASTENI;
- if(GunGame == true) return SendClientMessage(playerid, COLOR_IVORY4, "*Gungame je vec u tijeku!");
- foreach(Player, i)
- {
- if(GG[i])
- {
- SpawnPlayer(i);
- GameTextForPlayer(i, "~w~GunGame je poceo!", 3000, 3);
- }
- }
- new str[128]; format(str,128,"*Admin/GS %s je pokrenuo gungame!",pime(playerid));//dodat admin/gs odvojeno
- SendAdminMessage(COLOR_LIME,str);
- GunGame = true;
- sessionStaffStats[ playerid ][ sessionGunGames ] ++;
- LOG("admin_komande","Igrac: %s, Komanda: /gungamestart",pime(playerid));
- return 1;
- }
- CMD:gungamestop(playerid,params[])
- {
- if(PI[playerid][pAdmin] == 0 && PI[playerid][pGS] == 0) return NISTE_OVLASTENI;
- if(GunGame == false) return SendClientMessage(playerid, COLOR_IVORY4, "*Gungame nije u tijeku!");
- foreach(Player, i)
- {
- if(GG[i])
- {
- GG[i] = false;
- SendClientMessage(i,COLOR_ORANGERED, " GUNGAME | Admin/GS je prekinuo GunGame!");
- SpawnPlayer(i);
- }
- }
- new str[128]; format(str,128,"*Admin/GS %s je zaustavio gungame!",pime(playerid));//dodat admin/gs odvojeno
- SendAdminMessage(COLOR_LIME,str);
- GunGame = false;
- LOG("admin_komande","Igrac: %s, Komanda: /gungamestop",pime(playerid));
- return 1;
- }
- OPC GG[playerid] = false;
- OPS if(GG[playerid]) {
- new rand = random(sizeof(GGSpawns));
- x = GGSpawns[rand][0]; y = GGSpawns[rand][1]; z = GGSpawns[rand][2]; a = GGSpawns[rand][3]; Int = 0; vw = 5;
- SPW if(GG[playerid]) {
- D_GivePlayerWeapon(playerid, GGGuns[GGRank[playerid]][0], 500);
- SetPlayerHealth(playerid,100); SetPlayerArmour(playerid,0);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement