How can I combine these...
#1

https://sampforum.blast.hk/showthread.php?tid=118379
And
https://sampforum.blast.hk/showthread.php?tid=149416

So I have one big script?
Reply
#2

just put in in one another..
Reply
#3

Quote:
Originally Posted by Kar
Посмотреть сообщение
just put in in one another..
Could you possibly give me an example?
Reply
#4

/facepalm
._.

just copy the codes out of house and put in biz.
Reply
#5

Quote:
Originally Posted by Kar
Посмотреть сообщение
/facepalm
._.

just copy the codes out of house and put in biz.
Alright, I'll post any Errors, if i get any .
Reply
#6

I am having trouble with this,

pawn Код:
public OnPlayerPickUpPickup(playerid,pickupid) //If you have one of these add the stuff in this to your on‌e =]
{
  for(new C; C<BusinessCount+1; C++)//Loops through all businesses
  {
    if(pickupid == BusinessPickup[C]) //Checks if the pickup is for a business
    {
      new str[150];//Creates a string.
      if(BusinessInfo[C][BusOwner] == -1) format(str, sizeof(str), "%s ~n~~r~Cost price: $%d ~b~Sale price: $%d ~n~ ~g~Earn ammount: $%d", BusinessInfo[C][BusName], BusinessInfo[C][BusCost], BusinessInfo[C][BusSell], BusinessInfo[C][BusEarn]); //Makes the string for a business with no owner.
      if(BusinessInfo[C][BusOwner] != -1)
      {
        new Pname[24]; //Creates player name variable
        GetPlayerName(BusinessInfo[C][BusOwner], Pname, 24); //Gets player name
        format(str, sizeof(str), "%s ~n~~r~Cost price: $%d ~b~Sale price: $%d ~n~ ~g~Earn ammount: $%d~n~~w~Owner: %s(%d)", BusinessInfo[C][BusName], BusinessInfo[C][BusCost], BusinessInfo[C][BusSell], BusinessInfo[C][BusEarn], Pname, BusinessInfo[C][BusOwner]);
        GameTextForPlayer(playerid, str, 3000, 3);
      }
    }
  }
  return 1;
}

{
  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 /buy 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[150];
      format(str3, sizeof(str3), "%s~n~%s", str, str2);
      GameTextForPlayer(playerid, str3, 3500, 3);
      return 1;
    }
  }
  return 1;
}
They are both under OnPlayerPickup, Are you able to just make that in to one thing please?
Reply
#7

Quote:
Originally Posted by Luis_Leone
Посмотреть сообщение
I am having trouble with this,

pawn Код:
public OnPlayerPickUpPickup(playerid,pickupid) //If you have one of these add the stuff in this to your on‌e =]
{
  for(new C; C<BusinessCount+1; C++)//Loops through all businesses
  {
    if(pickupid == BusinessPickup[C]) //Checks if the pickup is for a business
    {
      new str[150];//Creates a string.
      if(BusinessInfo[C][BusOwner] == -1) format(str, sizeof(str), "%s ~n~~r~Cost price: $%d ~b~Sale price: $%d ~n~ ~g~Earn ammount: $%d", BusinessInfo[C][BusName], BusinessInfo[C][BusCost], BusinessInfo[C][BusSell], BusinessInfo[C][BusEarn]); //Makes the string for a business with no owner.
      if(BusinessInfo[C][BusOwner] != -1)
      {
        new Pname[24]; //Creates player name variable
        GetPlayerName(BusinessInfo[C][BusOwner], Pname, 24); //Gets player name
        format(str, sizeof(str), "%s ~n~~r~Cost price: $%d ~b~Sale price: $%d ~n~ ~g~Earn ammount: $%d~n~~w~Owner: %s(%d)", BusinessInfo[C][BusName], BusinessInfo[C][BusCost], BusinessInfo[C][BusSell], BusinessInfo[C][BusEarn], Pname, BusinessInfo[C][BusOwner]);
        GameTextForPlayer(playerid, str, 3000, 3);
      }
    }
  }
  return 1;
}

{
  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 /buy 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[150];
      format(str3, sizeof(str3), "%s~n~%s", str, str2);
      GameTextForPlayer(playerid, str3, 3500, 3);
      return 1;
    }
  }
  return 1;
}
They are both under OnPlayerPickup, Are you able to just make that in to one thing please?
What do you mean?
Reply
#8

rename every single pickup
Reply
#9

All i want is for all of that to be in one big OnPlayerPickup?

Quote:
Originally Posted by VictorMartinez
Посмотреть сообщение
rename every single pickup
How do you mean?
Reply
#10

Maybe post the errors you're getting when you try to compile it like that. It'll be easier for us to understand what's not working properly.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)