15.09.2011, 14:18
Right, so I have this code, but in game, the message wont print, does anyone know why?
pawn Код:
if(strcmp(cmd, "/createhouse", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (PlayerInfo[playerid][pAdmin] < 10)
{
SendClientMessage(playerid,COLOR_WHITE,"You're not authroized to use this command !");
return 1;
}
else
{
new house;
for(new h = 1; h < SCRIPT_MAXHOUSES; h++)
{
if(HouseInfo[h][hOwned] != 1)
{
house = h;
break;
}
else
{
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid,X,Y,Z);
//format(string,sizeof(string),"Exit of Biz %d to %f - %f - %f",proplev,X,Y,Z);
//ABroadCast(COLOR_YELLOW,string,1);
SendClientMessage(playerid,COLOR_LIGHTRED,"A house should've been created.");
HouseInfo[house][hEntrancex] = X;
HouseInfo[house][hEntrancey] = Y;
HouseInfo[house][hEntrancez] = Z;
HouseInfo[house][hPickupID] = CreateDynamicPickup(1273, 1, X, Y, Z);
OnPropUpdate();
return 1;
}
}
}
}
return 1;
}