| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725 |
- /*
- /$$ /$$ /$$$$$$ /$$$$$$$ /$$$$$$$
- | $$$ | $$ /$$__ $$ | $$__ $$| $$__ $$
- | $$$$| $$| $$ \__/ | $$ \ $$| $$ \ $$
- | $$ $$ $$| $$ /$$$$ /$$$$$$| $$$$$$$/| $$$$$$$/
- | $$ $$$$| $$|_ $$|______/| $$__ $$| $$____/
- | $$\ $$$| $$ \ $$ | $$ \ $$| $$
- | $$ \ $$| $$$$$$/ | $$ | $$| $$
- |__/ \__/ \______/ |__/ |__/|__/
- Fishing Job System
- Next Generation Gaming, LLC
- (created by Next Generation Gaming Development Team)
- * Copyright (c) 2014, Next Generation Gaming, LLC
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification,
- * are not permitted in any case.
- *
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
- // WINTERFIELD: VERSION .278 FISHING SYSTEM
- #include <YSI\y_hooks>
- hook OnPlayerEnterCheckpoint(playerid) {
- if(GetPVarInt(playerid, "pSellingFish"))
- {
- DisablePlayerCheckpoint(playerid);
- DeletePVar(playerid, "pSellingFish");
- SendClientMessageEx(playerid, COLOR_WHITE, "You have reached your destination. Type /sellfish [amount] to sell your fish.");
- }
- return 1;
- }
- IncreaseFishingLevel(playerid) {
-
- if(PlayerInfo[playerid][pDoubleEXP] > 0)
- {
- PlayerInfo[playerid][pFishingSkill] += 2;
- format(szMiscArray, sizeof(szMiscArray), "You have gained 2 fishing skill points instead of 1. You have %d hours left on the Double EXP token.", PlayerInfo[playerid][pDoubleEXP]);
- SendClientMessageEx(playerid, COLOR_YELLOW, szMiscArray);
- // PlayerInfo[playerid][pXP] += PlayerInfo[playerid][pLevel] * XP_RATE * 2;
- }
- else
- {
- PlayerInfo[playerid][pFishingSkill] += 1;
- // PlayerInfo[playerid][pXP] += PlayerInfo[playerid][pLevel] * XP_RATE;
- }
- return 1;
- }
- CMD:fishhelp(playerid, params[])
- {
- SetPVarInt(playerid, "HelpResultCat0", 5);
- Help_ListCat(playerid, DIALOG_HELPCATOTHER1);
- return 1;
- }
- CMD:ofishhelp(playerid, params[])
- {
- SendClientMessageEx(playerid, COLOR_GREEN,"_______________________________________");
- SendClientMessageEx(playerid, COLOR_WHITE,"*** FISH HELP *** - type a command for more infomation.");
- SendClientMessageEx(playerid, COLOR_GRAD3,"*** FISHING *** /fish (Try to catch a fish) /myfish (Show the fishes you have caught)");
- SendClientMessageEx(playerid, COLOR_GRAD3,"*** FISHING *** /sellfish (Sell your fish)");
- return 1;
- }
- CMD:fish(playerid, params[]) {
- //if(PlayerInfo[playerid][pJob] == 70 || PlayerInfo[playerid][pJob2] == 70 || PlayerInfo[playerid][pJob3] == 70)
- {
- if(IsABoat(GetPlayerVehicleID(playerid)))
- {
- {
- if(PlayerInfo[playerid][pFishWeight] <= 1000)
- {
- if(GetPVarInt(playerid, "pFishTime") < gettime())
- {
- switch(PlayerInfo[playerid][pFishingSkill])
- {
- case 0 .. 49:
- {
- switch(random(2))
- {
- case 0:
- {
- format(szMiscArray, sizeof szMiscArray, "{FF8000}* {C2A2DA}%s casts their rod out, reeling it back in.", GetPlayerNameEx(playerid));
- SetPlayerChatBubble(playerid, szMiscArray, COLOR_PURPLE, 30.0, 4000);
- SendClientMessageEx(playerid, COLOR_PURPLE, szMiscArray);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have caught nothing!");
-
- SetPVarInt(playerid, "pFishTime", gettime() + 10);
- IncreaseFishingLevel(playerid);
- }
- case 1:
- {
- format(szMiscArray, sizeof szMiscArray, "{FF8000}* {C2A2DA}%s casts their rod out, reeling it back in.", GetPlayerNameEx(playerid));
- SetPlayerChatBubble(playerid, szMiscArray, COLOR_PURPLE, 30.0, 4000);
- SendClientMessageEx(playerid, COLOR_PURPLE, szMiscArray);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have caught a bluegill!");
-
- PlayerInfo[playerid][pFishWeight] += 5;
-
- SetPVarInt(playerid, "pFishTime", gettime() + 10);
- IncreaseFishingLevel(playerid);
- }
- case 2:
- {
- format(szMiscArray, sizeof szMiscArray, "{FF8000}* {C2A2DA}%s casts their rod out, reeling it back in.", GetPlayerNameEx(playerid));
- SetPlayerChatBubble(playerid, szMiscArray, COLOR_PURPLE, 30.0, 4000);
- SendClientMessageEx(playerid, COLOR_PURPLE, szMiscArray);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have caught a bass!");
-
- PlayerInfo[playerid][pFishWeight] += 7;
-
- SetPVarInt(playerid, "pFishTime", gettime() + 10);
- IncreaseFishingLevel(playerid);
- }
- }
- }
- case 50 .. 99:
- {
- switch(random(4))
- {
- case 0:
- {
- format(szMiscArray, sizeof szMiscArray, "{FF8000}* {C2A2DA}%s casts their rod out, reeling it back in.", GetPlayerNameEx(playerid));
- SetPlayerChatBubble(playerid, szMiscArray, COLOR_PURPLE, 30.0, 4000);
- SendClientMessageEx(playerid, COLOR_PURPLE, szMiscArray);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have caught nothing!");
-
- SetPVarInt(playerid, "pFishTime", gettime() + 10);
- IncreaseFishingLevel(playerid);
- }
- case 1:
- {
- format(szMiscArray, sizeof szMiscArray, "{FF8000}* {C2A2DA}%s casts their rod out, reeling it back in.", GetPlayerNameEx(playerid));
- SetPlayerChatBubble(playerid, szMiscArray, COLOR_PURPLE, 30.0, 4000);
- SendClientMessageEx(playerid, COLOR_PURPLE, szMiscArray);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have caught a bluegill!");
- PlayerInfo[playerid][pFishWeight] += 5;
-
- SetPVarInt(playerid, "pFishTime", gettime() + 10);
- IncreaseFishingLevel(playerid);
- }
- case 2:
- {
- format(szMiscArray, sizeof szMiscArray, "{FF8000}* {C2A2DA}%s casts their rod out, reeling it back in.", GetPlayerNameEx(playerid));
- SetPlayerChatBubble(playerid, szMiscArray, COLOR_PURPLE, 30.0, 4000);
- SendClientMessageEx(playerid, COLOR_PURPLE, szMiscArray);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have caught a bass!");
- PlayerInfo[playerid][pFishWeight] += 7;
-
- SetPVarInt(playerid, "pFishTime", gettime() + 10);
- IncreaseFishingLevel(playerid);
- }
- case 3:
- {
- format(szMiscArray, sizeof szMiscArray, "{FF8000}* {C2A2DA}%s casts their rod out, reeling it back in.", GetPlayerNameEx(playerid));
- SetPlayerChatBubble(playerid, szMiscArray, COLOR_PURPLE, 30.0, 4000);
- SendClientMessageEx(playerid, COLOR_PURPLE, szMiscArray);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have caught a cod!");
- PlayerInfo[playerid][pFishWeight] += 14;
-
- SetPVarInt(playerid, "pFishTime", gettime() + 10);
- IncreaseFishingLevel(playerid);
- }
- case 4:
- {
- format(szMiscArray, sizeof szMiscArray, "{FF8000}* {C2A2DA}%s casts their rod out, reeling it back in.", GetPlayerNameEx(playerid));
- SetPlayerChatBubble(playerid, szMiscArray, COLOR_PURPLE, 30.0, 4000);
- SendClientMessageEx(playerid, COLOR_PURPLE, szMiscArray);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have caught a catfish!");
- PlayerInfo[playerid][pFishWeight] += 17;
-
- SetPVarInt(playerid, "pFishTime", gettime() + 10);
- IncreaseFishingLevel(playerid);
- }
- }
- }
- case 100 .. 199:
- {
- switch(random(8))
- {
- case 0:
- {
- format(szMiscArray, sizeof szMiscArray, "{FF8000}* {C2A2DA}%s casts their rod out, reeling it back in.", GetPlayerNameEx(playerid));
- SetPlayerChatBubble(playerid, szMiscArray, COLOR_PURPLE, 30.0, 4000);
- SendClientMessageEx(playerid, COLOR_PURPLE, szMiscArray);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have caught nothing!");
-
- SetPVarInt(playerid, "pFishTime", gettime() + 10);
- IncreaseFishingLevel(playerid);
- }
- case 1:
- {
- format(szMiscArray, sizeof szMiscArray, "{FF8000}* {C2A2DA}%s casts their rod out, reeling it back in.", GetPlayerNameEx(playerid));
- SetPlayerChatBubble(playerid, szMiscArray, COLOR_PURPLE, 30.0, 4000);
- SendClientMessageEx(playerid, COLOR_PURPLE, szMiscArray);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have caught a bluegill!");
- PlayerInfo[playerid][pFishWeight] += 5;
-
- SetPVarInt(playerid, "pFishTime", gettime() + 10);
- IncreaseFishingLevel(playerid);
- }
- case 2:
- {
- format(szMiscArray, sizeof szMiscArray, "{FF8000}* {C2A2DA}%s casts their rod out, reeling it back in.", GetPlayerNameEx(playerid));
- SetPlayerChatBubble(playerid, szMiscArray, COLOR_PURPLE, 30.0, 4000);
- SendClientMessageEx(playerid, COLOR_PURPLE, szMiscArray);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have caught a bass!");
- PlayerInfo[playerid][pFishWeight] += 7;
-
- SetPVarInt(playerid, "pFishTime", gettime() + 10);
- IncreaseFishingLevel(playerid);
- }
- case 3:
- {
- format(szMiscArray, sizeof szMiscArray, "{FF8000}* {C2A2DA}%s casts their rod out, reeling it back in.", GetPlayerNameEx(playerid));
- SetPlayerChatBubble(playerid, szMiscArray, COLOR_PURPLE, 30.0, 4000);
- SendClientMessageEx(playerid, COLOR_PURPLE, szMiscArray);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have caught a cod!");
- PlayerInfo[playerid][pFishWeight] += 14;
-
- SetPVarInt(playerid, "pFishTime", gettime() + 10);
- IncreaseFishingLevel(playerid);
- }
- case 4:
- {
- format(szMiscArray, sizeof szMiscArray, "{FF8000}* {C2A2DA}%s casts their rod out, reeling it back in.", GetPlayerNameEx(playerid));
- SetPlayerChatBubble(playerid, szMiscArray, COLOR_PURPLE, 30.0, 4000);
- SendClientMessageEx(playerid, COLOR_PURPLE, szMiscArray);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have caught a catfish!");
- PlayerInfo[playerid][pFishWeight] += 17;
-
- SetPVarInt(playerid, "pFishTime", gettime() + 10);
- IncreaseFishingLevel(playerid);
- }
- case 5:
- {
- format(szMiscArray, sizeof szMiscArray, "{FF8000}* {C2A2DA}%s casts their rod out, reeling it back in.", GetPlayerNameEx(playerid));
- SetPlayerChatBubble(playerid, szMiscArray, COLOR_PURPLE, 30.0, 4000);
- SendClientMessageEx(playerid, COLOR_PURPLE, szMiscArray);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have caught a pike!");
- PlayerInfo[playerid][pFishWeight] += 24;
-
- SetPVarInt(playerid, "pFishTime", gettime() + 10);
- IncreaseFishingLevel(playerid);
- }
- case 6:
- {
- format(szMiscArray, sizeof szMiscArray, "{FF8000}* {C2A2DA}%s casts their rod out, reeling it back in.", GetPlayerNameEx(playerid));
- SetPlayerChatBubble(playerid, szMiscArray, COLOR_PURPLE, 30.0, 4000);
- SendClientMessageEx(playerid, COLOR_PURPLE, szMiscArray);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have caught a zander!");
- PlayerInfo[playerid][pFishWeight] += 30;
-
- SetPVarInt(playerid, "pFishTime", gettime() + 10);
- IncreaseFishingLevel(playerid);
- }
- case 7:
- {
- format(szMiscArray, sizeof szMiscArray, "{FF8000}* {C2A2DA}%s casts their rod out, reeling it back in.", GetPlayerNameEx(playerid));
- SetPlayerChatBubble(playerid, szMiscArray, COLOR_PURPLE, 30.0, 4000);
- SendClientMessageEx(playerid, COLOR_PURPLE, szMiscArray);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have caught a mackerel!");
- PlayerInfo[playerid][pFishWeight] += 35;
-
- SetPVarInt(playerid, "pFishTime", gettime() + 10);
- IncreaseFishingLevel(playerid);
- }
- case 8:
- {
- format(szMiscArray, sizeof szMiscArray, "{FF8000}* {C2A2DA}%s casts their rod out, reeling it back in.", GetPlayerNameEx(playerid));
- SetPlayerChatBubble(playerid, szMiscArray, COLOR_PURPLE, 30.0, 4000);
- SendClientMessageEx(playerid, COLOR_PURPLE, szMiscArray);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have caught a molly!");
- PlayerInfo[playerid][pFishWeight] += 40;
-
- SetPVarInt(playerid, "pFishTime", gettime() + 10);
- IncreaseFishingLevel(playerid);
- }
- }
- }
- case 200 .. 399:
- {
- switch(random(11))
- {
- case 0:
- {
- format(szMiscArray, sizeof szMiscArray, "{FF8000}* {C2A2DA}%s casts their rod out, reeling it back in.", GetPlayerNameEx(playerid));
- SetPlayerChatBubble(playerid, szMiscArray, COLOR_PURPLE, 30.0, 4000);
- SendClientMessageEx(playerid, COLOR_PURPLE, szMiscArray);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have caught nothing!");
-
- SetPVarInt(playerid, "pFishTime", gettime() + 10);
- IncreaseFishingLevel(playerid);
- }
- case 1:
- {
- format(szMiscArray, sizeof szMiscArray, "{FF8000}* {C2A2DA}%s casts their rod out, reeling it back in.", GetPlayerNameEx(playerid));
- SetPlayerChatBubble(playerid, szMiscArray, COLOR_PURPLE, 30.0, 4000);
- SendClientMessageEx(playerid, COLOR_PURPLE, szMiscArray);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have caught a bluegill!");
- PlayerInfo[playerid][pFishWeight] += 5;
-
- SetPVarInt(playerid, "pFishTime", gettime() + 10);
- IncreaseFishingLevel(playerid);
- }
- case 2:
- {
- format(szMiscArray, sizeof szMiscArray, "{FF8000}* {C2A2DA}%s casts their rod out, reeling it back in.", GetPlayerNameEx(playerid));
- SetPlayerChatBubble(playerid, szMiscArray, COLOR_PURPLE, 30.0, 4000);
- SendClientMessageEx(playerid, COLOR_PURPLE, szMiscArray);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have caught a bass!");
- PlayerInfo[playerid][pFishWeight] += 7;
-
- SetPVarInt(playerid, "pFishTime", gettime() + 10);
- IncreaseFishingLevel(playerid);
- }
- case 3:
- {
- format(szMiscArray, sizeof szMiscArray, "{FF8000}* {C2A2DA}%s casts their rod out, reeling it back in.", GetPlayerNameEx(playerid));
- SetPlayerChatBubble(playerid, szMiscArray, COLOR_PURPLE, 30.0, 4000);
- SendClientMessageEx(playerid, COLOR_PURPLE, szMiscArray);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have caught a cod!");
- PlayerInfo[playerid][pFishWeight] += 14;
-
- SetPVarInt(playerid, "pFishTime", gettime() + 10);
- IncreaseFishingLevel(playerid);
- }
- case 4:
- {
- format(szMiscArray, sizeof szMiscArray, "{FF8000}* {C2A2DA}%s casts their rod out, reeling it back in.", GetPlayerNameEx(playerid));
- SetPlayerChatBubble(playerid, szMiscArray, COLOR_PURPLE, 30.0, 4000);
- SendClientMessageEx(playerid, COLOR_PURPLE, szMiscArray);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have caught a catfish!");
- PlayerInfo[playerid][pFishWeight] += 17;
-
- SetPVarInt(playerid, "pFishTime", gettime() + 10);
- IncreaseFishingLevel(playerid);
- }
- case 5:
- {
- format(szMiscArray, sizeof szMiscArray, "{FF8000}* {C2A2DA}%s casts their rod out, reeling it back in.", GetPlayerNameEx(playerid));
- SetPlayerChatBubble(playerid, szMiscArray, COLOR_PURPLE, 30.0, 4000);
- SendClientMessageEx(playerid, COLOR_PURPLE, szMiscArray);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have caught a pike!");
- PlayerInfo[playerid][pFishWeight] += 24;
-
- SetPVarInt(playerid, "pFishTime", gettime() + 10);
- IncreaseFishingLevel(playerid);
- }
- case 6:
- {
- format(szMiscArray, sizeof szMiscArray, "{FF8000}* {C2A2DA}%s casts their rod out, reeling it back in.", GetPlayerNameEx(playerid));
- SetPlayerChatBubble(playerid, szMiscArray, COLOR_PURPLE, 30.0, 4000);
- SendClientMessageEx(playerid, COLOR_PURPLE, szMiscArray);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have caught a zander!");
- PlayerInfo[playerid][pFishWeight] += 30;
-
- SetPVarInt(playerid, "pFishTime", gettime() + 10);
- IncreaseFishingLevel(playerid);
- }
- case 7:
- {
- format(szMiscArray, sizeof szMiscArray, "{FF8000}* {C2A2DA}%s casts their rod out, reeling it back in.", GetPlayerNameEx(playerid));
- SetPlayerChatBubble(playerid, szMiscArray, COLOR_PURPLE, 30.0, 4000);
- SendClientMessageEx(playerid, COLOR_PURPLE, szMiscArray);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have caught a mackerel!");
- PlayerInfo[playerid][pFishWeight] += 35;
-
- SetPVarInt(playerid, "pFishTime", gettime() + 10);
- IncreaseFishingLevel(playerid);
- }
- case 8:
- {
- format(szMiscArray, sizeof szMiscArray, "{FF8000}* {C2A2DA}%s casts their rod out, reeling it back in.", GetPlayerNameEx(playerid));
- SetPlayerChatBubble(playerid, szMiscArray, COLOR_PURPLE, 30.0, 4000);
- SendClientMessageEx(playerid, COLOR_PURPLE, szMiscArray);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have caught a molly!");
- PlayerInfo[playerid][pFishWeight] += 40;
-
- SetPVarInt(playerid, "pFishTime", gettime() + 10);
- IncreaseFishingLevel(playerid);
- }
- case 9:
- {
- format(szMiscArray, sizeof szMiscArray, "{FF8000}* {C2A2DA}%s casts their rod out, reeling it back in.", GetPlayerNameEx(playerid));
- SetPlayerChatBubble(playerid, szMiscArray, COLOR_PURPLE, 30.0, 4000);
- SendClientMessageEx(playerid, COLOR_PURPLE, szMiscArray);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have caught a swordfish!");
- PlayerInfo[playerid][pFishWeight] += 70;
-
- SetPVarInt(playerid, "pFishTime", gettime() + 10);
- IncreaseFishingLevel(playerid);
- }
- case 10:
- {
- format(szMiscArray, sizeof szMiscArray, "{FF8000}* {C2A2DA}%s casts their rod out, reeling it back in.", GetPlayerNameEx(playerid));
- SetPlayerChatBubble(playerid, szMiscArray, COLOR_PURPLE, 30.0, 4000);
- SendClientMessageEx(playerid, COLOR_PURPLE, szMiscArray);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have caught a tench!");
- PlayerInfo[playerid][pFishWeight] += 71;
-
- SetPVarInt(playerid, "pFishTime", gettime() + 10);
- IncreaseFishingLevel(playerid);
- }
- case 11:
- {
- format(szMiscArray, sizeof szMiscArray, "{FF8000}* {C2A2DA}%s casts their rod out, reeling it back in.", GetPlayerNameEx(playerid));
- SetPlayerChatBubble(playerid, szMiscArray, COLOR_PURPLE, 30.0, 4000);
- SendClientMessageEx(playerid, COLOR_PURPLE, szMiscArray);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have caught a seabass!");
- PlayerInfo[playerid][pFishWeight] += 80;
-
- SetPVarInt(playerid, "pFishTime", gettime() + 10);
- IncreaseFishingLevel(playerid);
- }
- }
- }
- default:
- {
- switch(random(12))
- {
- case 0:
- {
- format(szMiscArray, sizeof szMiscArray, "{FF8000}* {C2A2DA}%s casts their rod out, reeling it back in.", GetPlayerNameEx(playerid));
- SetPlayerChatBubble(playerid, szMiscArray, COLOR_PURPLE, 30.0, 4000);
- SendClientMessageEx(playerid, COLOR_PURPLE, szMiscArray);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have caught nothing!");
-
- SetPVarInt(playerid, "pFishTime", gettime() + 10);
- IncreaseFishingLevel(playerid);
- }
- case 1:
- {
- format(szMiscArray, sizeof szMiscArray, "{FF8000}* {C2A2DA}%s casts their rod out, reeling it back in.", GetPlayerNameEx(playerid));
- SetPlayerChatBubble(playerid, szMiscArray, COLOR_PURPLE, 30.0, 4000);
- SendClientMessageEx(playerid, COLOR_PURPLE, szMiscArray);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have caught a bluegill!");
- PlayerInfo[playerid][pFishWeight] += 5;
-
- SetPVarInt(playerid, "pFishTime", gettime() + 10);
- IncreaseFishingLevel(playerid);
- }
- case 2:
- {
- format(szMiscArray, sizeof szMiscArray, "{FF8000}* {C2A2DA}%s casts their rod out, reeling it back in.", GetPlayerNameEx(playerid));
- SetPlayerChatBubble(playerid, szMiscArray, COLOR_PURPLE, 30.0, 4000);
- SendClientMessageEx(playerid, COLOR_PURPLE, szMiscArray);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have caught a bass!");
- PlayerInfo[playerid][pFishWeight] += 7;
-
- SetPVarInt(playerid, "pFishTime", gettime() + 10);
- IncreaseFishingLevel(playerid);
- }
- case 3:
- {
- format(szMiscArray, sizeof szMiscArray, "{FF8000}* {C2A2DA}%s casts their rod out, reeling it back in.", GetPlayerNameEx(playerid));
- SetPlayerChatBubble(playerid, szMiscArray, COLOR_PURPLE, 30.0, 4000);
- SendClientMessageEx(playerid, COLOR_PURPLE, szMiscArray);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have caught a cod!");
- PlayerInfo[playerid][pFishWeight] += 14;
-
- SetPVarInt(playerid, "pFishTime", gettime() + 10);
- IncreaseFishingLevel(playerid);
- }
- case 4:
- {
- format(szMiscArray, sizeof szMiscArray, "{FF8000}* {C2A2DA}%s casts their rod out, reeling it back in.", GetPlayerNameEx(playerid));
- SetPlayerChatBubble(playerid, szMiscArray, COLOR_PURPLE, 30.0, 4000);
- SendClientMessageEx(playerid, COLOR_PURPLE, szMiscArray);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have caught a catfish!");
- PlayerInfo[playerid][pFishWeight] += 17;
-
- SetPVarInt(playerid, "pFishTime", gettime() + 10);
- IncreaseFishingLevel(playerid);
- }
- case 5:
- {
- format(szMiscArray, sizeof szMiscArray, "{FF8000}* {C2A2DA}%s casts their rod out, reeling it back in.", GetPlayerNameEx(playerid));
- SetPlayerChatBubble(playerid, szMiscArray, COLOR_PURPLE, 30.0, 4000);
- SendClientMessageEx(playerid, COLOR_PURPLE, szMiscArray);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have caught a pike!");
- PlayerInfo[playerid][pFishWeight] += 24;
-
- SetPVarInt(playerid, "pFishTime", gettime() + 10);
- IncreaseFishingLevel(playerid);
- }
- case 6:
- {
- format(szMiscArray, sizeof szMiscArray, "{FF8000}* {C2A2DA}%s casts their rod out, reeling it back in.", GetPlayerNameEx(playerid));
- SetPlayerChatBubble(playerid, szMiscArray, COLOR_PURPLE, 30.0, 4000);
- SendClientMessageEx(playerid, COLOR_PURPLE, szMiscArray);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have caught a zander!");
- PlayerInfo[playerid][pFishWeight] += 30;
-
- SetPVarInt(playerid, "pFishTime", gettime() + 10);
- IncreaseFishingLevel(playerid);
- }
- case 7:
- {
- format(szMiscArray, sizeof szMiscArray, "{FF8000}* {C2A2DA}%s casts their rod out, reeling it back in.", GetPlayerNameEx(playerid));
- SetPlayerChatBubble(playerid, szMiscArray, COLOR_PURPLE, 30.0, 4000);
- SendClientMessageEx(playerid, COLOR_PURPLE, szMiscArray);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have caught a mackerel!");
- PlayerInfo[playerid][pFishWeight] += 35;
-
- SetPVarInt(playerid, "pFishTime", gettime() + 10);
- IncreaseFishingLevel(playerid);
- }
- case 8:
- {
- format(szMiscArray, sizeof szMiscArray, "{FF8000}* {C2A2DA}%s casts their rod out, reeling it back in.", GetPlayerNameEx(playerid));
- SetPlayerChatBubble(playerid, szMiscArray, COLOR_PURPLE, 30.0, 4000);
- SendClientMessageEx(playerid, COLOR_PURPLE, szMiscArray);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have caught a molly!");
- PlayerInfo[playerid][pFishWeight] += 40;
-
- SetPVarInt(playerid, "pFishTime", gettime() + 10);
- IncreaseFishingLevel(playerid);
- }
- case 9:
- {
- format(szMiscArray, sizeof szMiscArray, "{FF8000}* {C2A2DA}%s casts their rod out, reeling it back in.", GetPlayerNameEx(playerid));
- SetPlayerChatBubble(playerid, szMiscArray, COLOR_PURPLE, 30.0, 4000);
- SendClientMessageEx(playerid, COLOR_PURPLE, szMiscArray);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have caught a swordfish!");
- PlayerInfo[playerid][pFishWeight] += 70;
-
- SetPVarInt(playerid, "pFishTime", gettime() + 10);
- IncreaseFishingLevel(playerid);
- }
- case 10:
- {
- format(szMiscArray, sizeof szMiscArray, "{FF8000}* {C2A2DA}%s casts their rod out, reeling it back in.", GetPlayerNameEx(playerid));
- SetPlayerChatBubble(playerid, szMiscArray, COLOR_PURPLE, 30.0, 4000);
- SendClientMessageEx(playerid, COLOR_PURPLE, szMiscArray);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have caught a tench!");
- PlayerInfo[playerid][pFishWeight] += 71;
-
- SetPVarInt(playerid, "pFishTime", gettime() + 10);
- IncreaseFishingLevel(playerid);
- }
- case 11:
- {
- format(szMiscArray, sizeof szMiscArray, "{FF8000}* {C2A2DA}%s casts their rod out, reeling it back in.", GetPlayerNameEx(playerid));
- SetPlayerChatBubble(playerid, szMiscArray, COLOR_PURPLE, 30.0, 4000);
- SendClientMessageEx(playerid, COLOR_PURPLE, szMiscArray);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have caught a seabass!");
- PlayerInfo[playerid][pFishWeight] += 80;
-
- SetPVarInt(playerid, "pFishTime", gettime() + 10);
- IncreaseFishingLevel(playerid);
- }
- case 12:
- {
- format(szMiscArray, sizeof szMiscArray, "{FF8000}* {C2A2DA}%s casts their rod out, reeling it back in.", GetPlayerNameEx(playerid));
- SetPlayerChatBubble(playerid, szMiscArray, COLOR_PURPLE, 30.0, 4000);
- SendClientMessageEx(playerid, COLOR_PURPLE, szMiscArray);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have caught a kraken!");
- PlayerInfo[playerid][pFishWeight] += 200;
-
- SetPVarInt(playerid, "pFishTime", gettime() + 10);
- IncreaseFishingLevel(playerid);
- }
- }
- }
- }
- }
- else SendClientMessageEx(playerid, COLOR_GRAD2, " You must wait 10 more seconds before you can cast out again!");
- }
- else SendClientMessageEx(playerid, COLOR_GRAD2, " You have reached your maximum weight. Type /sellfish to profit.");
- }
- }
- else return SendClientMessageEx(playerid, COLOR_GRAD2, " You are not in a boat!");
- }
- //else SendClientMessageEx(playerid, COLOR_GRAD2, " You are not a fisherman!");
- return 1;
- }
- CMD:myfish(playerid, params[]) {
- format(szMiscArray, sizeof(szMiscArray), "Fish: %d lbs.", PlayerInfo[playerid][pFishWeight]);
- SendClientMessageEx(playerid, COLOR_YELLOW, szMiscArray);
- return 1;
- }
- CMD:sellfish(playerid, params[]) {
- new amount;
- if(GetPVarInt(playerid, "pFishSellTime") < gettime())
- {
- if(PlayerInfo[playerid][pFishWeight] < 50) return SendClientMessageEx(playerid, COLOR_GREY, "You must at least have fifty pounds of fish to sell them.");
- if(IsPlayerInRangeOfPoint(playerid, 30.0, 2161.0513,-98.5897,2.7893))
- {
- if(sscanf(params, "d", amount))
- {
- SendClientMessageEx(playerid, COLOR_GREY, "USAGE: /sellfish [amount]");
- format(szMiscArray, sizeof szMiscArray, "Fish: %d lbs.", PlayerInfo[playerid][pFishWeight]);
- return SendClientMessageEx(playerid, COLOR_YELLOW, szMiscArray);
- }
-
- if(amount < 50) return SendClientMessageEx(playerid, COLOR_GREY, "You can only sell over 50 pounds of fish at a time.");
- if(PlayerInfo[playerid][pFishWeight] >= amount && PlayerInfo[playerid][pFishWeight] != 0)
- {
- new rand = random(100) + 100, money = amount * 40 + rand;
- PlayerInfo[playerid][pFishWeight] -= amount;
- GivePlayerCash(playerid, money);
- SetPVarInt(playerid, "pFishSellTime", gettime() + 120);
-
- format(szMiscArray, sizeof szMiscArray, "You have sold %d lbs for $%s.", amount, number_format(money));
- SendClientMessageEx(playerid, COLOR_YELLOW, szMiscArray);
- }
- else return SendClientMessageEx(playerid, COLOR_GRAD2, " You don't have that many pounds!");
- }
- else
- {
- if(CheckPointCheck(playerid)) cmd_killcheckpoint(playerid, params);
- GameTextForPlayer(playerid, "~g~CHECKPOINT ~r~SET", 5000, 4);
- SetPVarInt(playerid, "pSellingFish", 1);
- SetPlayerCheckpoint(playerid, 2161.0513,-98.5897,2.7893, 10.0);
- return SendClientMessageEx(playerid, COLOR_YELLOW, "Make your way to the checkpoint to sell your fish.");
- }
- }
- else SendClientMessageEx(playerid, COLOR_GRAD2, " You must wait two minutes before selling your fish again!");
- return 1;
- }
|