19.09.2014, 15:01
Hello! there is a problem:
pl. that if there are five pieces of food but I can not stand five, allow only four and left me with a piece of food.
all of them will not let me pass.
**Bad English
pl. that if there are five pieces of food but I can not stand five, allow only four and left me with a piece of food.
all of them will not let me pass.
Код:
CMD:transf(playerid, params[]) { new mit[512], amount,szendvics,atadid; szendvics = GetItemAmount(playerid,"Food"); if(sscanf(params, "us[512]d", atadid, mit, mennyit)) return SendClientMessage(playerid, -1, "(( Hasznбlat: /transf [ Name/ID ] [ Food ] [ Amount ] ))"); if(!IsPlayerConnected(atadid)) return SendClientMessage(playerid, COLOR_ORANGE, "(( Offline player! ))"); if(atadid == playerid) return SendClientMessage(playerid, COLOR_ORANGE, "(( Magadnak nem adhatsz бt! ))"); if(IsPlayerOwnItem(playerid,"Food")) { if(mennyit < 0) return SCM(playerid,-1,"(( Not much you can give to! ))"); if(mennyit < szendvics) <<<< Pass amount { RemoveItem(playerid,"Food",amount); AddItem(atadid,"Food",amount); Cselekves(playerid,"transfer to a food."); } else { SCM(playerid,COLOR_RED,"(( Do not have that! ))"); } }else SendClientMessage(playerid,-1,"(( No your food! ))"); return 1; }