Код:
if(IsStringSame(cmdtext,CHouseCommand))
{
if(!IsPlayerAdmin(playerid))
{
SendClientMessage(playerid,HCOLOR_ERROR,MSGAccess);
}
new string[256];
new Cost;
new Inter;
if(sscanf(cmdtext,"dd",Cost,Inter))
{
format(string,sizeof(string),"%s (Price) (Interior)",CHouseCommand);
SendClientMessage(playerid,HCOLOR_ERROR,string);
return 1;
}
if(Cost < 0)
{
SendClientMessage(playerid,HCOLOR_ERROR,MSGHPrice);
return 1;
}
if(Inter <= 0 || Inter > 10)
{
SendClientMessage(playerid,HCOLOR_ERROR,MSGHInteriors);
return 1;
}
CreateHouse(playerid,Cost,Inter);
format(string,sizeof(string),"You have succerfully created a new house. Price: $%d. Interior: %d",Cost,Inter);
SendClientMessage(playerid,HCOLOR_WHITE,string);
return 1;
}