[Help] Bugged Fishing
#1

Today I made a new fishing system because couldn't find any, I made it and its the code,
Код:
	if (strcmp("/fish", cmdtext, true) == 0)
	{
		new vehicle;
		new fishrnd;
		new weightrnd;
		vehicle = GetPlayerVehicleID(playerid);
		fishrnd = random(10);
		weightrnd = random(10);
		if (vehicle = 453)
		{
		if (fishrnd = 1)
		{
		GivePlayerMoney(playerid, -10);
		SendClientMessage(playerid, COLOR_OOC, "[Fishing] You caught some Shrimps");
		GivePlayerMoney(playerid, (1 * weightrnd));
		}
		if (fishrnd = 2)
		{
		GivePlayerMoney(playerid, -10);
		SendClientMessage(playerid, COLOR_OOC, "[Fishing] You caught some Sardine");
		GivePlayerMoney(playerid, (2 * weightrnd));
		}
		if (fishrnd = 3)
		{
		GivePlayerMoney(playerid, -10);
		SendClientMessage(playerid, COLOR_OOC, "[Fishing] You caught some Herring");
		GivePlayerMoney(playerid, (3 * weightrnd));
		}
		if (fishrnd = 4)
		{
		GivePlayerMoney(playerid, -10);
		SendClientMessage(playerid, COLOR_OOC, "[Fishing] You caught some Mackerel");
		GivePlayerMoney(playerid, (4 * weightrnd));
		}
		if (fishrnd = 5)
		{
		GivePlayerMoney(playerid, -10);
		SendClientMessage(playerid, COLOR_OOC, "[Fishing] You caught some Trout");
		GivePlayerMoney(playerid, (5 * weightrnd));
		}
		if (fishrnd = 6)
		{
		GivePlayerMoney(playerid, -10);
		SendClientMessage(playerid, COLOR_OOC, "[Fishing] You caught a pair of pants and threw it back");
		}
		if (fishrnd = 7)
		{
		GivePlayerMoney(playerid, -10);
		SendClientMessage(playerid, COLOR_OOC, "[Fishing] You caught a used condom and threw it back");
		}
		if (fishrnd = 8)
		{
		GivePlayerMoney(playerid, -10);
		SendClientMessage(playerid, COLOR_OOC, "[Fishing] You caught a moneybag, lucky you");
		GivePlayerMoney(playerid, (10 * weightrnd));
		}
		}
		else if (vehicle != 453)
		{
		SendClientMessage(playerid, COLOR_OOC, "[Fishing] You are not in a Reefer");
		}
		return 1;
	}
The problem is, it doesnt check the vehicle and when I say the cmd it looks like all fishes caught but no money, only 8 * -10(bait money), Please fix it!
Reply


Messages In This Thread
[Help] Bugged Fishing - by Thrarod - 14.03.2010, 13:06
Re: [Help] Bugged Fishing - by paweltbg94 - 14.03.2010, 13:17
Re: [Help] Bugged Fishing - by Desert - 14.03.2010, 13:20
Re: [Help] Bugged Fishing - by Thrarod - 14.03.2010, 13:41
Re: [Help] Bugged Fishing - by Thrarod - 16.03.2010, 16:26
Re: [Help] Bugged Fishing - by Desert - 16.03.2010, 17:15
Re: [Help] Bugged Fishing - by Thrarod - 17.03.2010, 15:09
Re: [Help] Bugged Fishing - by biltong - 17.03.2010, 17:49
Re: [Help] Bugged Fishing - by Thrarod - 08.04.2010, 18:31

Forum Jump:


Users browsing this thread: 1 Guest(s)