global asellhouse command
#6

pawn Код:
#define SCRIPT_MAXHOUSES [Number of the Houses ya want]
pawn Код:
if(strcmp(cmd, "/asellhouse", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            GetPlayerName(playerid, playername, sizeof(playername));
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /asellhouse [houseid]");
                return 1;
            }
            new house = strval(tmp);
            if (PlayerInfo[playerid][pAdmin] >= 4)
            {
                HouseInfo[house][hHel] = 0;
                HouseInfo[house][hArm] = 0;
                HouseInfo[house][hHealthx] = 0;
                HouseInfo[house][hHealthy] = 0;
                HouseInfo[house][hHealthz] = 0;
                HouseInfo[house][hArmourx] = 0;
                HouseInfo[house][hArmoury] = 0;
                HouseInfo[house][hArmourz] = 0;
                HouseInfo[house][hLock] = 1;
                HouseInfo[house][hOwned] = 0;
                HouseInfo[house][hVec] = 418;
                HouseInfo[house][hVcol1] = -1;
                HouseInfo[house][hVcol2] = -1;
                SafeInfo[house][sDrugs] = 0;
                SafeInfo[house][sMats] = 0;
                SafeInfo[house][sGun][0] = 0;
                SafeInfo[house][sGun][1] = 0;
                SafeInfo[house][sGun][2] = 0;
                SafeInfo[house][sGun][3] = 0;
                SafeInfo[house][sAmmo][0] = 0;
                SafeInfo[house][sAmmo][1] = 0;
                SafeInfo[house][sAmmo][2] = 0;
                SafeInfo[house][sAmmo][3] = 0;
                strmid(HouseInfo[house][hOwner], "The State", 0, strlen("The State"), 255);
                PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
                format(string, sizeof(string), "~w~You have sold this property", HouseInfo[house][hValue]);
                GameTextForPlayer(playerid, string, 10000, 3);
                DestroyPickup(HouseInfo[house][hPickupID]);
                HouseInfo[house][hPickupID]=CreatePickup(1273, 1, HouseInfo[house][hEntrancex], HouseInfo[house][hEntrancey], HouseInfo[house][hEntrancez]);
                OnPropUpdate();
                SaveSafe();
                return 1;
            }
            else
            {
                SendClientMessage(playerid, COLOR_WHITE, "You're not an Admin.");
            }
        }
        return 1;
    }
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)