16.02.2011, 11:51
Код:
if(strcmp(cmd, "/bizfee", true) == 0)
{
new bouse = PlayerInfo[playerid][pPbiskey];
if (bouse == -1)
{
SendClientMessage(playerid, COLOR_GRAD2, " You don't own a business");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /bizfee [EntranceFee]");
}
if(strval(tmp) < 0)
{
SendClientMessage(playerid, COLOR_WHITE, "Minimum entrance is $0");
return 1;
}
if (bouse >= 100)
{
SBizzInfo[bouse-100][sbEntcost] = strval(tmp);
format(string, sizeof(string), "Entrance fee set to $%d", SBizzInfo[bouse-100][sbEntcost]);
}
else
{
BizzInfo[bouse][bEntcost] = strval(tmp);
format(string, sizeof(string), "Entrance fee set to $%d", BizzInfo[bouse][bEntcost]);
}
OnPropUpdate();
SendClientMessage(playerid, COLOR_WHITE, string);
return 1;
}

