Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(strcmp(cmd, "/war", true) == 0)
- {
- if(IsPlayerConnected(playerid) && gPlayerLogged[playerid] == 1)
- {
- if(PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pLeader] == 3 || PlayerInfo[playerid][pLeader] == 4 || PlayerInfo[playerid][pLeader] == 5)
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp)) return SCM(playerid, COLOR_DGOLD, "KORISTENJE: /war [ID/DioImena]");
- id = ReturnUser(tmp);
- if(id == playerid) return SCM(playerid, COLOR_LIGHTRED, "ERROR: Nemozete samom sebi ponuditi war - pokušajte sa liderom druge organizacije.");
- if(!IsPlayerConnected(id)) return SCM(playerid, COLOR_LIGHTRED, "ERROR: Odabrana osoba nije ulogirana u svoj korisnicki racun - pokusajte poslije.");
- if(Warteam[playerid] >= 1) return SCM(playerid, COLOR_LIGHTRED, "ERROR: Trenutno ste na waru - ne mozete koristiti ovu komandu.");
- if(Warteam[id] >= 1) return SCM(playerid, COLOR_LIGHTRED, "ERROR: Odabrani lider je vec u ratu - kada zavrsi pokušajte ponovno");
- if(PlayerInfo[playerid][pLeader] == PlayerInfo[id][pMember]) return SCM(playerid, COLOR_LIGHTRED, "ERROR: Nemozete ponuditi war lideru iste organizacije u kojoj ste vi.");
- if(Spraying[playerid] == 0)
- {
- if(PlayerInfo[id][pLeader] == 2 || PlayerInfo[id][pLeader] == 3 || PlayerInfo[id][pLeader] == 4 || PlayerInfo[id][pLeader] == 5)
- {
- format(string, 256, "INFO: Ponudili ste lideru %s war - ukoliko ga prihvati zapocinje war u trajanju od 20 minuta.", Ime(id));
- SCM(playerid, COLOR_GOLD, string);
- format(string, 256, "INFO: Vas lider %s je ponudio war lideru %s - ukoliko ga prihvati zapocinje war u trajanju od 20 minuta.", Ime(playerid), Ime(id));
- SendRadioMessage(PlayerInfo[playerid][pLeader], COLOR_DGOLD, string);
- format(string, 256, "INFO: Lider %s vam je ponudio war - upisite '/accept war' da prihvatite war u trajanju od 20 minuta.", Ime(playerid));
- SCM(id, COLOR_GOLD, string);
- format(string, 256, "INFO: Lider %s je ponudio war vašem lideru %s - ukoliko ga prihvati zapocinje war u trajanju od 20 minuta.", Ime(playerid), Ime(id));
- SendRadioMessage(PlayerInfo[id][pLeader], COLOR_GOLD, string);
- Warer[id] = 1;
- WarOffer[id] = playerid;
- WarAccept[id] = playerid;
- WarAccept[id] = 1;
- SprayAccept[id] = 1;
- SetTimerEx("SprayAccepter", 30000, false, "%i", id);
- SetTimerEx("SprayTime", 30000, false, "%i", playerid);
- Spraying[playerid] = 1;
- }
- else { SCM(playerid, COLOR_LIGHTRED, "ERROR: Ne mozete ponuditi war nekome tko nije lider bande/mafije."); }
- }
- else
- {
- SCM(playerid, COLOR_LIGHTRED, "ERROR: Morate pricekati minimalno 30 sekundi prije nove ponude za rat (/war).");
- }
- }
- else
- {
- SCM(playerid, COLOR_LIGHTRED, "ERROR: Niste autorizirani za koristenje ove komande - samo lideri banda/mafija.");
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment