SA-MP Forums Archive
Housing in Raven's Gamemode - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Housing in Raven's Gamemode (/showthread.php?tid=284929)



Housing in Raven's Gamemode - Ehab1911 - 21.09.2011

Hey, How's everyone?

Guys, I have Raven's Gamemode.. I know it's based on Godfather but, I don't know how to add more houses in it. Could you please help me out?

Thank you!


Re: Housing in Raven's Gamemode - Kingunit - 21.09.2011

Take a look into the Raven's Roleplay thread. It's there at the right section. ,, Commands ". I don't really know Raven's. But did you checked /createhouse or something like that.


Re: Housing in Raven's Gamemode - Ehab1911 - 21.09.2011

Hmm I think it's something about adding lines to ini file or txt.. I'll see if there was a properties ini file


Re: Housing in Raven's Gamemode - Fat - 21.09.2011

Quote:
Originally Posted by Fat
Посмотреть сообщение
Ehab, I'm scripted a /createhouse, but it always moves house ID 0 instead making a new one >.>...
pawn Код:
dcmd_createhouse(playerid, params[])
{
    new Float:X,Float:Y,Float:Z, price;
    //new count;
    //printf("%d",count++);
    if (PlayerInfo[playerid][pAdmin] < 10) return SendClientMessage(playerid,COLOR_WHITE,"You're not authroized to use this command !");
    if(sscanf(params, "d", price)) return SendClientMessage(playerid, COLOR_WHITE, "[{EE5555}USAGE{FFFFFF}]: /createhouse [price]");
    for(new h = 0; h < sizeof(HouseInfo); h++)
    {
        if(IsPlayerInRangeOfPoint(playerid, 1.0, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]) && HouseInfo[h][hOwned] == 0)
        {
            if(PlayerInfo[playerid][pLevel] < HouseInfo[h][hLevel])
            {
                new string[128];
                format(string,sizeof(string),"You need level %d for this house.",HouseInfo[h][hLevel]);
                SendClientMessage(playerid,COLOR_LIGHTRED,string);
                return 1;
            }
            GetPlayerPos(playerid, X,Y,Z);
            HouseInfo[h][hOwned] = 1;
            HouseInfo[h][hLock] = 1;
            HouseInfo[h][hValue] = price;
            HouseInfo[h][hEntrancex] = X;
            HouseInfo[h][hEntrancey] = Y;
            HouseInfo[h][hEntrancez] = Z;
            Create3DTextLabel("{FFFFFF}[{88EE88}Property{FFFFFF}]",0x00AE00FF,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]+0.75,20.0,0,1);
            HouseInfo[h][hPickupID] = CreateDynamicPickup(1273, 1, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]);
        }
    }
    return 1;
}



Re: Housing in Raven's Gamemode - Ehab1911 - 21.09.2011

Quote:
Originally Posted by Fat
Посмотреть сообщение
pawn Код:
dcmd_createhouse(playerid, params[])
{
    new Float:X,Float:Y,Float:Z, price;
    //new count;
    //printf("%d",count++);
    if (PlayerInfo[playerid][pAdmin] < 10) return SendClientMessage(playerid,COLOR_WHITE,"You're not authroized to use this command !");
    if(sscanf(params, "d", price)) return SendClientMessage(playerid, COLOR_WHITE, "[{EE5555}USAGE{FFFFFF}]: /createhouse [price]");
    for(new h = 0; h < sizeof(HouseInfo); h++)
    {
        if(IsPlayerInRangeOfPoint(playerid, 1.0, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]) && HouseInfo[h][hOwned] == 0)
        {
            if(PlayerInfo[playerid][pLevel] < HouseInfo[h][hLevel])
            {
                new string[128];
                format(string,sizeof(string),"You need level %d for this house.",HouseInfo[h][hLevel]);
                SendClientMessage(playerid,COLOR_LIGHTRED,string);
                return 1;
            }
            GetPlayerPos(playerid, X,Y,Z);
            HouseInfo[h][hOwned] = 1;
            HouseInfo[h][hLock] = 1;
            HouseInfo[h][hValue] = price;
            HouseInfo[h][hEntrancex] = X;
            HouseInfo[h][hEntrancey] = Y;
            HouseInfo[h][hEntrancez] = Z;
            Create3DTextLabel("{FFFFFF}[{88EE88}Property{FFFFFF}]",0x00AE00FF,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]+0.75,20.0,0,1);
            HouseInfo[h][hPickupID] = CreateDynamicPickup(1273, 1, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]);
        }
    }
    return 1;
}
rep for this mate, but should it be like

/createhouse houseid entrance exit price description

Thank you ^^


Re: Housing in Raven's Gamemode - Kingunit - 21.09.2011

Quote:
Originally Posted by Ehab1911
Посмотреть сообщение
Hmm I think it's something about adding lines to ini file or txt.. I'll see if there was a properties ini file
There is a command to create houses. You don't need to play with the .ini files.
Anyway it's /sethouse ingame.