Bug problem need help
#1

Player can't get +5 score when have fish



Код:
CMD:sellfish(playerid,params[])
{
    if(!IsPlayerInRangeOfPoint(playerid,5.0,2332.2595,564.6697,7.9927))
	    return SendClientMessage(playerid,-1,"{00FF00}[SERVER]:{FFFFFF} You are not near the Fishing Pier Shop");

	new string[128], pay;
	pay = FishWeigh[playerid]*Fish_Price;
	format(string,sizeof(string),"{00FF00}[SERVER]:{FFFFFF} You have earned %i$ by selling your %i kilograms     of fish and got +5 score ",pay,FishWeigh[playerid]);
	SendClientMessage(playerid,-1,string);
	FishWeigh[playerid] = 0;
        FishOnPlayer[playerid] = 0;
	GivePlayerMoney(playerid,pay);
	if(FishWeigh[playerid] == 0) return SendClientMessage(playerid,-1,"You don't have any fish");
	else if(FishWeigh[playerid] == 1)
	SetPlayerScore(playerid, GetPlayerScore(playerid) +5);
	return 1;
}
Reply
#2

bump
Reply
#3

FishWeigh[playerid] = 0;
FishOnPlayer[playerid] = 0;
GivePlayerMoney(playerid,pay);
if(FishWeigh[playerid] == 0) return SendClientMessage(playerid,-1,"You don't have any fish");
else if(FishWeigh[playerid] == 1)


It will never be 1, as you already reset it to 0
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)