08.01.2011, 16:13
so i've got
and
and at top
But in my command, is something wrong? why won't compiler respond? Thanks
pawn Код:
dcmd(hdeposit,8,cmdtext);
pawn Код:
dcmd_hdeposit(playerid,params[])
{
#pragma unused params
new pName[MAX_PLAYER_NAME],file[256],string[128],string2[128];
for(new i = 0; i < MAX_HOUSES; i++)
{
GetPlayerName(playerid,pName,sizeof(pName));
if(!IsPlayerInRangeOfPoint(playerid, 3, HInfo[i][HX], HInfo[i][HY], HInfo[i][HZ])) continue;
format(string,sizeof(string),"%s",pName);
format(file,sizeof(file),"Houses/%d.ini",i);
if(strcmp(HInfo[i][Owner], string, true) != 0) return SendClientMessage(playerid,COLOR_ERROR,"You are not the owner of this house, only the owner can deposit money.");
if(sscanf(params, "d", moneydeposit)) return SendClientMessage(playerid, COLOR_ERROR, "Usage: /hdeposit [Amount Of Money To Deposit]");
if(moneydeposit == 0) return SendClientMessage(playerid,COLOR_ERROR,"You cannot deposit less then $1.");
dini_IntSet(file, "StoreCash", + mondeydeposit);
HInfo[i][StoreCash] = moneydeposit + HInfo[i][StoreCash];
format(string2,sizeof(string),"You have deposited $%d into your house safe. You have a total of $%d now.",moneydeposit,moneydeposit + HInfo[i][StoreCash]);
SendClientMessage(playerid,COLOR_GREY,string);
return 1;
}
SendClientMessage(playerid,COLOR_ERROR,"You are not near a house, you must be near the door of the house to deposit money.");
return 1;
}
pawn Код:
enum House
{
Price,
Locked,
Float: HX,
Float: HY,
Float: HZ,
Owner[MAX_PLAYER_NAME],
bool: Owned,
Interior,
Float: TeleX,
Float: TeleY,
Float: TeleZ,
StoreCash
}