global asellhouse command
#5

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

pawn Код:
#define MAX_HOUSES [put your max houses here]
At the command

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.");
}
Reply


Messages In This Thread
global asellhouse command - by rekatluos - 15.08.2011, 21:35
Re: global asellhouse command - by rekatluos - 16.08.2011, 19:49
Re: global asellhouse command - by =WoR=Varth - 17.08.2011, 16:22
Re: global asellhouse command - by rekatluos - 17.08.2011, 18:28
Re: global asellhouse command - by KingTurtle - 17.08.2011, 18:35
Re: global asellhouse command - by ElieJabbour - 17.08.2011, 19:24

Forum Jump:


Users browsing this thread: 1 Guest(s)