28.08.2015, 13:23
Код:
if(strcmp(cmd, "/opljackajopstinu", true) == 0) { new success = random(2); new popstinarobtime = PlayerInfo[playerid][pRobTime]; if(CityHallRobbedRecently == 1) { SendClientMessage(playerid, COLOR_GREY, "Ova lokacija je vec bila opljackana, pokusajte kasnije"); // return 1; } if(PlayerInfo[playerid][pRobTime] >= 1) { format(string, sizeof(string),"Skoro si pljackao, moras sacekati jos %d min da bi opet mogao da pljackas", (popstinarobtime / 60)); SendClientMessage(playerid, COLOR_GREY, string); // return 1; } if(IsPlayerInRangeOfPoint(playerid, 2, 358.5919,184.2908,1008.3828)) return 1; { if(GetPlayerWeapon(playerid) >= 24 && GetPlayerWeapon(playerid) <= 40) { if(PlayerInfo[playerid][pDuty] == 0) { if(success == 1) { CityHallRobbedRecently = 1; new money = random(10000); SafeGivePlayerMoney(playerid, money); format(string, sizeof(string),"~w~Opljackali ste opstinu i uzeli ~g~%d$ !", money); GameTextForPlayer(playerid, string, 6000, 4); format(string, sizeof(string),"Opljackali ste opstinu i uzeli %d$ !",money); SendClientMessage(playerid, COLOR_GREY, string); format(string, sizeof(string), "{48E31C}[BW vanredne vesti] {ADADAD}Upravo je opljackana opstina"); SendClientMessageToAll(COLOR_NICERED, string); WantedPoints[playerid] = 6; SetPlayerCriminal(playerid,255, "Pljacka Opstine"); PlayerInfo[playerid][pRobTime] = 900; SetTimer("UnsetCityHallRob",1800000,false); OnePlayAnim(playerid, "SHOP", "ROB_Shifty", 4.0, 0, 0, 0, 0, 0); // Rob Lookout } else { SendClientMessage(playerid, COLOR_ORANGE, "Niste uspeli opljackati Opstinu"); WantedPoints[playerid] = 2; SetPlayerCriminal(playerid,255, "Pokusaj pljacke Opstine"); PlayerInfo[playerid][pRobTime] = 500; } } else { SendClientMessage(playerid, COLOR_GREY, "Morate napustiti duznost"); } } else { SendClientMessage(playerid, COLOR_GREY, "Morate da imate oruzje da bi pljackali"); } } else { SendClientMessage(playerid, COLOR_GREY, "Niste u opstini"); } return 1; }