16.09.2011, 17:23
Hello.
I have this command, but it moves house ID 0 and doesn't create a new one, I cannot seem to find the problem.
I have this command, but it moves house ID 0 and doesn't create a new one, I cannot seem to find the problem.
pawn Код:
if(strcmp(cmd, "/createhouse", true) == 0)
{
new house;
if (PlayerInfo[playerid][pAdmin] < 10) return SendClientMessage(playerid,COLOR_WHITE,"You're not authroized to use this command !");
print("Debug above loop");
for(new h; h < sizeof(HouseInfo); h++)
{
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid,X,Y,Z);
print("Debug in loop");
HouseInfo[house][hEntrancex] = X;
printf("House ID %d, X[%f]", house, X);
HouseInfo[house][hEntrancey] = Y;
printf("House ID %d, Y[%f]", house, Y);
HouseInfo[house][hEntrancez] = Z;
printf("House ID %d, Z[%f]", house, Z);
HouseInfo[house][hPickupID] = CreateDynamicPickup(1273, 1, X, Y, Z);
OnPropUpdate();
return 1;
}
print("Debug after loop");
return 1;
}