Help|| House System Command
#5

Still not working, I need a command which selling all the houses that founds on the server..

pawn Код:
COMMAND:asellallhouses(playerid, params[])
{
    new id,

    for(new id = 1; id < sizeof(HouseInfo); id++)
        {
            if (GetPVarInt(playerid, "PlayerLogged") == 0) return SendClientMessage(playerid, COLOR_WHITE, "You must be logged in to use this.");
            if(GetPVarInt(playerid, "Admin") >= 11)
            {
                format(string, sizeof(string), "You have sold all the houses in the server!");
                SendClientMessage(playerid,COLOR_GREY,string);
                HouseInfo[id][hLock] = 1;
                HouseInfo[id][hOwned] = 0;
                HouseInfo[id][hMoney] = 0;
                HouseInfo[id][hLock] = 0;
                strmid(HouseInfo[id][hOwner], "The State", 0, strlen("The State"), 255);
                DestroyDynamicPickup(HouseInfo[id][hPickupID]);
                HouseInfo[id][hPickupID]=CreateDynamicPickup(1273, 1, HouseInfo[id][hEnterX], HouseInfo[id][hEnterY], HouseInfo[id][hEnterZ]);
                format(string, sizeof(string), "housedata/%d.ini", id);
                if(DOF2_FileExists(string)) DOF2_RemoveFile(string);
            }
            else
            {
                SendClientMessage(playerid, COLOR_LIGHTRED, "You do not have access to this command !");
            }
        }
    }
    return 1;
}
Reply


Messages In This Thread
Help|| House System Command - by wakeuptomer - 25.01.2014, 14:52
Re: Help|| House System Command - by Dignity - 25.01.2014, 15:36
Re: Help|| House System Command - by wakeuptomer - 25.01.2014, 15:47
Re: Help|| House System Command - by Dignity - 25.01.2014, 15:50
Re: Help|| House System Command - by wakeuptomer - 25.01.2014, 17:45

Forum Jump:


Users browsing this thread: 2 Guest(s)