09.02.2016, 00:14
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; }