23.11.2011, 01:10
instead of the the same /fish, stand still instantly get fishing weight. blah blah
Disregard the
, since i will remove that, and implement the standing/animation/fishing.
I would like to see if i could make the player do a fishing animation for 5 seconds with a fishing rod then you get the fishing result. making sure that the player cant spam /fish and get his inventory filled quick. could anyone code in the changes?
pawn Code:
if(strcmp(cmd,"/fish",true)==0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pFishes] > 5)
{
SendClientMessage(playerid, COLOR_RED, " You Hit the Fishing Cooldown! Go do something else!!");
return 1;
}
if(Fishes[playerid][pWeight1] > 0 && Fishes[playerid][pWeight2] > 0 && Fishes[playerid][pWeight3] > 0 && Fishes[playerid][pWeight4] > 0 && Fishes[playerid][pWeight5] > 0)
{
SendClientMessage(playerid, COLOR_RED, " You can't carry more than 5 Fish, sell or release them first!");
return 1;
}
new Veh = GetPlayerVehicleID(playerid);
if(GetVehicleModel(Veh) == 453)
{
if(IsAtFishPlace(playerid))
{
new Caught;
new rand;
new fstring[MAX_PLAYER_NAME];
new Level = PlayerInfo[playerid][pFishSkill];
if(Level >= 0 && Level <= 49) { Caught = random(150)+70; }
else if(Level >= 50 && Level <= 249) { Caught = random(200)+100; }
else if(Level >= 250 && Level <= 499) { Caught = random(230)+200; }
else if(Level >= 500 && Level <= 999) { Caught = random(270)+300; }
else if(Level >= 1000) { Caught = random(300)+400; }
rand = random(FishNamesNumber);
if(Caught <= 0)
{
SendClientMessage(playerid, COLOR_RED, " Line snapped!");
return 1;
}
else if(rand == 0)
{
SendClientMessage(playerid, COLOR_RED, " You caught a Jacket and threw it away!");
return 1;
}
else if(rand == 4)
{
SendClientMessage(playerid, COLOR_RED, " You caught some Pants and threw them away!");
return 1;
}
else if(rand == 7)
{
SendClientMessage(playerid, COLOR_RED, " You caught a Used Condom and threw it away!");
return 1;
}
else if(rand == 10)
{
SendClientMessage(playerid, COLOR_RED, " You caught a broken Dildo and threw it away!");
return 1;
}
else if(rand == 13)
{
SendClientMessage(playerid, COLOR_RED, " You caught a Corpse and threw it away!");
return 1;
}
else if(rand == 20)
{
new mrand = random(2000);
format(string, sizeof(string), "* You caught a Money Bag, containing $%d.", mrand);
SendClientMessage(playerid, COLOR_YELLOW, string);
PlayerInfo[playerid][pCash] = PlayerInfo[playerid][pCash]+mrand;
GivePlayerMoney(playerid, mrand);
return 1;
}
if(Fishes[playerid][pWeight1] == 0)
{
PlayerInfo[playerid][pFishes] += 1;
PlayerInfo[playerid][pFishSkill] += 1;
format(fstring, sizeof(fstring), "%s", FishNames[rand]);
strmid(Fishes[playerid][pFish1], fstring, 0, strlen(fstring), 255);
Fishes[playerid][pWeight1] = Caught;
format(string, sizeof(string), "* You have caught a %s, which weighs %d Lbs.", Fishes[playerid][pFish1], Caught);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
Fishes[playerid][pLastWeight] = Caught;
Fishes[playerid][pLastFish] = 1;
Fishes[playerid][pFid1] = rand;
Fishes[playerid][pFishID] = rand;
if(Caught > PlayerInfo[playerid][pBiggestFish])
{
format(string, sizeof(string), "* Your old record of %d Lbs has been passed, your new Biggest Fish is: %d Lbs.", PlayerInfo[playerid][pBiggestFish], Caught);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
PlayerInfo[playerid][pBiggestFish] = Caught;
}
}
else if(Fishes[playerid][pWeight2] == 0)
{
PlayerInfo[playerid][pFishes] += 1;
PlayerInfo[playerid][pFishSkill] += 1;
format(fstring, sizeof(fstring), "%s", FishNames[rand]);
strmid(Fishes[playerid][pFish2], fstring, 0, strlen(fstring), 255);
Fishes[playerid][pWeight2] = Caught;
format(string, sizeof(string), "* You have caught a %s, which weighs %d Lbs.", Fishes[playerid][pFish2], Caught);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
Fishes[playerid][pLastWeight] = Caught;
Fishes[playerid][pLastFish] = 2;
Fishes[playerid][pFid2] = rand;
Fishes[playerid][pFishID] = rand;
if(Caught > PlayerInfo[playerid][pBiggestFish])
{
format(string, sizeof(string), "* Your old record of %d Lbs has been passed, your new Biggest Fish is: %d Lbs.", PlayerInfo[playerid][pBiggestFish], Caught);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
PlayerInfo[playerid][pBiggestFish] = Caught;
}
}
else if(Fishes[playerid][pWeight3] == 0)
{
PlayerInfo[playerid][pFishes] += 1;
PlayerInfo[playerid][pFishSkill] += 1;
format(fstring, sizeof(fstring), "%s", FishNames[rand]);
strmid(Fishes[playerid][pFish3], fstring, 0, strlen(fstring), 255);
Fishes[playerid][pWeight3] = Caught;
format(string, sizeof(string), "* You have caught a %s, which weighs %d Lbs.", Fishes[playerid][pFish3], Caught);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
Fishes[playerid][pLastWeight] = Caught;
Fishes[playerid][pLastFish] = 3;
Fishes[playerid][pFid3] = rand;
Fishes[playerid][pFishID] = rand;
if(Caught > PlayerInfo[playerid][pBiggestFish])
{
format(string, sizeof(string), "* Your old record of %d Lbs has been passed, your new Biggest Fish is: %d Lbs.", PlayerInfo[playerid][pBiggestFish], Caught);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
PlayerInfo[playerid][pBiggestFish] = Caught;
}
}
else if(Fishes[playerid][pWeight4] == 0)
{
PlayerInfo[playerid][pFishes] += 1;
PlayerInfo[playerid][pFishSkill] += 1;
format(fstring, sizeof(fstring), "%s", FishNames[rand]);
strmid(Fishes[playerid][pFish4], fstring, 0, strlen(fstring), 255);
Fishes[playerid][pWeight4] = Caught;
format(string, sizeof(string), "* You have caught a %s, which weighs %d Lbs.", Fishes[playerid][pFish4], Caught);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
Fishes[playerid][pLastWeight] = Caught;
Fishes[playerid][pLastFish] = 4;
Fishes[playerid][pFid4] = rand;
Fishes[playerid][pFishID] = rand;
if(Caught > PlayerInfo[playerid][pBiggestFish])
{
format(string, sizeof(string), "* Your old record of %d Lbs has been passed, your new Biggest Fish is: %d Lbs.", PlayerInfo[playerid][pBiggestFish], Caught);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
PlayerInfo[playerid][pBiggestFish] = Caught;
}
}
else if(Fishes[playerid][pWeight5] == 0)
{
PlayerInfo[playerid][pFishes] += 1;
PlayerInfo[playerid][pFishSkill] += 1;
format(fstring, sizeof(fstring), "%s", FishNames[rand]);
strmid(Fishes[playerid][pFish5], fstring, 0, strlen(fstring), 255);
Fishes[playerid][pWeight5] = Caught;
format(string, sizeof(string), "* You have caught a %s, which weighs %d Lbs.", Fishes[playerid][pFish5], Caught);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
Fishes[playerid][pLastWeight] = Caught;
Fishes[playerid][pLastFish] = 5;
Fishes[playerid][pFid5] = rand;
Fishes[playerid][pFishID] = rand;
if(Caught > PlayerInfo[playerid][pBiggestFish])
{
format(string, sizeof(string), "* Your old record of %d Lbs has been passed, your new Biggest Fish is: %d Lbs.", PlayerInfo[playerid][pBiggestFish], Caught);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
PlayerInfo[playerid][pBiggestFish] = Caught;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You dont have any space for your Fish!");
return 1;
}
if(PlayerInfo[playerid][pFishSkill] == 50)
{ SendClientMessage(playerid, COLOR_YELLOW, "* Your Fishing Skill is now Level 2, you can now catch Heavier Fishes."); }
else if(PlayerInfo[playerid][pFishSkill] == 250)
{ SendClientMessage(playerid, COLOR_YELLOW, "* Your Fishing Skill is now Level 3, you can now catch Heavier Fishes."); }
else if(PlayerInfo[playerid][pFishSkill] == 500)
{ SendClientMessage(playerid, COLOR_YELLOW, "* Your Fishing Skill is now Level 4, you can now catch Heavier Fishes."); }
else if(PlayerInfo[playerid][pFishSkill] == 1000)
{ SendClientMessage(playerid, COLOR_YELLOW, "* Your Fishing Skill is now Level 5, you can now catch Heavier Fishes."); }
}
else
{
SendClientMessage(playerid, COLOR_RED, " You are not in at the fishing spot!");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_RED, " You are not in a fishing boat! /FindPort to find fishing boats");
return 1;
}
}
return 1;
}
pawn Code:
new Veh = GetPlayerVehicleID(playerid);
if(GetVehicleModel(Veh) == 453)
I would like to see if i could make the player do a fishing animation for 5 seconds with a fishing rod then you get the fishing result. making sure that the player cant spam /fish and get his inventory filled quick. could anyone code in the changes?