/createhouse cmd
#1

hi
ignore stefan's elite house system v1.1 bugs topic bec. i found house system fs work but without /createhouse cmd can any one give me this cmd plz
Reply
#2

Get GarHouse? I dont think anyone will give you code.
Reply
#3

but garhouse system zcmd and i wanna /createhouse cmd with strcmp
Reply
#4

They want just /createhouse [how much it will be cost] and its all.If you have Garsino house system (ITS BEST!!)
Reply
#5

i have problem in garhouse system it say
it can't read:
#include <sscanf2>
#include <YSI\y_ini>
#include <ZCMD>
#include <streamer>
#include <foreach>

but i already have those


i just wanna /createhouse system strcmp with icon and 3d label thats only
Reply
#6

Quote:
Originally Posted by misho1
View Post
only
? lol that's not a lil thing ... that takes hour to script and no one now uses strcmp so use garHouse its the best so far
Reply
#7

i said i have problem with garhouse it say it can't read
#include <sscanf2>
#include <YSI\y_ini>
#include <ZCMD>
#include <streamer>
#include <foreach>

but i already hvae those
Reply
#8

https://sampforum.blast.hk/showthread.php?tid=183776
Reply
#9

it now can read the file and it compiled amx and pwn
but there are problem it say unknown command
first i login in rcon then i typed /changespawn and /createhouse final /addhcar
those cmd /changespawn and /createhouse and /addcar don't work plz help
Reply
#10

help me plz
Reply
#11

sry its 3 posts but
i saw /createhouse cmd when i put it in my fs i got 6 errors and 6 warning
pawn Code:
#include <a_samp>
#include <dini>
#define MAX_HOUSES 2000


enum houseinfo
{
    HouseNames[60], //To save into the file
    HouseCost, //The house cost
    HouseOwner[24], // The house owners Name
    Float:PickupX, // PickupX
    Float:PickupY, //PickupY
    Float:PickupZ, //PickupZ
    Float:TeleX, //The house location
    Float:TeleY, //The house location
    Float:TeleZ, //The house location
    Interior, //The house Interior
    HouseSell, //House sell price
    Owned,
    Virtual
}

new HouseInfo[MAX_HOUSES][houseinfo]; //It saves all the info in this variable.
new HouseCount = -1; //House count
new PickupID[MAX_HOUSES];
new InHouse[MAX_PLAYERS] = -1;

stock CreateHouse(Filename[], Cost, Float:Pickupx, Float:Pickupy, Float:Pickupz, Float:Telex, Float:Teley, Float:Telez, interior, sell)
{
    if(!dini_Exists("Owners.ini"))
    {
        dini_Create("Owners.ini");
    }
  HouseCount ++;
  new ID = HouseCount; //HouseID
  format(HouseInfo[ID][HouseNames], 60, "%s", Filename); //Saves the HouseName into a variable
  HouseInfo[ID][HouseCost] = Cost;
  HouseInfo[ID][PickupX] = Pickupx;
  HouseInfo[ID][Virtual] = 2000000 + ID;
  HouseInfo[ID][PickupY] = Pickupy;
  HouseInfo[ID][PickupZ] = Pickupz;
  HouseInfo[ID][TeleX] = Telex;
  HouseInfo[ID][TeleY] = Teley;
  HouseInfo[ID][TeleZ] = Telez;
  HouseInfo[ID][Interior] = interior;
  HouseInfo[ID][HouseSell] = sell;
  format(HouseInfo[ID][HouseOwner], 24, "gj9043jg-er((23");
    if(strlen(dini_Get("Owners.ini", Filename))) //This is to see if there is any owner.
    {
    format(HouseInfo[ID][HouseOwner], 24, "%s", dini_Get("Owners.ini", Filename));
    HouseInfo[ID][Owned] = 1;
    }
  PickupID[ID] = CreatePickup(1273, 23, Pickupx, Pickupy, Pickupz, -1); //Creates the pickup :).
  Create3DTextLabel("House", 0x00A0F6AA, Pickupx, Pickupy, Pickupz + 0.75, 15.0, 0, 1);
}

