07.11.2011, 16:39
(
Последний раз редактировалось Admigo; 07.11.2011 в 17:51.
)
Heey all,
I made deposit command for your house.
But when i am in house and i have enough money its says unknown command.
Code:
Pls how can i fix this?
Thanks Admigo
I made deposit command for your house.
But when i am in house and i have enough money its says unknown command.
Code:
Код:
dcmd_deposit(playerid,params[]) { new amount; new str[256],str1[256],pname[24],housenumber; housenumber = GetHouseID(playerid); GetPlayerName(playerid, pname, 24); if (sscanf(params, "d", amount)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /deposit [amount]"); if(IsInOwnHouse[playerid] == 0) { SendClientMessage(playerid,COLOR_RED,"You need to be in your house for this command!"); return 1; } if(GetPlayerMoney(playerid) < amount) return SendClientMessage(playerid,COLOR_RED,"You dont have so much money!"); if(amount < 1) return SendClientMessage(playerid,COLOR_RED,"Invalid Amount!"); if((hInfo[housenumber][HouseStorage] + amount) >= 250000000) return SendClientMessage(playerid,COLOR_RED,"You have reached the maximum storage!"); else { format(str1, sizeof(str1), "Houses/houseid%d", housenumber); str = dini_Get(str1,"HouseStorage"); hInfo[housenumber][HouseStorage] = (hInfo[housenumber][HouseStorage] + amount); //file = INI_Open(filename); //INI_WriteInt(file, "HouseStorage", hInfo[housenumber][HouseStorage]); dini_IntSet(str1, "HouseStorage", hInfo[housenumber][HouseStorage]); //INI_Close(file); GivePlayerMoney(playerid, -amount); SendClientMessage(playerid, COLOR_LIGHTBLUE,"You have successfully deposited some money into your house storage!"); } return 1; }
Thanks Admigo