Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(strcmp(cmd, "/take", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if(gTeam[playerid] == 2 || IsACop(playerid))
- {
- if(PlayerInfo[playerid][pRank] < 2)
- {
- SendClientMessage(playerid, COLOR_GREY, " Moras biti rank 2 ili vise !");
- return 1;
- }
- if(PlayerInfo[playerid][pDBanned] == 1)
- {
- SendClientMessage(playerid, COLOR_GREY, "* Zabranjeno ti je koristenje ovoga!");
- return 1;
- }
- new x_nr[24];
- x_nr = strtok(cmdtext, idx);
- if(!strlen(x_nr)) {
- SendClientMessage(playerid, COLOR_WHITE, "|___________________ Take Items ____________________|");
- SendClientMessage(playerid, COLOR_WHITE, "Koriscenje: /take [Item] [playerID/DeoImena]");
- SendClientMessage(playerid, COLOR_GREY, "Available names: Driverslicense, Flyinglicense, Boatlicense, Weapons, Drugs, Materials");
- SendClientMessage(playerid, COLOR_WHITE, "|___________________________________________________|");
- return 1;
- }
- if(strcmp(x_nr,"driverslicense",true) == 0)
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp)) {
- SendClientMessage(playerid, COLOR_WHITE, "Koriscenje: /take driverslicense [playerID/DeoImena]");
- return 1;
- }
- giveplayerid = ReturnUser(tmp);
- if(IsPlayerConnected(giveplayerid))
- {
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- if (ProxDetectorS(8.0, playerid, giveplayerid))
- {
- new giveplayername[64];
- GetPlayerName(giveplayerid, giveplayername, sizeof(giveplayername));
- format(string, sizeof(string), "* Oduzeo si %s's dozvole za voznju kola.", giveplayername);
- SendClientMessage(playerid, COLOR_WHITE, string);
- format(string, sizeof(string), "* Officer %s ti je uzeo dozvolu za voznju kola.", sendername);
- SendClientMessage(giveplayerid, COLOR_WHITE, string);
- PlayerInfo[giveplayerid][pCarLic] = 0;
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, " Igrac nije blizu vas !");
- return 1;
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, " Igrac nije na serveru !");
- return 1;
- }
- }
- if(strcmp(x_nr,"autol",true) == 0)
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp)) {
- SendClientMessage(playerid, COLOR_WHITE, "Koriscenje: /take driverslicense [playerID/DeoImena]");
- return 1;
- }
- giveplayerid = ReturnUser(tmp);
- if(IsPlayerConnected(giveplayerid))
- {
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- if (ProxDetectorS(8.0, playerid, giveplayerid))
- {
- new giveplayername[64];
- GetPlayerName(giveplayerid, giveplayername, sizeof(giveplayername));
- format(string, sizeof(string), "* Oduzeo si %s's dozvole za voznju kola.", giveplayername);
- SendClientMessage(playerid, COLOR_WHITE, string);
- format(string, sizeof(string), "* Officer %s ti je uzeo dozvolu za voznju kola.", sendername);
- SendClientMessage(giveplayerid, COLOR_WHITE, string);
- PlayerInfo[giveplayerid][pCarLic] = 0;
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, " Igrac nije blizu vas !");
- return 1;
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, " Igrac nije na serveru !");
- return 1;
- }
- }
- else if(strcmp(x_nr,"flyinglicense",true) == 0)
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp)) {
- SendClientMessage(playerid, COLOR_WHITE, "Koriscenje: /take flyinglicense [playerID/DeoImena]");
- return 1;
- }
- giveplayerid = ReturnUser(tmp);
- if(IsPlayerConnected(giveplayerid))
- {
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- if (ProxDetectorS(8.0, playerid, giveplayerid))
- {
- new giveplayername[64];
- GetPlayerName(giveplayerid, giveplayername, sizeof(giveplayername));
- format(string, sizeof(string), "* Oduzeo si %s's dozvolu za letenje.", giveplayername);
- SendClientMessage(playerid, COLOR_WHITE, string);
- format(string, sizeof(string), "* Officer %s ti je uzeo dozvolu za letenje.", sendername);
- SendClientMessage(giveplayerid, COLOR_WHITE, string);
- PlayerInfo[giveplayerid][pFlyLic] = 0;
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, " Igrac nije blizu vas !");
- return 1;
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, " Igrac nije na serveru !");
- return 1;
- }
- }
- else if(strcmp(x_nr,"boatlicense",true) == 0)
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp)) {
- SendClientMessage(playerid, COLOR_WHITE, "Koriscenje: /take boatlicense [playerID/DeoImena]");
- return 1;
- }
- giveplayerid = ReturnUser(tmp);
- if(IsPlayerConnected(giveplayerid))
- {
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- if (ProxDetectorS(8.0, playerid, giveplayerid))
- {
- new giveplayername[64];
- GetPlayerName(giveplayerid, giveplayername, sizeof(giveplayername));
- format(string, sizeof(string), "* Oduzeo si %s's dozvolu za voznju broda.", giveplayername);
- SendClientMessage(playerid, COLOR_WHITE, string);
- format(string, sizeof(string), "* Officer %s ti je uzeo dozvolu za voznju broda.", sendername);
- SendClientMessage(giveplayerid, COLOR_WHITE, string);
- PlayerInfo[giveplayerid][pBoatLic] = 0;
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, " Igrac nije blizu vas !");
- return 1;
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, " Igrac nije na serveru !");
- return 1;
- }
- }
- else if(strcmp(x_nr,"weapons",true) == 0)
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp)) {
- SendClientMessage(playerid, COLOR_WHITE, "Koriscenje: /take weapons [playerID/DeoImena]");
- return 1;
- }
- if(PlayerInfo[giveplayerid][pAdminDuty] >= 1) return SendClientMessage(playerid, COLOR_GREY, "* Nemozes uzeti oruzje igracu dok je AdminDuty!");
- giveplayerid = ReturnUser(tmp);
- if(IsPlayerConnected(giveplayerid))
- {
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- if (ProxDetectorS(8.0, playerid, giveplayerid))
- {
- new giveplayername[64];
- GetPlayerName(giveplayerid, giveplayername, sizeof(giveplayername));
- format(string, sizeof(string), "* Oduzeo si %s's oruzje.", giveplayer);
- SendClientMessage(playerid, COLOR_WHITE, string);
- format(string, sizeof(string), "* Officer %s ti je uzeo oruzje.", sendername);
- SendClientMessage(giveplayerid, COLOR_WHITE, string);
- SafeResetPlayerWeapons(giveplayerid);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, " Igrac nije blizu vas !");
- return 1;
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, " Igrac nije na serveru !");
- return 1;
- }
- }
- else if(strcmp(x_nr,"drugs",true) == 0)
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp)) {
- SendClientMessage(playerid, COLOR_WHITE, "Koriscenje: /take drugs [playerID/DeoImena]");
- return 1;
- }
- giveplayerid = ReturnUser(tmp);
- if(IsPlayerConnected(giveplayerid))
- {
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- if (ProxDetectorS(8.0, playerid, giveplayerid))
- {
- new giveplayername[64];
- GetPlayerName(giveplayerid, giveplayername, sizeof(giveplayername));
- format(string, sizeof(string), "* Oduzeo si %s's Drogu.", giveplayer);
- SendClientMessage(playerid, COLOR_WHITE, string);
- format(string, sizeof(string), "* Officer %s ti je oduzeo Drogu.", sendername);
- SendClientMessage(giveplayerid, COLOR_WHITE, string);
- PlayerInfo[giveplayerid][pDrugs] = 0;
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, " Igrac nije blizu vas !");
- return 1;
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, " Igrac nije na serveru !");
- return 1;
- }
- }
- else if(strcmp(x_nr,"materials",true) == 0)
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp)) {
- SendClientMessage(playerid, COLOR_WHITE, "Koriscenje: /take materials [playerID/DeoImena]");
- return 1;
- }
- giveplayerid = ReturnUser(tmp);
- if(IsPlayerConnected(giveplayerid))
- {
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- if (ProxDetectorS(8.0, playerid, giveplayerid))
- {
- new giveplayername[64];
- GetPlayerName(giveplayerid, giveplayername, sizeof(giveplayername));
- format(string, sizeof(string), "* Oduzeo si %s's Materijale.", giveplayer);
- SendClientMessage(playerid, COLOR_WHITE, string);
- format(string, sizeof(string), "* Officer %s ti je oduzeo Materijale.", sendername);
- SendClientMessage(giveplayerid, COLOR_WHITE, string);
- PlayerInfo[giveplayerid][pMats] = 0;
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, " Igrac nije blizu vas !");
- return 1;
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, " Igrac nije na serveru !");
- return 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, " Pogresna funkcija !");
- return 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, " Nisi policajac !");
- return 1;
- }
- }
- GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
- new y, m, d;
- new h,mi,s;
- getdate(y,m,d);
- gettime(h,mi,s);
- format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s [CMD] -> /take %s %s ",d,m,y,h,mi,s,sendername, strtok(cmdtext, idx), giveplayer);
- CommandLog(string);
- return 1;
- }
- if(strcmp(cmd, "/atake", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if(PlayerInfo[playerid][pAdmin] >= 5)
- {
- new x_nr[24];
- x_nr = strtok(cmdtext, idx);
- if(!strlen(x_nr)) {
- SendClientMessage(playerid, COLOR_WHITE, "|___________________ Take Items ____________________|");
- SendClientMessage(playerid, COLOR_WHITE, "Koriscenje: /atake [Item] [playerID/DeoImena]");
- SendClientMessage(playerid, COLOR_GREY, "Available names: Driverslicense, Flyinglicense, Boatlicense, Weapons, Drugs, Materials, Passport, CopLicense");
- SendClientMessage(playerid, COLOR_WHITE, "|___________________________________________________|");
- return 1;
- }
- if(strcmp(x_nr,"coplicense",true) == 0)
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_WHITE, "Koriscenje: /atake coplicense [playerID/DeoImena]");
- return 1;
- }
- giveplayerid = ReturnUser(tmp);
- if(IsPlayerConnected(giveplayerid))
- {
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
- format(string, sizeof(string), "* Oduzeo si %s's Officer License.", giveplayer);
- SendClientMessage(playerid, COLOR_WHITE, string);
- format(string, sizeof(string), "* Administrator %s ti je oduzeo Officer License.", sendername);
- SendClientMessage(giveplayerid, COLOR_WHITE, string);
- PlayerInfo[giveplayerid][pCopLic] = 0;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "* Igrac nije na serveru !");
- return 1;
- }
- }
- if(strcmp(x_nr,"driverslicense",true) == 0)
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_WHITE, "Koriscenje: /atake driverslicense [playerID/DeoImena]");
- return 1;
- }
- giveplayerid = ReturnUser(tmp);
- if(IsPlayerConnected(giveplayerid))
- {
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
- format(string, sizeof(string), "* Oduzeo si %s's dozvolu za voznju kola.", giveplayer);
- SendClientMessage(playerid, COLOR_WHITE, string);
- format(string, sizeof(string), "* Administrator %s ti je oduzeo dozvolu za voznju kola.", sendername);
- SendClientMessage(giveplayerid, COLOR_WHITE, string);
- PlayerInfo[giveplayerid][pCarLic] = 0;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "* Igrac nije na serveru !");
- return 1;
- }
- }
- else if(strcmp(x_nr,"flyinglicense",true) == 0)
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_WHITE, "Koriscenje: /atake flyinglicense [playerID/DeoImena]");
- return 1;
- }
- giveplayerid = ReturnUser(tmp);
- if(IsPlayerConnected(giveplayerid))
- {
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
- format(string, sizeof(string), "* Oduzeo si %s's dozvolu za letenje.", giveplayer);
- SendClientMessage(playerid, COLOR_WHITE, string);
- format(string, sizeof(string), "* Administrator %s ti je oduzeo dozvolu za letenje.", sendername);
- SendClientMessage(giveplayerid, COLOR_WHITE, string);
- PlayerInfo[giveplayerid][pFlyLic] = 0;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "* Igrac nije na serveru !");
- return 1;
- }
- }
- else if(strcmp(x_nr,"boatlicense",true) == 0)
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_WHITE, "Koriscenje: /atake boatlicense [playerID/DeoImena]");
- return 1;
- }
- giveplayerid = ReturnUser(tmp);
- if(IsPlayerConnected(giveplayerid))
- {
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
- format(string, sizeof(string), "* Oduzeo si %s's dozvolu za plovidbu.", giveplayer);
- SendClientMessage(playerid, COLOR_WHITE, string);
- format(string, sizeof(string), "* Administrator %s ti je oduzeo dozvolu za plovidbu.", sendername);
- SendClientMessage(giveplayerid, COLOR_WHITE, string);
- PlayerInfo[giveplayerid][pBoatLic] = 0;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "* Igrac nije na serveru !");
- return 1;
- }
- }
- else if(strcmp(x_nr,"weapons",true) == 0)
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_WHITE, "Koriscenje: /atake weapons [playerID/DeoImena]");
- return 1;
- }
- giveplayerid = ReturnUser(tmp);
- if(IsPlayerConnected(giveplayerid))
- {
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
- format(string, sizeof(string), "* Oduzeo si %s's Oruzje.", giveplayer);
- SendClientMessage(playerid, COLOR_WHITE, string);
- format(string, sizeof(string), "* Administrator %s ti je oduzeo oruzje.", sendername);
- SendClientMessage(giveplayerid, COLOR_WHITE, string);
- SafeResetPlayerWeapons(giveplayerid);
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "* Igrac nije na serveru !");
- return 1;
- }
- }
- else if(strcmp(x_nr,"passport",true) == 0)
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_WHITE, "Koriscenje: /atake passport [playerID/DeoImena]");
- return 1;
- }
- giveplayerid = ReturnUser(tmp);
- if(IsPlayerConnected(giveplayerid))
- {
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
- format(string, sizeof(string), "* Oduzeo si %s's pasos.", giveplayer);
- SendClientMessage(playerid, COLOR_WHITE, string);
- format(string, sizeof(string), "* Administrator %s ti je oduzeo pasos.", sendername);
- SendClientMessage(giveplayerid, COLOR_WHITE, string);
- PlayerInfo[giveplayerid][pPassport] = 0;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "* Igrac nije na serveru !");
- return 1;
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "* Nisi ovlascen za ovo!");
- return 1;
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/drink", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if(IsAtBar(playerid))
- {
- if(GetPlayerDrunkLevel(playerid) <= 20000)
- {
- new Float:health;
- new x_nr[24];
- x_nr = strtok(cmdtext, idx);
- if(!strlen(x_nr)) {
- SendClientMessage(playerid, COLOR_WHITE, "|____________________ Bar Drinks ______________________|");
- SendClientMessage(playerid, COLOR_WHITE, "Koriscenje: /drink [drinkname]");
- SendClientMessage(playerid, COLOR_GREY, "Non-Alcoholic: Water ($1), Sprunk($2)");
- SendClientMessage(playerid, COLOR_GREY, "Cheap Booze: Pissh ($6), Bourbon($8), Champagne($12)");
- SendClientMessage(playerid, COLOR_GREY, "Expensive Drinks: Vodka ($16), Cristal($20)");
- SendClientMessage(playerid, COLOR_LIGHT_BLUE, "Warning! Excessive Drinking Causes Liver Damage");
- SendClientMessage(playerid, COLOR_WHITE, "|______________________________________________________|");
- return 1;
- }
- if(strcmp(x_nr,"pissh",true) == 0)
- {
- if(PlayerInfo[playerid][pAge] < 16)
- {
- SendClientMessage(playerid, COLOR_WHITE, "Konobar: Moras biti stariji od 16 godina.");
- return 1;
- }
- SafeGivePlayerMoney(playerid, - 6);
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER);
- GetPlayerHealth(playerid, health);
- if(health < 100)
- {
- if(PlayerInfo[playerid][pAlcoholPerk] > 0) { PlayerDrunk[playerid] += 1; new hp = 2 * PlayerInfo[playerid][pAlcoholPerk]; hp += 10; SetPlayerHealth(playerid, health + hp); }
- else { SetPlayerHealth(playerid, health + 10.0); }
- }
- }
- else if(strcmp(x_nr,"bourbon",true) == 0)
- {
- if(PlayerInfo[playerid][pAge] < 18)
- {
- SendClientMessage(playerid, COLOR_WHITE, "Konobar: Moras biti srariji od 18 godina.");
- return 1;
- }
- SafeGivePlayerMoney(playerid, - 8);
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER);
- GetPlayerHealth(playerid, health);
- if(health < 100)
- {
- if(PlayerInfo[playerid][pAlcoholPerk] > 0) { PlayerDrunk[playerid] += 1; new hp = 2 * PlayerInfo[playerid][pAlcoholPerk]; hp += 15; SetPlayerHealth(playerid, health + hp); }
- else { SetPlayerHealth(playerid, health + 15.0); }
- }
- }
- else if(strcmp(x_nr,"champagne",true) == 0)
- {
- if(PlayerInfo[playerid][pAge] < 18)
- {
- SendClientMessage(playerid, COLOR_WHITE, "Konobar: Moras biti srariji od 18 godina.");
- return 1;
- }
- SafeGivePlayerMoney(playerid, - 12);
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);
- GetPlayerHealth(playerid, health);
- if(health < 100)
- {
- if(PlayerInfo[playerid][pAlcoholPerk] > 0) { PlayerDrunk[playerid] += 1; new hp = 2 * PlayerInfo[playerid][pAlcoholPerk]; hp += 20; SetPlayerHealth(playerid, health + hp); }
- else { SetPlayerHealth(playerid, health + 20.0); }
- }
- }
- else if(strcmp(x_nr,"vodka",true) == 0)
- {
- if(PlayerInfo[playerid][pAge] < 18)
- {
- SendClientMessage(playerid, COLOR_WHITE, "Konobar: Moras biti srariji od 18 godina.");
- return 1;
- }
- SafeGivePlayerMoney(playerid, - 16);
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);
- GetPlayerHealth(playerid, health);
- if(health < 100)
- {
- if(PlayerInfo[playerid][pAlcoholPerk] > 0) { PlayerDrunk[playerid] += 1; new hp = 2 * PlayerInfo[playerid][pAlcoholPerk]; hp += 27; SetPlayerHealth(playerid, health + hp); }
- else { SetPlayerHealth(playerid, health + 27.0); }
- }
- }
- else if(strcmp(x_nr,"cristal",true) == 0)
- {
- if(PlayerInfo[playerid][pAge] < 18)
- {
- SendClientMessage(playerid, COLOR_WHITE, "Konobar: Moras biti srariji od 18 godina.");
- return 1;
- }
- SafeGivePlayerMoney(playerid, - 20);
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);
- GetPlayerHealth(playerid, health);
- if(health < 100)
- {
- if(PlayerInfo[playerid][pAlcoholPerk] > 0) { PlayerDrunk[playerid] += 1; new hp = 2 * PlayerInfo[playerid][pAlcoholPerk]; hp += 40; SetPlayerHealth(playerid, health + hp); }
- else { SetPlayerHealth(playerid, health + 40.0); }
- }
- }
- else if(strcmp(x_nr,"water",true) == 0)
- {
- SafeGivePlayerMoney(playerid, - 1);
- GetPlayerHealth(playerid, health);
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
- SetPlayerDrunkLevel(playerid, -1000)
- if(health < 100)
- {
- if(PlayerInfo[playerid][pAlcoholPerk] > 0) { new hp = 2 * PlayerInfo[playerid][pAlcoholPerk]; hp += 5; SetPlayerHealth(playerid, health + hp); }
- else { SetPlayerHealth(playerid, health + 50.0); }
- }
- else if(health > 100)
- {
- SetPlayerHealth(playerid, 100);
- }
- }
- else if(strcmp(x_nr,"sprunk",true) == 0)
- {
- SafeGivePlayerMoney(playerid, - 2);
- GetPlayerHealth(playerid, health);
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
- SetPlayerDrunkLevel(playerid, -1000)
- if(health < 100)
- {
- if(PlayerInfo[playerid][pAlcoholPerk] > 0) { new hp = 2 * PlayerInfo[playerid][pAlcoholPerk]; hp += 5; SetPlayerHealth(playerid, health + hp); }
- else { SetPlayerHealth(playerid, health + 50.0); }
- }
- else if(health > 100)
- {
- SetPlayerHealth(playerid, 100);
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_WHITE, "Konobar: Nikad cuo za to pice.");
- return 1;
- }
- GetPlayerHealth(playerid, health);
- if (health > 100) SetPlayerHealth(playerid, 100);
- format(string, sizeof(string), "* %s drinks some %s from the bottle.", sendername ,x_nr);
- ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, " Nemozes da pijes vise, vec si se napio!");
- return 1;
- }
- }
- else if(IsPlayerInRangeOfPoint(playerid, 5, 1255.9084,-791.8105,1085.3828))
- {
- if(PlayerDrunk[playerid] < 10)
- {
- new Float:health;
- new x_nr[24];
- x_nr = strtok(cmdtext, idx);
- if(!strlen(x_nr)) {
- SendClientMessage(playerid, COLOR_WHITE, "|____________________ Bar Drinks ______________________|");
- SendClientMessage(playerid, COLOR_WHITE, "Koriscenje: /drink [drinkname]");
- SendClientMessage(playerid, COLOR_GREY, "Coffee: Cappuccino ($4), Latte($5), Macchiato($5)");
- SendClientMessage(playerid, COLOR_GREY, "Mixes/liqueur: Limoncello($8), Amaretto($7), Martini($12)");
- SendClientMessage(playerid, COLOR_GREY, "Wine: Merlot ($15), Sangiovese($18), Frizzante($16)");
- SendClientMessage(playerid, COLOR_LIGHT_BLUE, "Warning! Excessive Drinking Causes Liver Damage");
- SendClientMessage(playerid, COLOR_WHITE, "|______________________________________________________|");
- return 1;
- }
- else if(strcmp(x_nr,"cappuccino",true) == 0)
- {
- GetPlayerHealth(playerid, health);
- if(health < 100)
- {
- SafeGivePlayerMoney(playerid, - 4);
- SetPlayerHealth(playerid, health + 30);
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
- format(string, sizeof(string), "* %s pije Capucino.", sendername);
- ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
- }
- }
- else if(strcmp(x_nr,"latte",true) == 0)
- {
- SafeGivePlayerMoney(playerid, - 5);
- SetPlayerHealth(playerid, health + 30);
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
- format(string, sizeof(string), "* %s pije Caffe Latte.", sendername);
- ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
- }
- else if(strcmp(x_nr,"macchiato",true) == 0)
- {
- SafeGivePlayerMoney(playerid, - 5);
- SetPlayerHealth(playerid, health + 30);
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
- format(string, sizeof(string), "* %s pije Caffe Macchiato.", sendername);
- ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
- }
- else if(strcmp(x_nr,"limoncello",true) == 0)
- {
- SafeGivePlayerMoney(playerid, - 8);
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER);
- if(GetPlayerHealth(playerid, health) < 100)
- {
- if(PlayerInfo[playerid][pAlcoholPerk] > 0)
- {
- PlayerDrunk[playerid] += 1;
- new hp = 2 * PlayerInfo[playerid][pAlcoholPerk];
- hp += 30;
- SetPlayerHealth(playerid, health + hp);
- format(string, sizeof(string), "* %s pije Limoncello.", sendername);
- ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
- }
- else
- {
- SetPlayerHealth(playerid, health + 30.0);
- format(string, sizeof(string), "* %s pije Limoncello.", sendername);
- ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
- }
- }
- }
- else if(strcmp(x_nr,"amaretto",true) == 0)
- {
- SafeGivePlayerMoney(playerid, - 7);
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER);
- if(GetPlayerHealth(playerid, health) < 100)
- {
- if(PlayerInfo[playerid][pAlcoholPerk] > 0)
- {
- PlayerDrunk[playerid] += 1;
- new hp = 2 * PlayerInfo[playerid][pAlcoholPerk];
- hp += 30;
- SetPlayerHealth(playerid, health + hp);
- format(string, sizeof(string), "* %s pije Amaretto", sendername);
- ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
- }
- else
- {
- SetPlayerHealth(playerid, health + 30.0);
- format(string, sizeof(string), "* %s pije Amaretto.", sendername);
- ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
- }
- }
- }
- else if(strcmp(x_nr,"martini",true) == 0)
- {
- SafeGivePlayerMoney(playerid, - 12);
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);
- if(GetPlayerHealth(playerid, health) < 100)
- {
- if(PlayerInfo[playerid][pAlcoholPerk] > 0)
- {
- PlayerDrunk[playerid] += 1;
- new hp = 2 * PlayerInfo[playerid][pAlcoholPerk];
- hp += 30;
- SetPlayerHealth(playerid, health + hp);
- format(string, sizeof(string), "* %s pije Martini.", sendername);
- ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
- }
- else
- {
- SetPlayerHealth(playerid, health + 30.0);
- format(string, sizeof(string), "* %s pije Martini.", sendername);
- ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
- }
- }
- }
- else if(strcmp(x_nr,"merlot",true) == 0)
- {
- SafeGivePlayerMoney(playerid, - 15);
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);
- if(GetPlayerHealth(playerid, health) < 100)
- {
- if(PlayerInfo[playerid][pAlcoholPerk] > 0)
- {
- PlayerDrunk[playerid] += 1;
- new hp = 2 * PlayerInfo[playerid][pAlcoholPerk];
- hp += 30;
- SetPlayerHealth(playerid, health + hp);
- format(string, sizeof(string), "* %s pije crveno vino (Merlot).", sendername);
- ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
- }
- else
- {
- SetPlayerHealth(playerid, health + 30.0);
- format(string, sizeof(string), "* %s pije crveno vino (Merlot).", sendername);
- ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
- }
- }
- }
- else if(strcmp(x_nr,"sangiovese",true) == 0)
- {
- SafeGivePlayerMoney(playerid, - 18);
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER);
- if(GetPlayerHealth(playerid, health) < 100)
- {
- if(PlayerInfo[playerid][pAlcoholPerk] > 0)
- {
- PlayerDrunk[playerid] += 1;
- new hp = 2 * PlayerInfo[playerid][pAlcoholPerk];
- hp += 30;
- SetPlayerHealth(playerid, health + hp);
- format(string, sizeof(string), "* %s pije crveno vino (Sangiovese).", sendername);
- ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
- }
- else
- {
- SetPlayerHealth(playerid, health + 30.0);
- format(string, sizeof(string), "* %s pije crveno vino (Sangiovese).", sendername);
- ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
- }
- }
- }
- else if(strcmp(x_nr,"frizzante",true) == 0)
- {
- SafeGivePlayerMoney(playerid, - 16);
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);
- if(GetPlayerHealth(playerid, health) < 100)
- {
- if(PlayerInfo[playerid][pAlcoholPerk] > 0)
- {
- PlayerDrunk[playerid] += 1;
- new hp = 2 * PlayerInfo[playerid][pAlcoholPerk];
- hp += 30;
- SetPlayerHealth(playerid, health + hp);
- format(string, sizeof(string), "* %s pije belo vino (Frizzante).", sendername);
- ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
- }
- else
- {
- SetPlayerHealth(playerid, health + 30.0);
- format(string, sizeof(string), "* %s pije belo vino (Frizzante).", sendername);
- ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
- }
- }
- }
- GetPlayerHealth(playerid, health);
- if (health > 100) SetPlayerHealth(playerid, 100);
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, " Nisi u baru!");
- return 1;
- }
- }
- new y, m, d;
- new h,mi,s;
- getdate(y,m,d);
- gettime(h,mi,s);
- format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s [CMD] -> /drink %s",d,m,y,h,mi,s,sendername, strtok(cmdtext, idx));
- CommandLog(string);
- return 1;
- }
- if(strcmp(cmd,"/showmenu",true)==0)
- {
- if(IsPlayerConnected(playerid))
- {
- if(PlayerInfo[playerid][pJob] != 6)
- {
- SendClientMessage(playerid, COLOR_GREY, " Nisi konobar!");
- return 1;
- }
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_WHITE, "Koriscenje: /showmenu [playerID/DeoImena]");
- return 1;
- }
- giveplayerid = ReturnUser(tmp);
- if(IsPlayerConnected(giveplayerid))
- {
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- if (ProxDetectorS(4.0, playerid, giveplayerid))
- {
- GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
- format(string, sizeof(string), "* %s daje %d meni.", sendername, giveplayerid);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
- ProxDetector(8.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
- LoopingAnim(playerid,"BAR","Barserve_give",4.1,0,1,1,1,1);
- SendClientMessage(giveplayerid, COLOR_RED, "|____________________ Food Menu _____________________|");
- SendClientMessage(giveplayerid, COLOR_WHITE, " --- Today's Selections --- ");
- SendClientMessage(giveplayerid, COLOR_WHITE, " Naan Bread ($75) Salad ($85) ");
- SendClientMessage(giveplayerid, COLOR_WHITE, " Chicken Korma ($200) Spaghetti Bolognese ($250) ");
- SendClientMessage(giveplayerid, COLOR_WHITE, " Rice Pudding ($300) Chocolate Gateau ($425) ");
- SendClientMessage(giveplayerid, COLOR_RED, " Koriscenje: /ordermeal ");
- SendClientMessage(giveplayerid, COLOR_RED, "|____________________________________________________|");
- SendClientMessage(giveplayerid, COLOR_GREY, string);
- format(string, sizeof(string), "* %s has shown the menu to you.", sendername);
- SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, " Igrac nije blizu vas!");
- return 1;
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, " Igrac nije na serveru!");
- return 1;
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/cookuniform", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if(PlayerInfo[playerid][pJob] != 6)
- {
- SendClientMessage(playerid, COLOR_GRAD2, "Nisi Konobar!");
- return 1;
- }
- {
- new x_nr[24];
- x_nr = strtok(cmdtext, idx);
- if(!strlen(x_nr))
- {
- SendClientMessage(playerid, COLOR_WHITE, "Koriscenje: /cookuniform [skin id]");
- return 1;
- }
- if (IsPlayerInRangeOfPoint(playerid, 3,-792.9693,500.5572,1367.3672) || IsPlayerInRangeOfPoint(playerid, 3,-779.3134,497.8989,1371.7490) || PlayerInfo[playerid][pLocal] != 255)
- {
- if(strcmp(x_nr,"list",true) == 0)
- {
- SendClientMessage(playerid, COLOR_YELLOW, "|_________Waiter Uniforms_________|");
- SendClientMessage(playerid, COLOR_GRAD1, "1: Black Cook 2: White Cook");
- SendClientMessage(playerid, COLOR_YELLOW, "|_________Waiter Uniforms_________|");
- return 1;
- }
- else if(strcmp(x_nr,"1",true) == 0)
- {
- SetPlayerSkin(playerid, 168);
- SendClientMessage(playerid, COLOR_GRAD2, "Sada si crni sef.");
- return 1;
- }
- else if(strcmp(x_nr,"2",true) == 0)
- {
- SetPlayerSkin(playerid, 209);
- SendClientMessage(playerid, COLOR_GRAD2, "Sada si Stuff member.");
- return 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD2, "Nije kod sporeta.");
- return 1;
- }
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/ordermeal", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- new x_nr[24];
- x_nr = strtok(cmdtext, idx);
- if(!strlen(x_nr)) {
- SendClientMessage(playerid, COLOR_WHITE, "|__________________ Food Menu __________________|");
- SendClientMessage(playerid, COLOR_WHITE, "Koriscenje: /ordermeal [food]");
- SendClientMessage(playerid, COLOR_GREY, "Starters: NaanBread, Salad");
- SendClientMessage(playerid, COLOR_GREY, "Main Courses: SpagBol, ChickenKorma");
- SendClientMessage(playerid, COLOR_GREY, "Desserts: Chocolate Gateau, RicePudding ");
- SendClientMessage(playerid, COLOR_WHITE, "|________________________________________________|");
- return 1;
- }
- if(strcmp(x_nr,"naanbread",true) == 0)
- {
- format(string, sizeof(string), "** %s pravi hleb.", sendername);
- SendJobMessage(18, TEAM_AZTECAS_COLOR, string);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Napravili ste hleb.");
- return 1;
- }
- else if(strcmp(x_nr,"salad",true) == 0)
- {
- format(string, sizeof(string), "** %s pravi salatu.", sendername);
- SendJobMessage(18, TEAM_AZTECAS_COLOR, string);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Napravili ste salatu.");
- return 1;
- }
- else if(strcmp(x_nr,"spagbol",true) == 0)
- {
- format(string, sizeof(string), "** %s pravi spagene.", sendername);
- SendJobMessage(18, TEAM_AZTECAS_COLOR, string);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Napravili ste spagete.");
- return 1;
- }
- else if(strcmp(x_nr,"chickenkorma",true) == 0)
- {
- format(string, sizeof(string), "** %s pravi piletinu.", sendername);
- SendJobMessage(18, TEAM_AZTECAS_COLOR, string);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Napravili ste piletinu.");
- return 1;
- }
- else if(strcmp(x_nr,"chocolategateau",true) == 0)
- {
- format(string, sizeof(string), "** %s pravi cokoladu.", sendername);
- SendJobMessage(18, TEAM_AZTECAS_COLOR, string);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Napravili ste cokoladu.");
- return 1;
- }
- else if(strcmp(x_nr,"ricepudding",true) == 0)
- {
- format(string, sizeof(string), "** %s pravi rizu.", sendername);
- SendJobMessage(18, TEAM_AZTECAS_COLOR, string);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Napravili ste rizu.");
- return 1;
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, " Nemojte to serviratu tu!");
- return 1;
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/setchamp", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if(PlayerInfo[playerid][pAdmin] >= 4)
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD1, "Koriscenje: /setchamp [playerID/DeoImena]");
- return 1;
- }
- //giveplayerid = strval(tmp);
- giveplayerid = ReturnUser(tmp);
- if(IsPlayerConnected(giveplayerid))
- {
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
- new nstring[MAX_PLAYER_NAME];
- format(nstring, sizeof(nstring), "%s", giveplayer);
- strmid(Titel[TitelName], nstring, 0, strlen(nstring), 255);
- Titel[TitelWins] = PlayerInfo[giveplayerid][pWins];
- Titel[TitelLoses] = PlayerInfo[giveplayerid][pLoses];
- SaveBoxer();
- format(string, sizeof(string), "* Postavio si %s kao novog Boxing Sampiona.", giveplayer);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
- format(string, sizeof(string), "* %s ti je dao sampiona u boxu!", sendername);
- SendClientMessage(giveplayerid,TEAM_GROVE_COLOR,string);
- format(string, sizeof(string), "[ADMIN]: %s je dao Boxing Titulu %s.", sendername, giveplayer);
- ABroadCast(COLOR_LIGHTRED,string, 5);
- new y, m, d;
- new h,mi,s;
- getdate(y,m,d);
- gettime(h,mi,s);
- format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s Gave Boxing Champion Title to %s",d,m,y,h,mi,s,sendername,giveplayer);
- GiveLog(string);
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "** Igrac nije na serveru !");
- return 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD1, "** Niste ovlasceni da koristite tu komandu!");
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/boxstats", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if(PlayerInfo[playerid][pJob] != 12)
- {
- SendClientMessage(playerid, COLOR_GREY, " Nisi Boxer !");
- return 1;
- }
- new ttext[20];//Title
- new clevel = PlayerInfo[playerid][pBoxSkill];
- if(clevel >= 0 && clevel <= 50) { ttext = "Beginner"; }
- else if(clevel >= 51 && clevel <= 200) { ttext = "Amateur"; }
- else if(clevel >= 201 && clevel <= 400) { ttext = "Professional"; }
- new ntext[20];//NickName
- new level = PlayerInfo[playerid][pWins];
- if(level > 0 && PlayerInfo[playerid][pLoses] == 0)
- {
- ntext = "Undefeated";
- }
- else
- {
- if(level >= 0 && level <= 10) { ntext = "Newcomer"; }
- else if(level >= 11 && level <= 20) { ntext = "Touchy Fist"; }
- else if(level >= 21 && level <= 30) { ntext = "Nut Cracker"; }
- else if(level >= 31 && level <= 40) { ntext = "Tommygun"; }
- else if(level >= 41 && level <= 50) { ntext = "Skull Breaker"; }
- else if(level >= 51 && level <= 60) { ntext = "Light Speed"; }
- else if(level >= 61 && level <= 70) { ntext = "Unbroken Warrior"; }
- else if(level >= 71) { ntext = "Itallion Stallion"; }
- }
- SendClientMessage(playerid, COLOR_WHITE, "|__________________ Boxing Records __________________|");
- format(string, sizeof(string), "| Current Champion: %s, with [%d] Winnings and [%d] Losses.", Titel[TitelName],Titel[TitelWins],Titel[TitelLoses]);
- SendClientMessage(playerid, COLOR_GREY, string);
- format(string, sizeof(string), "| Current Title: %s.", ttext);
- SendClientMessage(playerid, COLOR_GREY, string);
- format(string, sizeof(string), "| Current NickName: %s.", ntext);
- SendClientMessage(playerid, COLOR_GREY, string);
- format(string, sizeof(string), "| Total Wins: %d.", PlayerInfo[playerid][pWins]);
- SendClientMessage(playerid, COLOR_GREY, string);
- format(string, sizeof(string), "| Total Losses: %d.", PlayerInfo[playerid][pLoses]);
- SendClientMessage(playerid, COLOR_GREY, string);
- SendClientMessage(playerid, COLOR_WHITE, "|____________________________________________________|");
- }
- return 1;
- }
- if(strcmp(cmd, "/fight", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if(PlayerInfo[playerid][pJob] != 12)
- {
- SendClientMessage(playerid, COLOR_GREY, " Nisi boxer !");
- return 1;
- }
- if(InRing > 0)
- {
- SendClientMessage(playerid, COLOR_GREY, " Igrac se vec tuce sa nekim !");
- return 1;
- }
- if(PlayerBoxing[playerid] > 0)
- {
- SendClientMessage(playerid, COLOR_GREY, " Vec se tuces !");
- return 1;
- }
- if(!IsPlayerInRangeOfPoint(playerid, 20,765.9343,0.2761,1000.7173))
- {
- SendClientMessage(playerid, COLOR_GREY, " Nisi u teretani !");
- return 1;
- }
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp)) {
- SendClientMessage(playerid, COLOR_WHITE, "Koriscenje: /fight [playerID/DeoImena]");
- return 1;
- }
- giveplayerid = ReturnUser(tmp);
- if(IsPlayerConnected(giveplayerid))
- {
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- if (ProxDetectorS(8.0, playerid, giveplayerid))
- {
- if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "Nemozes se tuci sam sa sobom!"); return 1; }
- GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
- format(string, sizeof(string), "* Ponudio si mec %su.", giveplayer);
- SendClientMessage(playerid, COLOR_WHITE, string);
- format(string, sizeof(string), "* Boxer %s zeli da te bije (Kucajte /accept boxing) da prihvatis tucu.", sendername);
- SendClientMessage(giveplayerid, COLOR_WHITE, string);
- BoxOffer[giveplayerid] = playerid;
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, " Igrac nije blizu vas !");
- return 1;
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, " Igrac nije na serveru !");
- return 1;
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/music", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if(PlayerInfo[playerid][pCD])
- {
- new x_nr[24];
- x_nr = strtok(cmdtext, idx);
- if(!strlen(x_nr)) {
- SendClientMessage(playerid, COLOR_WHITE, "|__________________ Music __________________|");
- SendClientMessage(playerid, COLOR_WHITE, "Koriscenje: /music [name]");
- SendClientMessage(playerid, COLOR_GREY, "Available names: On, Off, Next");
- SendClientMessage(playerid, COLOR_WHITE, "|___________________________________________|");
- return 1;
- }
- if(strcmp(x_nr,"on",true) == 0)
- {
- GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~g~CD Player On", 5000, 5);
- new channel = Music[playerid];
- PlayerPlaySound(playerid, Songs[channel][0], 0.0, 0.0, 0.0);
- }
- else if(strcmp(x_nr,"off",true) == 0)
- {
- GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~r~CD Player Off", 5000, 5);
- PlayerFixRadio(playerid);
- }
- else if(strcmp(x_nr,"next",true) == 0)
- {
- if(Music[playerid] == 0) { Music[playerid] = 1; }
- else if(Music[playerid] == 1) { Music[playerid] = 2; }
- else if(Music[playerid] == 2) { Music[playerid] = 3; }
- else if(Music[playerid] == 3) { Music[playerid] = 4; }
- else if(Music[playerid] == 4) { Music[playerid] = 5; }
- else if(Music[playerid] == 5) { Music[playerid] = 6; }
- else if(Music[playerid] == 6) { Music[playerid] = 0; }
- new channel = Music[playerid];
- PlayerPlaySound(playerid, Songs[channel][0], 0.0, 0.0, 0.0);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "** Unknown music command !");
- return 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "** You don't have a CD-Player !");
- return 1;
- }
- }
- return 1;
- }
- /*if(strcmp(cmd, "/service", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- new x_nr[64];
- x_nr = strtok(cmdtext, idx);
- if(!strlen(x_nr)) {
- SendClientMessage(playerid, COLOR_WHITE, "|__________________ Service Names __________________|");
- SendClientMessage(playerid, COLOR_WHITE, "Koriscenje: /service [name]");
- SendClientMessage(playerid, COLOR_GREY, "Available names: Taxi, Bus, Medic, Mechanic, Pizza");
- SendClientMessage(playerid, COLOR_WHITE, "|________________________________________________|");
- return 1;
- }
- if(strcmp(x_nr,"taxi",true) == 0)
- {
- if(TaxiDrivers < 1)
- {
- SendClientMessage(playerid, COLOR_GREY, " There are no Taxi Drivers On Duty at the moment, try again later !");
- return 1;
- }
- if(TransportDuty[playerid] > 0)
- {
- SendClientMessage(playerid, COLOR_GREY, " You can't call for a Taxi now !");
- return 1;
- }
- format(string, sizeof(string), "** %s is in need of a Taxi Driver. (use /accept taxi to accept the call)", sendername);
- SendFamilyMessage(10, TEAM_AZTECAS_COLOR, string);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have called for a Taxi Driver, wait for a reply.");
- TaxiCall = playerid;
- return 1;
- }
- else if(strcmp(x_nr,"Pizza",true) == 0)//added lookagain
- {
- if(PizzaBoys < 1)
- {
- SendClientMessage(playerid, COLOR_GREY, " There are no Pizza boys On Duty at the moment, try again later!");
- return 1;
- }
- format(string, sizeof(string), "** %s is in need of a Pizza. (use /accept Pizza to accept the call)", sendername);
- SendJobMessage(17, COLOR_LIGHTBLUE, string);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have ordered a Pizza, wait for a reply.");
- PizzaCall = playerid;
- return 1;
- }
- else if(strcmp(x_nr,"bus",true) == 0)
- {
- new routezonecheck = IsInBusrouteZone(playerid);
- new drivercount = 0;
- if (routezonecheck == 0)
- {
- for (new i=0; i<=MAX_PLAYERS; i++)
- {
- if (IsPlayerConnected(i) && BusrouteEast[i][0] != 0) drivercount++;
- }
- if (drivercount != 0)
- {
- format(string, sizeof(string), "There are currently %d bus drivers on the east route. The route is as follows:", drivercount);
- SendClientMessage(playerid, TEAM_AZTECAS_COLOR, string);
- SendClientMessage(playerid, TEAM_AZTECAS_COLOR, " ");
- SendBusRoute(playerid, 0);
- }
- else SendClientMessage(playerid, COLOR_GREY, "There are no bus drivers on the east route at this time.");
- }
- else if (routezonecheck == 1)
- {
- for (new i=0; i<=MAX_PLAYERS; i++)
- {
- if (IsPlayerConnected(i) && BusrouteWest[i][0] != 0) drivercount++;
- }
- if (drivercount != 0)
- {
- format(string, sizeof(string), "There are currently %d bus drivers on the west route. The route is as follows:", drivercount);
- SendClientMessage(playerid, TEAM_AZTECAS_COLOR, string);
- SendBusRoute(playerid, 1);
- }
- else SendClientMessage(playerid, COLOR_GREY, "There are no bus drivers on the west route at this time.");
- }
- else SendClientMessage(playerid, COLOR_GREY, "No bus services are running in this area at the current time.");
- return 1;
- }
- else if(strcmp(x_nr,"medic",true) == 0)
- {
- if(Medics < 1)
- {
- SendClientMessage(playerid, COLOR_GREY, " There are no Medics On Duty at the moment, try again later !");
- return 1;
- }
- format(string, sizeof(string), "** %s is in need of a Medic. (use /accept medic to accept the call)", sendername);
- SendRadioMessage(4, TEAM_AZTECAS_COLOR, string);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have called for a Medic, wait for a reply.");
- MedicCall = playerid;
- return 1;
- }
- else if(strcmp(x_nr,"mechanic",true) == 0)
- {
- if(Mechanics < 1)
- {
- SendClientMessage(playerid, COLOR_GREY, " There are no Car Mechanics On Duty at the moment, try again later !");
- return 1;
- }
- format(string, sizeof(string), "** %s is in need of a Car Mechanic. (use /accept mechanic to accept the call)", sendername);
- SendJobMessage(7, TEAM_AZTECAS_COLOR, string);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have called for a Car Mechanic, wait for a reply.");
- MechanicCall = playerid;
- return 1;
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, " Unknown service name !");
- return 1;
- }
- }
- return 1;
- }*/
- if(strcmp(cmd, "/service", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- SendClientMessage(playerid, COLOR_GREY, "** Koristi /calllist da vidis brojeve !");
- return 1;
- }
- return 1;
- }
- if(strcmp(cmd, "/calllist", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- SendClientMessage(playerid, COLOR_GREEN, "____________Services number list____________");
- SendClientMessage(playerid, COLOR_WHITE, "111 - pizza stack co., 222 - bus services");
- SendClientMessage(playerid, COLOR_WHITE, "103 - medics, 444 - taxi, 555 - mechanic");
- SendClientMessage(playerid, COLOR_WHITE, "151 - Advertisement Agency, 150 - ABC Studios");
- SendClientMessage(playerid, COLOR_GREEN, "____________________________________________");
- return 1;
- }
- return 1;
- }
- if(strcmp(cmd, "/tie", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if(Rope[playerid] != 0)
- {
- if(PlayerInfo[playerid][pLevel] < 2)
- {
- SendClientMessage(playerid, COLOR_GREY, " Moras biti lvl 2 da vezes ! ");
- return 1;
- }
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp)) {
- SendClientMessage(playerid, COLOR_WHITE, "Koriscenje: /tie [playerID/DeoImena]");
- return 1;
- }
- giveplayerid = ReturnUser(tmp);
- GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
- if(IsPlayerConnected(giveplayerid))
- {
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- if(PlayerTied[giveplayerid] > 0)
- {
- SendClientMessage(playerid, COLOR_GREY, "** Igrac je vec vezan !");
- return 1;
- }
- if(PlayerInfo[giveplayerid][pAdminDuty] == 1)
- {
- SendClientMessage(playerid, COLOR_NICERED, "** Nemozes vezati admina na duznosti!");
- format(string,sizeof(string),"[ADMIN]: %s (%d) pokusava da sveze %s ali on je na AdminDuty",sendername,playerid,giveplayer);
- ABroadCast(COLOR_LIGHTRED,string, 5);
- return 1;
- }
- if (ProxDetectorS(8.0, playerid, giveplayerid))
- {
- new car = GetPlayerVehicleID(playerid);
- if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == 2 && IsPlayerInVehicle(giveplayerid, car))
- {
- format(string, sizeof(string), "* Vezani ste od %s.", sendername);
- SendClientMessage(giveplayerid, COLOR_WHITE, string);
- format(string, sizeof(string), "* Vezali ste %s.", giveplayer);
- SendClientMessage(playerid, COLOR_WHITE, string);
- format(string, sizeof(string), "* %s veze %s.", sendername ,giveplayer);
- ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
- GameTextForPlayer(giveplayerid, "~r~Vezan", 2500, 3);
- TogglePlayerControllable(giveplayerid, 0);
- PlayerTied[giveplayerid] = 1;
- Rope[playerid]--;
- new y, m, d;
- new h,mi,s;
- getdate(y,m,d);
- gettime(h,mi,s);
- format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s [CMD] -> /tie %s",d,m,y,h,mi,s,sendername, giveplayer
- );
- CommandLog(string);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, " Igrac nije u tvojim kolima ili ti nisi vozac !");
- return 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, " Igrac nije blizu vas !");
- return 1;
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, " Igrac nije na serveru !");
- return 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, " Nemas Konopac !");
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/untie", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp)) {
- SendClientMessage(playerid, COLOR_WHITE, "Koriscenje: /untie [playerID/DeoImena]");
- return 1;
- }
- giveplayerid = ReturnUser(tmp);
- if(IsPlayerConnected(giveplayerid))
- {
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- if (ProxDetectorS(8.0, playerid, giveplayerid))
- {
- if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "Nemozes odvezati sebe!"); return 1; }
- if(PlayerTied[giveplayerid])
- {
- GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
- format(string, sizeof(string), "* Odvezan si od %s.", sendername);
- SendClientMessage(giveplayerid, COLOR_WHITE, string);
- format(string, sizeof(string), "* Odvezao si %s.", giveplayer);
- SendClientMessage(playerid, COLOR_WHITE, string);
- GameTextForPlayer(giveplayerid, "~g~Odvezan", 2500, 3);
- TogglePlayerControllable(giveplayerid, 1);
- PlayerTied[giveplayerid] = 0;
- format(string, sizeof(string), "* %s odvezuje %s.", sendername, giveplayer);
- ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
- Rope[playerid]++;
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, " Igrac nije vezan !");
- return 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, " Igrac nije blizu vas !");
- return 1;
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, " Igrac nije na serveru !");
- return 1;
- }
- }//not connected
- return 1;
- }
- if(strcmp(cmd, "/auntie", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if(PlayerInfo[playerid][pAdmin] >= 1)
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_WHITE, "Koriscenje: /auntie [playerID/DeoImena]");
- return 1;
- }
- giveplayerid = ReturnUser(tmp);
- if(IsPlayerConnected(giveplayerid))
- {
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- if(PlayerTied[giveplayerid])
- {
- GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
- format(string, sizeof(string), "* Admin %s te odvezao.", sendername);
- SendClientMessage(giveplayerid, COLOR_WHITE, string);
- format(string, sizeof(string), "* Odvezao si %s.", giveplayer);
- SendClientMessage(playerid, COLOR_WHITE, string);
- GameTextForPlayer(giveplayerid, "~g~Odvezan", 2500, 3);
- TogglePlayerControllable(giveplayerid, 1);
- PlayerTied[giveplayerid] = 0;
- format(string, sizeof(string), "* %s odvezuje %s.", sendername, giveplayer);
- ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
- format(string, sizeof(string), "[ADMIN]: %s je odvezao %s (%d)", sendername,giveplayer,giveplayerid);
- ABroadCast(COLOR_LIGHTRED,string, 5);
- new y, m, d;
- new h,mi,s;
- getdate(y,m,d);
- gettime(h,mi,s);
- format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s je odvezao %s.",d,m,y,h,mi,s,sendername,giveplayer);
- GiveLog(string);
- AdminLog(string);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "** Igrac nije vezan !");
- return 1;
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, " Igrac nije na serveru !");
- return 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, " Nisi ovlascen !");
- }
- }//not connected
- return 1;
- }
- if(strcmp(cmd, "/copuntie", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if(IsACop(playerid))
- {
- /*if(PlayerInfo[playerid][pRank] < 3)
- {
- SendClientMessage(playerid, COLOR_GREY, " You need Rank 3 or higher to untie people !");
- return 1;
- }*/
- if(PlayerInfo[playerid][pDBanned] == 1)
- {
- SendClientMessage(playerid, COLOR_GREY, "** Nije ti dozvoljeno ovo!");
- return 1;
- }
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp)) {
- SendClientMessage(playerid, COLOR_WHITE, "Koriscenje: /copuntie [playerID/DeoImena]");
- return 1;
- }
- giveplayerid = ReturnUser(tmp);
- if(IsPlayerConnected(giveplayerid))
- {
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- if (ProxDetectorS(8.0, playerid, giveplayerid))
- {
- if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "You cannot Untie yourself!"); return 1; }
- if(PlayerTied[giveplayerid])
- {
- GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
- format(string, sizeof(string), "* Odvezan si od %s.", sendername);
- SendClientMessage(giveplayerid, COLOR_WHITE, string);
- format(string, sizeof(string), "* Odvezao si %s.", giveplayer);
- SendClientMessage(playerid, COLOR_WHITE, string);
- GameTextForPlayer(giveplayerid, "~g~Odvezan", 2500, 3);
- TogglePlayerControllable(giveplayerid, 1);
- PlayerTied[giveplayerid] = 0;
- format(string, sizeof(string), "* %s je odvezao %s.", sendername, giveplayer);
- ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, " Igrac nije vezan !");
- return 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, " Igrac nije blizu vas !");
- return 1;
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, " Igrac nije na serveru !");
- return 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, " Nisi policajac !");
- }
- }//not connected
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement