Szerző Téma: Ház vevés!  (Megtekintve 1416 alkalommal)

Nem elérhető sanyo

Ház vevés!
« Dátum: 2011. január 22. - 08:19:17 »
0 Show voters
Szisztok. valaki készítene egy ojan szkriptett amivel lehet hazakat veni? nagyon fontos lenne!! elõre is köszike

Nem elérhető BeNiBoY

  • 1342
    • Profil megtekintése
Ház vevés!
« Válasz #1 Dátum: 2011. január 22. - 08:51:58 »
0 Show voters
sziasztok*, olyan*, szkriptet*, venni* és kül sok ilyen van, nézz körül a szkripteknél ;)

Ház vevés!
« Válasz #2 Dátum: 2011. január 22. - 09:02:09 »
0 Show voters

Nem elérhető sanyo

Ház vevés!
« Válasz #3 Dátum: 2011. január 22. - 09:06:40 »
0 Show voters
nem találok sehol xd

Ház vevés!
« Válasz #4 Dátum: 2011. január 22. - 09:08:56 »
0 Show voters
Idézetet írta: Stricica date=1295683329\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"5499\" data-ipsquote-contentclass=\"forums_Topic
Csak kicsit keresgélj és meg is van a rendszer.
 
De én igen... :mistrust:

Nem elérhető sanyo

Ház vevés!
« Válasz #5 Dátum: 2011. január 22. - 09:42:38 »
0 Show voters
http://forum.sa-mp.com/showthread.php?t=118379 itt talaltam valamit de nem tudom letölteni:S
nagyom béna vagyok!még kezdõ


na találatam de errort ir:(
 
#include <a_samp>
#include <dini>
#define MAX_HOUSES 200
#pragma unused strtok
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 /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[175];
      format(str3, sizeof(str3), \"%s~n~%s\", str, str2);
      GameTextForPlayer(playerid, str3, 3500, 3);
      return 1;
    }
  }
  return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
  public OnPlayerCommandText(playerid, cmdtext)
{
    if (strcmp(\"/buy\", cmdtext, true, 10) == 0)
  {
    for(new i; i<MAX_HOUSES; i++)
    {
      if(!IsPlayerInRangeOfPoint(playerid, 3, HouseInfo[PickupX], HouseInfo[PickupY], HouseInfo[PickupZ])) continue;
                new Pname[24]; GetPlayerName(playerid, Pname, 24);
                for(new S; S<MAX_HOUSES; S++)
                {
            if(!strcmp(dini_Get(\"Owned.ini\", HouseInfo[HouseNames]), Pname)) return SendClientMessage(playerid, 0xF60000AA, \"You already have a house!\");
                }
                if(GetPlayerMoney(playerid) < HouseInfo[HouseCost]) return SendClientMessage(playerid, 0xF60000AA, \"You don\'t have enough money to buy this house\");
                if(HouseInfo[Owned] == 1) return SendClientMessage(playerid, 0xF60000AA, \"This house is already owned!\");
                GivePlayerMoney(playerid, - HouseInfo[HouseCost]);
        GameTextForPlayer(playerid, \"~r~House Purchased!\", 2000, 3);
        HouseInfo[Owned] = 1;
        GetPlayerName(playerid, Pname, 24);
        format(HouseInfo[HouseOwner], 24, \"%s\", Pname);
        dini_Set(\"Owners.ini\", HouseInfo[HouseNames], Pname);
        return 1;
        }
        SendClientMessage(playerid, 0xF60000AA, \"You are not close enough to a house\");
    return 1;
  }
  if (strcmp(\"/sell\", cmdtext, true, 10) == 0)
  {
    for(new i; i<MAX_HOUSES; i++)
        {
      if(IsPlayerInRangeOfPoint(playerid, 3, HouseInfo[PickupX], HouseInfo[PickupY], HouseInfo[PickupZ]))
        {
        new Pname[24]; GetPlayerName(playerid, Pname, 24);
        if(strcmp(Pname, HouseInfo[HouseOwner])) return SendClientMessage(playerid, 0xF60000AA, \"You don\'t own this house!\");
        GivePlayerMoney(playerid, HouseInfo[HouseSell]);
        GameTextForPlayer(playerid, \"~r~House Sold!\", 2000, 3);
        HouseInfo[Owned] = 0;
        format(HouseInfo[HouseOwner], 24, \"0943jt3u9*egjlfd\");
        dini_Unset(\"Owners.ini\", HouseInfo[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[PickupX], HouseInfo[PickupY], HouseInfo[PickupZ]))
        {
        new Pname[24]; GetPlayerName(playerid, Pname, 24);
        if(strcmp(Pname, HouseInfo[HouseOwner])) return SendClientMessage(playerid, 0xF60000AA, \"You don\'t own this house!\");
        SetPlayerPos(playerid, HouseInfo[TeleX], HouseInfo[TeleY], HouseInfo[TeleZ]);
        SetPlayerInterior(playerid, HouseInfo[interior]);
        InHouse[playerid] = i;
        SetPlayerVirtualWorld(playerid, HouseInfo[Virtual]);
        SendClientMessage(playerid, 0x00C4F6AA, \"You have entered your house\");
        return 1;
      }
    }
    SendClientMessage(playerid, 0xF60000AA, \"You are not close enough to a house\");
    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;
}
 
ezt irja: C:\\DOCUME~1\\sanyo\\Asztal\\garhause.pwn(2) : fatal error 100: cannot read from file: \"dini\"
Compilation aborted.Pawn compiler 3.2.3664           Copyright (c) 1997-2006, ITB CompuPhase
 
1 Error.

 
segits lecci
 
IceMan: Használd a [ code ] [ /code ] -t !
« Utoljára szerkesztve: 2011. január 22. - 15:15:10 írta IceMan. »

Ház vevés!
« Válasz #6 Dátum: 2011. január 22. - 09:48:05 »
0 Show voters
Idézetet írta: sanyo date=1295685758\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"5499\" data-ipsquote-contentclass=\"forums_Topic
na találatam de errort ir:(
 
#include <a_samp>
#include <dini>
#define MAX_HOUSES 200
#pragma unused strtok
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 /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[175];
      format(str3, sizeof(str3), \"%s~n~%s\", str, str2);
      GameTextForPlayer(playerid, str3, 3500, 3);
      return 1;
    }
  }
  return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
  public OnPlayerCommandText(playerid, cmdtext)
{
    if (strcmp(\"/buy\", cmdtext, true, 10) == 0)
  {
    for(new i; i<MAX_HOUSES; i++)
    {
      if(!IsPlayerInRangeOfPoint(playerid, 3, HouseInfo[PickupX], HouseInfo[PickupY], HouseInfo[PickupZ])) continue;
                new Pname[24]; GetPlayerName(playerid, Pname, 24);
                for(new S; S<MAX_HOUSES; S++)
                {
            if(!strcmp(dini_Get(\"Owned.ini\", HouseInfo[HouseNames]), Pname)) return SendClientMessage(playerid, 0xF60000AA, \"You already have a house!\");
                }
                if(GetPlayerMoney(playerid) < HouseInfo[HouseCost]) return SendClientMessage(playerid, 0xF60000AA, \"You don\'t have enough money to buy this house\");
                if(HouseInfo[Owned] == 1) return SendClientMessage(playerid, 0xF60000AA, \"This house is already owned!\");
                GivePlayerMoney(playerid, - HouseInfo[HouseCost]);
        GameTextForPlayer(playerid, \"~r~House Purchased!\", 2000, 3);
        HouseInfo[Owned] = 1;
        GetPlayerName(playerid, Pname, 24);
        format(HouseInfo[HouseOwner], 24, \"%s\", Pname);
        dini_Set(\"Owners.ini\", HouseInfo[HouseNames], Pname);
        return 1;
        }
        SendClientMessage(playerid, 0xF60000AA, \"You are not close enough to a house\");
    return 1;
  }
  if (strcmp(\"/sell\", cmdtext, true, 10) == 0)
  {
    for(new i; i<MAX_HOUSES; i++)
        {
      if(IsPlayerInRangeOfPoint(playerid, 3, HouseInfo[PickupX], HouseInfo[PickupY], HouseInfo[PickupZ]))
        {
        new Pname[24]; GetPlayerName(playerid, Pname, 24);
        if(strcmp(Pname, HouseInfo[HouseOwner])) return SendClientMessage(playerid, 0xF60000AA, \"You don\'t own this house!\");
        GivePlayerMoney(playerid, HouseInfo[HouseSell]);
        GameTextForPlayer(playerid, \"~r~House Sold!\", 2000, 3);
        HouseInfo[Owned] = 0;
        format(HouseInfo[HouseOwner], 24, \"0943jt3u9*egjlfd\");
        dini_Unset(\"Owners.ini\", HouseInfo[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[PickupX], HouseInfo[PickupY], HouseInfo[PickupZ]))
        {
        new Pname[24]; GetPlayerName(playerid, Pname, 24);
        if(strcmp(Pname, HouseInfo[HouseOwner])) return SendClientMessage(playerid, 0xF60000AA, \"You don\'t own this house!\");
        SetPlayerPos(playerid, HouseInfo[TeleX], HouseInfo[TeleY], HouseInfo[TeleZ]);
        SetPlayerInterior(playerid, HouseInfo[interior]);
        InHouse[playerid] = i;
        SetPlayerVirtualWorld(playerid, HouseInfo[Virtual]);
        SendClientMessage(playerid, 0x00C4F6AA, \"You have entered your house\");
        return 1;
      }
    }
    SendClientMessage(playerid, 0xF60000AA, \"You are not close enough to a house\");
    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;
}
 
ezt irja: C:\\DOCUME~1\\sanyo\\Asztal\\garhause.pwn(2) : fatal error 100: cannot read from file: \"dini\"
Compilation aborted.Pawn compiler 3.2.3664           Copyright (c) 1997-2006, ITB CompuPhase
 
1 Error.

 
segits lecci
 
Elõször is, ezt én találtam  :@ Másodszor:
Csak körül kéne nézni a hivatalos fóromi fõposztban és megtalálod az egészet... :mistrust:
UI: Legközelebb rakd kódba a scriptet
« Utoljára szerkesztve: 2011. január 22. - 15:10:00 írta IceMan. »

Nem elérhető sanyo

Ház vevés!
« Válasz #7 Dátum: 2011. január 22. - 11:22:36 »
0 Show voters
oké de én kezdõ vagyok:D
E:
és nem tudod mmiert ir errort?
« Utoljára szerkesztve: 2011. január 22. - 15:10:47 írta IceMan. »

Ház vevés!
« Válasz #8 Dátum: 2011. január 22. - 11:26:23 »
0 Show voters
Akkor szerintem ne egy ilyen nehéz rendszerrel kezd, hanem pl. teleportok, vagy ilyesmik.
UI: Nem

Nem elérhető sanyo

Ház vevés!
« Válasz #9 Dátum: 2011. január 22. - 14:41:17 »
0 Show voters
ojan szerverem amit csinaltam azon müjödik de amit bérelek azon nem! miért?

Nem elérhető jana4

  • 5929
  • Ex Staff
    • Profil megtekintése
Ház vevés!
« Válasz #10 Dátum: 2011. január 22. - 14:45:05 »
0 Show voters
1. Helyesírási tanfolyam ajánlott.

2. Fórum szabályzatának átolvasása 2x is ajánlott.


Másrészt: ahol bérled, oda töltsd fel frissen a fájlokat...

Penzykee.

  • Vendég
Ház vevés!
« Válasz #11 Dátum: 2011. január 22. - 15:13:02 »
0 Show voters
Szerintem inkább ne foglalkozzál ilyenekkel. XD
Meg hányszor írt egymás után.. -.-

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal