15.09.2011, 19:29
PHP код:
if(strcmp(cmd, "/createhouse", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new house;
if (PlayerInfo[playerid][pAdmin] < 10) return SendClientMessage(playerid,COLOR_WHITE,"You're not authroized to use this command !");
for(new h = 1; h < SCRIPT_MAXHOUSES; h++)
{
if(HouseInfo[h][hOwned] != 1)
{
house = h;
break;
}
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid,X,Y,Z);
print("debug");
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;
}