public OnPlayerPickUpPickup(playerid, pickupid) //Pickup callback
{
  for(new J; J<MAX_HOUSES; J++) //Loops through all houses
  {
    if(pickupid == PickupID[J]) //If the pickupid is one of our house ones
    {
      new str[75];
      if(HouseInfo[J][Owned] == 1)
      {
        format(str, sizeof(str), "~r~House Info~n~~g~Owner: ~w~%s", HouseInfo[J][HouseOwner]);
      }
      if(HouseInfo[J][Owned] == 0)
      {
        format(str, sizeof(str), "~r~House Info~n~~g~Owner: ~w~Nobody");
        SendClientMessage(playerid, 0x67F6F6AA, "This house is up for sale! Type /buyh to buy it");
      }
      new str2[100];
      format(str2, sizeof(str2), "~g~Cost price:~w~ %d ~n~~g~Sell Price:~w~ %d", HouseInfo[J][HouseCost], HouseInfo[J][HouseSell]);
      new str3[175];
      format(str3, sizeof(str3), "%s~n~%s", str, str2);
      GameTextForPlayer(playerid, str3, 3500, 3);
      return 1;
    }
  }
  return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/buyh", cmdtext, true, 10) == 0)
  {
    for(new i; i<MAX_HOUSES; i++)
    {
      if(!IsPlayerInRangeOfPoint(playerid, 3, HouseInfo[i][PickupX], HouseInfo[i][PickupY], HouseInfo[i][PickupZ])) continue;

                new Pname[24]; GetPlayerName(playerid, Pname, 24);
                for(new S; S<MAX_HOUSES; S++)
                {
            if(!strcmp(dini_Get("Owned.ini", HouseInfo[S][HouseNames]), Pname)) return SendClientMessage(playerid, 0xF60000AA, "You already have a house!");
                }
                if(GetPlayerMoney(playerid) < HouseInfo[i][HouseCost]) return SendClientMessage(playerid, 0xF60000AA, "You don't have enough money to buy this house");
                if(HouseInfo[i][Owned] == 1) return SendClientMessage(playerid, 0xF60000AA, "This house is already owned!");
                GivePlayerMoney(playerid, - HouseInfo[i][HouseCost]);
        GameTextForPlayer(playerid, "~r~House Purchased!", 2000, 3);
        HouseInfo[i][Owned] = 1;
        GetPlayerName(playerid, Pname, 24);
        format(HouseInfo[i][HouseOwner], 24, "%s", Pname);
        dini_Set("Owners.ini", HouseInfo[i][HouseNames], Pname);
        return 1;
        }
        SendClientMessage(playerid, 0xF60000AA, "You are not close enough to a house");
    return 1;
  }

  if (strcmp("/sellh", cmdtext, true, 10) == 0)
  {
    new type[128];
    if(IsPlayerAdmin(playerid)) {
        if(sscanf(params, "s", type))
        {
            SendClientMessage(playerid, WHITE, "SYNTAX: /createhouse option - options: Help|Interior|Exterior|Finish");
        } else {

             if (strcmp("/cancelh", cmdtext, true, 10) == 0)
  {
                GetPlayerPos(playerid, HC[playerid][exteriorX], HC[playerid][exteriorY],HC[playerid][exteriorZ]);
            }
        if (strcmp("/interiorh", cmdtext, true, 10) == 0)
  {
                GetPlayerPos(playerid, HC[playerid][interiorX], HC[playerid][interiorY],HC[playerid][interiorZ]);
                HC[playerid][interiorInt] = GetPlayerInterior(playerid);
            }
              if (strcmp("/Doneh", cmdtext, true, 10) == 0)
  {
                BuildHouse(-1, HC[playerid][exteriorX], HC[playerid][exteriorY],HC[playerid][exteriorZ], HC[playerid][interiorX], HC[playerid][interiorY],HC[playerid][interiorZ], HC[playerid][interiorInt], 1);
                SendClientMessage(playerid, WHITE, "House created!");
            }
        }
    } else {
        SendClientMessage(playerid, WHITE, "You are not authorised to use that command.");
        return 1;
    }
  if (strcmp("/sellh", cmdtext, true, 10) == 0)
  {
    for(new i; i<MAX_HOUSES; i++)
        {
      if(IsPlayerInRangeOfPoint(playerid, 3, HouseInfo[i][PickupX], HouseInfo[i][PickupY], HouseInfo[i][PickupZ]))
        {
        new Pname[24]; GetPlayerName(playerid, Pname, 24);
        if(strcmp(Pname, HouseInfo[i][HouseOwner])) return SendClientMessage(playerid, 0xF60000AA, "You don't own this house!");
        GivePlayerMoney(playerid, HouseInfo[i][HouseSell]);
        GameTextForPlayer(playerid, "~r~House Sold!", 2000, 3);
        HouseInfo[i][Owned] = 0;
        format(HouseInfo[i][HouseOwner], 24, "0943jt3u9*egjlfd");
        dini_Unset("Owners.ini", HouseInfo[i][HouseNames]);
        return 1;
            }
        }
    SendClientMessage(playerid, 0xF60000AA, "You are not close enough to a house");
        return 1;
  }
  if (strcmp("/enter", cmdtext, true, 10) == 0)
  {
    for(new i; i<MAX_HOUSES; i++)
        {
      if(IsPlayerInRangeOfPoint(playerid, 3, HouseInfo[i][PickupX], HouseInfo[i][PickupY], HouseInfo[i][PickupZ]))
        {
        new Pname[24]; GetPlayerName(playerid, Pname, 24);
        if(strcmp(Pname, HouseInfo[i][HouseOwner])) return SendClientMessage(playerid, 0xF60000AA, "You don't own this house!");
        SetPlayerPos(playerid, HouseInfo[i][TeleX], HouseInfo[i][TeleY], HouseInfo[i][TeleZ]);
        SetPlayerInterior(playerid, HouseInfo[i][Interior]);
        InHouse[playerid] = i;
        SetPlayerVirtualWorld(playerid, HouseInfo[i][Virtual]);
        SendClientMessage(playerid, 0x00C4F6AA, "You have entered your house");
        return 1;
      }
    }
    SendClientMessage(playerid, 0xF60000AA, "You are not close enough to a house");
    return 1;
  }
  command(lockhouse, playerid, params[])
{
    #pragma unused params
    for(new h; h < MAX_HOUSES; h++) {
        if(IsPlayerInRangeOfPoint(playerid, 3.5, HD[h][exteriorX], HD[h][exteriorY], HD[h][exteriorZ])) {
            if(strcmp(HD[h][owner], ReturnName(playerid), true) == 0) {
                if(HD[h][locked] == 0) {
                    GameTextForPlayer(playerid, "House ~r~locked", 3000, 5);
                    HD[h][locked] = 1;
                } else {
                    GameTextForPlayer(playerid, "House ~g~unlocked", 3000, 5);
                    HD[h][locked] = 0;
                }
            }
        }
        if(IsPlayerInRangeOfPoint(playerid, 3.5, HD[h][interiorX], HD[h][interiorY], HD[h][interiorZ]) && GetPlayerInterior(playerid) == HD[h][interiorInt]) {
            if(strcmp(HD[h][owner], ReturnName(playerid), true) == 0) {
                if(HD[h][locked] == 0) {
                    GameTextForPlayer(playerid, "House ~r~locked", 3000, 5);
                    HD[h][locked] = 1;
                } else {
                    GameTextForPlayer(playerid, "House ~g~unlocked", 3000, 5);
                    HD[h][locked] = 0;
                }
            }
        }
    }
    return 1;
}

command(setprice, playerid, params[])
{
    new HID, HP, string[128];
    if(IsPlayerAdmin(playerid)) {
        if(sscanf(params, "dd", HID, HP)) {
            SendClientMessage(playerid, WHITE, "SYNTAX: /setprice [HOUSE ID] [HOUSE PRICE]");
        } else {
            HD[HID][price] = HP;
            format(string, sizeof(string), "You set house %d's price to $%d.", HID, HP);
            SendClientMessage(playerid, WHITE, string);
        }
    }
    return 1;
}
  if (strcmp("/exit", cmdtext, true, 10) == 0)
  {
    if(InHouse[playerid] == -1) return SendClientMessage(playerid, 0xF60000AA, "You are not in a house");
    SetPlayerPos(playerid, HouseInfo[InHouse[playerid]][PickupX], HouseInfo[InHouse[playerid]][PickupY], HouseInfo[InHouse[playerid]][PickupZ]);
    SetPlayerInterior(playerid, 0);
    SetPlayerVirtualWorld(playerid, 0);
    SendClientMessage(playerid, 0x00C4F6AA, "You have exited your house");
    InHouse[playerid] = -1;
    return 1;
  }
  return 0;
}]
plz answer fast
Reply
#12

plz answer fast
Reply
#13

Quote:
Originally Posted by paradox58
View Post
95.87.235.218:7777 my server [Los Santos][Gang Wars] i'm makeing vips adding in gangs and fight wars for territories join!
Why the hell are you advertising ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)