Will this command work ?
#1

pawn Код:
dcmd_createhouse(playerid, params[])
{
    if(IsPlayerConnected(playerid))
    {
        new price, level, descri;
        new houseid = -1;
        new Float:X, Float:Y, Float:Z;
        GetPlayerPos(playerid, X,Y,Z);
        if (sscanf(params, "ddS(No Description)[64]",price, level, descri))
            return SendClientMessage(playerid, COLOR_WHITE, "[{EE5555}USAGE{FFFFFF}]: /createhouse [price] [level] [description ( optinal )");
        if (PlayerInfo[playerid][pAdmin] >= 10)
        {
            for(new h = 0; h < sizeof(HouseInfo); h++)
            {
                if(HouseInfo[h][hExists] == 1)
                {
                    houseid = h + 1;
                }
                HouseInfo[houseid][hOwned] = 1;
                HouseInfo[houseid][hLock] = 1;
                HouseInfo[houseid][hValue] = price;
                HouseInfo[houseid][hLevel] = level;
                HouseInfo[houseid][hDiscription] = descri;
                HouseInfo[houseid][hEntrancex] = X;
                HouseInfo[houseid][hEntrancey] = Y;
                HouseInfo[houseid][hEntrancez] = Z;
                Create3DTextLabel("{FFFFFF}[{88EE88}Property{FFFFFF}]",0x00AE00FF,HouseInfo[h][hEntrancex], HouseInfo[houseid][hEntrancey], HouseInfo[houseid][hEntrancez]+0.75,20.0,0,1);
                HouseInfo[houseid][hPickupID] = CreateDynamicPickup(1273, 1, HouseInfo[houseid][hEntrancex], HouseInfo[houseid][hEntrancey], HouseInfo[houseid][hEntrancez]);
            }
        }
    }
    OnPropUpdate();
    return 1;
}
If no, what's wrong ?
Reply


Messages In This Thread
Will this command work ? - by Fat - 21.09.2011, 18:03
Re: Will this command work ? - by [MWR]Blood - 21.09.2011, 18:06
Re: Will this command work ? - by sleepysnowflake - 21.09.2011, 18:48
Re: Will this command work ? - by Fat - 21.09.2011, 18:53
Re: Will this command work ? - by Fat - 22.09.2011, 04:11

Forum Jump:


Users browsing this thread: 3 Guest(s)