17.08.2011, 18:35
I place some random MAX_HOUSES for the loop
Try this. I am honestly not sure if it works [ Make a backup of the files where the houses are in case it fails ]
On top of your script
At the command
Try this. I am honestly not sure if it works [ Make a backup of the files where the houses are in case it fails ]
On top of your script
pawn Код:
#define MAX_HOUSES [put your max houses here]
pawn Код:
if(PlayerInfo[playerid][pAdmin] >= 4)
{
for(new h; h < MAX_HOUSES; h++)
{
HouseInfo[h][hHel] = 0;
HouseInfo[h][hArm] = 0;
HouseInfo[h][hHealthx] = 0;
HouseInfo[h][hHealthy] = 0;
HouseInfo[h][hHealthz] = 0;
HouseInfo[h][hArmourx] = 0;
HouseInfo[h][hArmoury] = 0;
HouseInfo[h][hArmourz] = 0;
HouseInfo[h][hLock] = 1;
HouseInfo[h][hOwned] = 0;
HouseInfo[h][hVec] = 418;
HouseInfo[h][hVcol1] = -1;
HouseInfo[h][hVcol2] = -1;
strmid(HouseInfo[h][hOwner], "The State", 0, strlen("The State"), 255);
format(string, sizeof(string), "~w~You have sold all properties", HouseInfo[h][hValue]);
GameTextForPlayer(playerid, string, 10000, 3);
}
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
OnPropUpdate();
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "You are not an admin.");
}