Szerző Téma: Bútor rendszer(ágy,asztal,szék)  (Megtekintve 1084 alkalommal)

Nem elérhető Beckham

  • 1693
  • Noresz
  • Discord: Noresz#4265
    • Profil megtekintése
    • OctansV Alt:v szervere
Bútor rendszer(ágy,asztal,szék)
« Dátum: 2012. November 16. - 19:37:39 »
0 Show voters
Sziasztok!Az angol fórumról elhoztam nektek a bútor rendszer-t,lehet,hogy már valaki egyszer kitette azért bocsánatot kérek,de én nem láttam ezen a fórumon még ezt sõt még hasonlót sem.A készítõje nem én vagyok.Egy gondja van,hogy nem csak házban hanem bárhol letudod rakni az objectet..:(
Ja és angol.:D ez szerintem nem meglepõ :D De ha vártok pár napot,mert most nagyon sürget az idõ,akkor lefordítom nektek!
Eredeti link: http://forum.sa-mp.com/showthread.php?t=346371
Pastebin: http://pastebin.com/S0ZzDL8m
Készítõ:jueix
Parancsai:
/fshop
/buychair
/buybed
/buytable
/placechair
/placebed
/placetable
Code:
 
//furniture buying and saving system by jueix.
#define FILTERSCRIPT
#include <a_samp>
#include <dini>
#include <dudb>
#include <zcmd>
#include <streamer>
//coord saver of objects
new Float:CX;
new Float:CY;
new Float:CZ;
new Float:BX;
new Float:BY;
new Float:BZ;
new Float:TX;
new Float:TY;
new Float:TZ;
enum
Finfo
{
NAME,
HASCHAIR,
HASBED,
HASTABLE,
CHAIRID,
BEDID,
TABLEID,
Cworld,
Cint,
Tworld,
Tint,
Bworld,
Bint,
Pc,
Pt,
Pb
};
new fInfo[MAX_PLAYERS][Finfo];
public OnFilterScriptInit()
{
print(\"\\n--------------------------------------\");
print(\" furniture system buy jueix.\");
print(\"--------------------------------------\\n\");
CreateObject(1498, -1132.59, -2859.42, 269.56,   0.00, 0.00, 107.20);
CreateObject(3032, -1143.17, -2865.04, 270.78,   0.00, 0.00, 18.13);
CreateObject(3032, -1145.59, -2863.70, 271.01,   0.00, 0.00, 288.70);
CreateObject(3032, -1148.15, -2855.98, 271.01,   0.00, 0.00, 288.70);
CreateObject(1498, -1146.03, -2861.80, 269.56,   0.00, 0.00, 108.55);
CreateObject(3032, -1146.55, -2853.71, 270.78,   0.00, 0.00, 192.00);
CreateObject(3032, -1134.70, -2852.66, 270.78,   0.00, 0.00, 289.13);
CreateObject(3032, -1133.48, -2861.87, 270.78,   0.00, 0.00, 18.70);
CreateObject(19506, -1140.95, -2857.92, 271.40,   0.00, 0.00, 18.54);
CreateObject(3032, -1136.56, -2862.93, 270.78,   0.00, 0.00, 18.70);
CreateObject(3032, -1139.78, -2863.99, 270.78,   0.00, 0.00, 18.13);
CreateObject(2626, -1143.30, -2863.27, 270.08,   0.00, 0.00, 200.28);
CreateObject(1802, -1146.44, -2858.14, 269.62,   0.00, 0.00, 19.80);
CreateObject(2566, -1141.98, -2855.60, 270.06,   0.00, 0.00, 20.14);
CreateObject(2762, -1134.76, -2855.95, 269.92,   0.00, 0.00, 110.32);
CreateObject(1704, -1135.72, -2861.89, 269.57,   0.00, 0.00, 200.08);
CreateObject(1708, -1139.69, -2863.49, 269.47,   0.00, 0.00, 197.16);
return 1;
}
public OnPlayerConnect(playerid)
{
LoadStats(playerid);
if(fInfo[playerid][Pt] == 1)
{
CreateDynamicObject(fInfo[playerid][TABLEID], TX, TY, TZ, 0, 0, 0, fInfo[playerid][Tworld], fInfo[playerid][Tint], -1, 200.0);
}
if(fInfo[playerid][Pc] == 1)
{
CreateDynamicObject(fInfo[playerid][CHAIRID], CX, CY, CZ, 0, 0, 0, fInfo[playerid][Cworld], fInfo[playerid][Cint], -1, 200.0);
}
if(fInfo[playerid][Pb] == 1)
{
CreateDynamicObject(fInfo[playerid][bEDID], BX, BY, BZ, 0, 0, 0, fInfo[playerid][bworld], fInfo[playerid][bint], -1, 200.0);
}
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
if (!dini_Exists(furn(playerid)))
{
dini_Create(furn(playerid));
}
SaveStats(playerid);
return 1;
}
 
public OnFilterScriptExit()
{
return 1;
}
COMMAND:fshop(playerid, params[]) // or CMD:mycommand(playerid, params[])
{
SetPlayerPos(playerid, -1146.44, -2858.14, 269.62);
return 1;
}
//buys
COMMAND:buychair(playerid, params[]) // or CMD:mycommand(playerid, params[])
{
    IsPlayerInRangeOfPoint(playerid, 1.0, -1136.4224,-2861.4194,270.5641);
    if(fInfo[playerid][HASCHAIR] == 0)
    {
fInfo[playerid][HASCHAIR] = 1;
fInfo[playerid][CHAIRID] = 1704;
GivePlayerMoney(playerid, -270);
SendClientMessage(playerid, 0xFFFFFF,\"You have bought a leather chair for £270.\");
SendClientMessage(playerid, 0xFFFFFF,\"In this verison of the filterscript you can only have 1 chair\");
SendClientMessage(playerid, 0xFFFFFF,\"go to an area you want your chair to be and type /placechair\");
}
IsPlayerInRangeOfPoint(playerid, 1.0, -1140.2141,-2862.9775,270.5641);
    if(fInfo[playerid][HASCHAIR] == 0)
    {
fInfo[playerid][HASCHAIR] = 1;
fInfo[playerid][CHAIRID] = 1708;
GivePlayerMoney(playerid, -150);
SendClientMessage(playerid, 0xFFFFFF,\"You have bought a chair for £150.\");
SendClientMessage(playerid, 0xFFFFFF,\"In this verison of the filterscript you can only have 1 chair\");
SendClientMessage(playerid, 0xFFFFFF,\"go to an area you want your chair to be and type /placechair\");
}
return 1;
}
COMMAND:buybed(playerid, params[]) // or CMD:mycommand(playerid, params[])
{
    IsPlayerInRangeOfPoint(playerid, 1.0, -1146.0715,-2857.3557,270.5641);
    if(fInfo[playerid][HASBED] == 0)
    {
fInfo[playerid][HASBED] = 1;
fInfo[playerid][bEDID] = 1802;
GivePlayerMoney(playerid, -500);
SendClientMessage(playerid, 0xFFFFFF,\"You have bought a kingsize bed for £500.\");
SendClientMessage(playerid, 0xFFFFFF,\"In this verison of the filterscript you can only have 1 bed\");
SendClientMessage(playerid, 0xFFFFFF,\"go to an area you want your chair to be and type /placebed\");
}
IsPlayerInRangeOfPoint(playerid, 1.0, -1140.2225,-2855.2290,270.5641);
    if(fInfo[playerid][HASBED] == 0)
    {
fInfo[playerid][HASBED] = 1;
fInfo[playerid][bEDID] = 2566;
GivePlayerMoney(playerid, -1230);
SendClientMessage(playerid, 0xFFFFFF,\"You have bought the bed with bed side cabinets for £1230.\");
SendClientMessage(playerid, 0xFFFFFF,\"In this verison of the filterscript you can only have 1 bed\");
SendClientMessage(playerid, 0xFFFFFF,\"go to an area you want your bed to be and type /placebed\");
}
else {
SendClientMessage(playerid, 0xFFFFFF,\"you all ready own a bed or you are not in a furniture shop.\");
}
return 1;
}
COMMAND:buytable(playerid, params[]) // or CMD:mycommand(playerid, params[])
{
    IsPlayerInRangeOfPoint(playerid, 1.0, -1135.6499,-2856.1558,270.5641);
    if(fInfo[playerid][HASTABLE] == 0 && fInfo[playerid][Pt] == 0)
    {
fInfo[playerid][HASTABLE] = 1;
fInfo[playerid][TABLEID] = 2762;
GivePlayerMoney(playerid, -50);
SendClientMessage(playerid, 0xFFFFFF,\"You have bought a wooden coffe table for £50.\");
SendClientMessage(playerid, 0xFFFFFF,\"In this verison of the filterscript you can only have 1 table\");
SendClientMessage(playerid, 0xFFFFFF,\"go to an area you want your table to be and type /placetable\");
}
else {
SendClientMessage(playerid, 0xFFFFFF,\"you all ready own a table or you are not in a furniture shop.\");
}
return 1;
}
//placing
COMMAND:placechair(playerid, params[]) // or CMD:mycommand(playerid, params[])
{
    if(fInfo[playerid][HASCHAIR] == 1 && fInfo[playerid][Pc] == 0)
    {
    new Float:x;
new Float:y;
new Float:z;
 
GetPlayerPos(playerid,x,y,z);
    CX = x;
    CY = y;
    CZ = z - 0.8;
    fInfo[playerid][Cint] = GetPlayerInterior(playerid);
    fInfo[playerid][Cworld] = GetPlayerVirtualWorld(playerid);
    fInfo[playerid][Pc] = 1;
CreateDynamicObject(fInfo[playerid][CHAIRID], CX, CY, CZ, 0, 0, 0, fInfo[playerid][Cworld], fInfo[playerid][Cint], -1, 200.0);
}
else {
SendClientMessage(playerid, 0xFFFFFF,\"you don\'t have a chair please buy one from the furniture shop.\");
SendClientMessage(playerid, 0xFFFFFF,\"Or you have allready planted it.\");
}
return 1;
}
COMMAND:placetable(playerid, params[]) // or CMD:mycommand(playerid, params[])
{
    if(fInfo[playerid][HASTABLE] == 1 && fInfo[playerid][Pt] == 0)
    {
    new Float:x;
new Float:y;
new Float:z;
 
GetPlayerPos(playerid,x,y,z);
    TX = x;
    TY = y;
    TZ = z - 0.8;
    fInfo[playerid][Tint] = GetPlayerInterior(playerid);
    fInfo[playerid][Tworld] = GetPlayerVirtualWorld(playerid);
    fInfo[playerid][Pt] = 1;
CreateDynamicObject(fInfo[playerid][TABLEID], TX, TY, TZ, 0, 0, 0, fInfo[playerid][Tworld], fInfo[playerid][Tint], -1, 200.0);
}
else {
SendClientMessage(playerid, 0xFFFFFF,\"you don\'t have a table please buy one from the furniture shop.\");
SendClientMessage(playerid, 0xFFFFFF,\"Or you have allready placed it.\");
}
return 1;
}
COMMAND:placebed(playerid, params[]) // or CMD:mycommand(playerid, params[])
{
    if(fInfo[playerid][HASBED] == 1 && fInfo[playerid][Pb] == 0)
    {
    new Float:x;
new Float:y;
new Float:z;
 
GetPlayerPos(playerid,x,y,z);
    BX = x;
    BY = y;
    BZ = z - 0.8;
    fInfo[playerid][bint] = GetPlayerInterior(playerid);
    fInfo[playerid][bworld] = GetPlayerVirtualWorld(playerid);
    fInfo[playerid][Pb] = 1;
CreateDynamicObject(fInfo[playerid][bEDID], BX, BY, BZ, 0, 0, 0, fInfo[playerid][bworld], fInfo[playerid][bint], -1, 200.0);
}
else {
SendClientMessage(playerid, 0xFFFFFF,\"you don\'t have a bed please buy one from the furniture shop.\");
SendClientMessage(playerid, 0xFFFFFF,\"Or you have allready placed it.\");
}
return 1;
}
Player(playerid)
{
new player[MAX_PLAYER_NAME];
GetPlayerName(playerid, player, sizeof(player));
return player;
}
furn(playerid)
{
  new a[256]; format(a, sizeof(a), \"%s.ini\",udb_encode(Player(playerid)));
  return a;
}
SaveStats(playerid)
{
  dini_IntSet(furn(playerid), \"CX\", floatround(CX));
  dini_IntSet(furn(playerid), \"CY\", floatround(CY));
  dini_IntSet(furn(playerid), \"CZ\", floatround(CZ));
  dini_IntSet(furn(playerid), \"TX\", floatround(TX));
  dini_IntSet(furn(playerid), \"TY\", floatround(TY));
  dini_IntSet(furn(playerid), \"TZ\", floatround(TZ));
  dini_IntSet(furn(playerid), \"BX\", floatround(BX));
  dini_IntSet(furn(playerid), \"BY\", floatround(BY));
  dini_IntSet(furn(playerid), \"BZ\", floatround(BZ));
  dini_IntSet(furn(playerid), \"HASCHAIR\", (fInfo[playerid][HASCHAIR]));
  dini_IntSet(furn(playerid), \"HASTABLE\", (fInfo[playerid][HASTABLE]));
  dini_IntSet(furn(playerid), \"HASBED\", (fInfo[playerid][HASBED]));
  dini_IntSet(furn(playerid), \"Cworld\", (fInfo[playerid][Cworld]));
  dini_IntSet(furn(playerid), \"Cint\", (fInfo[playerid][Cint]));
  dini_IntSet(furn(playerid), \"Tworld\", (fInfo[playerid][Tworld]));
  dini_IntSet(furn(playerid), \"Tint\", (fInfo[playerid][Tint]));
  dini_IntSet(furn(playerid), \"Bworld\", (fInfo[playerid][bworld]));
  dini_IntSet(furn(playerid), \"Bint\", (fInfo[playerid][bint]));
  dini_IntSet(furn(playerid), \"HasPlacedChair\", (fInfo[playerid][Pc]));
  dini_IntSet(furn(playerid), \"HasPlacedTable\", (fInfo[playerid][Pt]));
  dini_IntSet(furn(playerid), \"HasPlacedBed\", (fInfo[playerid][Pb]));
  dini_IntSet(furn(playerid), \"CHAIRID\", (fInfo[playerid][CHAIRID]));
  dini_IntSet(furn(playerid), \"TABLEID\", (fInfo[playerid][TABLEID]));
  dini_IntSet(furn(playerid), \"BEDID\", (fInfo[playerid][bEDID]));
}
LoadStats(playerid)
{
  CX = dini_Int(furn(playerid), \"CX\");
  CY = dini_Int(furn(playerid), \"CY\");
  CZ = dini_Int(furn(playerid), \"CZ\");
  TX = dini_Int(furn(playerid), \"TX\");
  TY = dini_Int(furn(playerid), \"TY\");
  TZ = dini_Int(furn(playerid), \"TZ\");
  BX = dini_Int(furn(playerid), \"BX\");
  BY = dini_Int(furn(playerid), \"BY\");
  BZ = dini_Int(furn(playerid), \"BZ\");
  fInfo[playerid][HASCHAIR] = dini_Int(furn(playerid), \"HASCHAIR\");
  fInfo[playerid][HASTABLE] = dini_Int(furn(playerid), \"HASTABLE\");
  fInfo[playerid][HASBED] = dini_Int(furn(playerid), \"HASBED\");
  fInfo[playerid][Cworld] = dini_Int(furn(playerid), \"Cworld\");
  fInfo[playerid][Cint] = dini_Int(furn(playerid), \"Cint\");
  fInfo[playerid][Tworld] = dini_Int(furn(playerid), \"Tworld\");
  fInfo[playerid][Tint] = dini_Int(furn(playerid), \"Tint\");
  fInfo[playerid][bworld] = dini_Int(furn(playerid), \"Bworld\");
  fInfo[playerid][bint] = dini_Int(furn(playerid), \"Bint\");
  fInfo[playerid][Pc] = dini_Int(furn(playerid), \"HasPlacedChair\");
  fInfo[playerid][Pt] = dini_Int(furn(playerid), \"HasPlacedTable\");
  fInfo[playerid][Pb] = dini_Int(furn(playerid), \"HasPlacedBed\");
  fInfo[playerid][CHAIRID] = dini_Int(furn(playerid), \"CHAIRID\");
  fInfo[playerid][TABLEID] = dini_Int(furn(playerid), \"TABLEID\");
  fInfo[playerid][bEDID] = dini_Int(furn(playerid), \"BEDID\");
}

 
Napjainkban multixxx95 lefordította még én elõttem link: http://gtaforum.hu/index.php?topic=15569.0
« Utoljára szerkesztve: 2012. November 18. - 15:49:24 írta Tom_Hudson »

Bútor rendszer(ágy,asztal,szék)
« Válasz #1 Dátum: 2012. November 16. - 21:18:57 »
0 Show voters
Szép, ötletes ennyi erõvel le is tudtad volna magyarosítani  :evilmad:

De nem baj, az a lényeg hogy jó  ;)

Nem elérhető zeteni

  • 1970
  • Ex-Scripter
    • Profil megtekintése
Bútor rendszer(ágy,asztal,szék)
« Válasz #2 Dátum: 2012. November 16. - 21:21:13 »
+1 Show voters
[mod]Kérlek szabályzatnak megfelelõen bõvítsd! 3 napod van rá.[/mod]

Nem elérhető ZyZu.

  • Globális moderátor
  • 8939
  • my turbo diesel forum
  • Discord: ZyZu.
    • Profil megtekintése
Bútor rendszer(ágy,asztal,szék)
« Válasz #3 Dátum: 2012. November 16. - 22:21:17 »
0 Show voters
Köszönöm a publikálást ez jól jött :D

Nem elérhető Beckham

  • 1693
  • Noresz
  • Discord: Noresz#4265
    • Profil megtekintése
    • OctansV Alt:v szervere
Bútor rendszer(ágy,asztal,szék)
« Válasz #4 Dátum: 2012. November 16. - 22:21:37 »
0 Show voters
Idézetet írta: ZyZu date=1353100877\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"29910\" data-ipsquote-contentclass=\"forums_Topic
Köszönöm a publikálást ez jól jött :D
 
Na épp ezért publikáltam hogy másnak megkönnyebbítsem a keresést és ötletet adjak!

Nem elérhető pisti525

  • 906
  • One Shot, One Kill
    • Profil megtekintése
Bútor rendszer(ágy,asztal,szék)
« Válasz #5 Dátum: 2012. November 16. - 22:47:17 »
0 Show voters
Elég jónak tûnik lehet hogy fel használom!  :)

Bútor rendszer(ágy,asztal,szék)
« Válasz #6 Dátum: 2012. November 18. - 13:47:21 »
+1 Show voters
Itt van magyarul, lefordítottam. :) http://gtaforum.hu/index.php?topic=15569.0

Nem elérhető Beckham

  • 1693
  • Noresz
  • Discord: Noresz#4265
    • Profil megtekintése
    • OctansV Alt:v szervere
Bútor rendszer(ágy,asztal,szék)
« Válasz #7 Dátum: 2012. November 20. - 12:57:04 »
0 Show voters
Módosítva!multixxx95 szerint:D

Nem elérhető DrAkE

  • 2078
    • Profil megtekintése
Bútor rendszer(ágy,asztal,szék)
« Válasz #8 Dátum: 2012. November 20. - 19:01:28 »
0 Show voters
Hát, eléggé..... gyér.... (szar)

Nem elérhető ZyZu.

  • Globális moderátor
  • 8939
  • my turbo diesel forum
  • Discord: ZyZu.
    • Profil megtekintése
Bútor rendszer(ágy,asztal,szék)
« Válasz #9 Dátum: 2012. November 20. - 19:14:26 »
0 Show voters
:D, ezt meg lehet csinálni jobban is :) Itt minden objectnek külön parancsot lérehozni szerintem nagyon feleslegess.. meg lehet csinálni egy adott parancsal is.  ;)

Nem elérhető Beckham

  • 1693
  • Noresz
  • Discord: Noresz#4265
    • Profil megtekintése
    • OctansV Alt:v szervere
Bútor rendszer(ágy,asztal,szék)
« Válasz #10 Dátum: 2012. November 21. - 11:16:25 »
0 Show voters
Zyzu az ami a PDSS-en van az nagyon klafa lenne :D nagyot dobna.

Nem elérhető ZyZu.

  • Globális moderátor
  • 8939
  • my turbo diesel forum
  • Discord: ZyZu.
    • Profil megtekintése
Bútor rendszer(ágy,asztal,szék)
« Válasz #11 Dátum: 2012. November 21. - 15:16:26 »
0 Show voters
Már nem csak ott van olyan rendszer.. máshol is megtalálható!  :)

Nem elérhető Beckham

  • 1693
  • Noresz
  • Discord: Noresz#4265
    • Profil megtekintése
    • OctansV Alt:v szervere
Bútor rendszer(ágy,asztal,szék)
« Válasz #12 Dátum: 2012. November 23. - 17:00:13 »
0 Show voters
Azt mondod publikált?:D

Nem elérhető ZyZu.

  • Globális moderátor
  • 8939
  • my turbo diesel forum
  • Discord: ZyZu.
    • Profil megtekintése
Bútor rendszer(ágy,asztal,szék)
« Válasz #13 Dátum: 2012. November 23. - 17:24:40 »
0 Show voters
Az nem publikált szkript.. de én meg tudnám írni :) Anyit kell bele, hogy egy object editort hozzáírsz a módhoz és késsz :D  ;) De ezt inkább pm -ben írd.

Bútor rendszer(ágy,asztal,szék)
« Válasz #14 Dátum: 2012. November 23. - 17:31:42 »
0 Show voters
Zyzu: Dehogy tudnád.. xd
Tom: PDSS en egy sz*r van de nem is akarok arról beszélni..
ez nem olyan rossz de elég bénán van megírva nem mondom hogy jobban megtudnám csak ez tény. kb egy sima ingame editor többet ér ennél de fellehet használni egy kis módosítással.

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal