CMD Help
#4

It is saying 'undefined symbol: 'house'... so I put in :
Код:
new house;
and it does the same thing, just sell house id 0...
Quote:
Originally Posted by IceBilizard
Посмотреть сообщение
Try this
PHP код:
CMD:asellallhouses(playeridparams[])
{
    if (
PlayerInfo[playerid][pAdmin] >= 4)
    {
        new 
playername[MAX_PLAYER_NAME];
        
GetPlayerName(playeridplayernamesizeof(playername));
        new 
string[128];
        for (new 
i0!= MAX_HOUSESi++)
        {
        
HouseInfo[house][hLock] = 1;
        new 
ip[32];
        
GetPlayerIp(playerid,ip,sizeof(ip));
        
format(string,sizeof(string),"Administrator %s (IP: %s) has admin-sold house ID %d (was owned by %s).",GetPlayerNameEx(playerid),ip,house,HouseInfo[house][hOwner]);
        
Log("logs/house.log"string);
        
ClearHouse(house);
        
formatHouseInfo[house][hOwner], 128"Nobody" );
        
HouseInfo[house][hGLUpgrade] = 1;
        
PlayerPlaySound(playerid10520.00.00.0);
        
format(stringsizeof(string), "~w~You have sold house %d."i);
        
GameTextForPlayer(playeridstring100003);
        
SaveHouses();
        
DestroyDynamicPickup(HouseInfo[house][hPickupID]);
        
HouseInfo[house][hPickupID] = CreateDynamicPickup(127323HouseInfo[house][hExteriorX], HouseInfo[house][hExteriorY], HouseInfo[house][hExteriorZ]);
        
DestroyDynamic3DTextLabel(HouseInfo[house][hTextID]);
        
format(stringsizeof(string), "This home is\n for sale!\n Description: %s\nCost: $%d\n Level: %d\n/buyhouse to buy it.",HouseInfo[house][hDescription],HouseInfo[house][hValue],HouseInfo[house][hLevel]);
        
HouseInfo[house][hTextID] = CreateDynamic3DTextLabelstringCOLOR_GREENHouseInfo[house][hExteriorX], HouseInfo[house][hExteriorY], HouseInfo[house][hExteriorZ]+0.5,30.0INVALID_PLAYER_IDINVALID_VEHICLE_ID0, -1, -1,  -130.0);
        return 
1;
        }
    }
    else
    {
        
SendClientMessageEx(playeridCOLOR_GREY"You are not authorized to use that command!");
    }
    return 
1;

Reply


Messages In This Thread
CMD Help - by JKent - 03.08.2018, 11:56
Re: CMD Help - by IceBilizard - 03.08.2018, 12:25
Re: CMD Help - by Florin48 - 03.08.2018, 13:18
Re: CMD Help - by JKent - 03.08.2018, 16:10
Re: CMD Help - by DBZdabIt3Bro7 - 03.08.2018, 16:45
Re: CMD Help - by coool - 03.08.2018, 17:18

Forum Jump:


Users browsing this thread: 2 Guest(s)