Hallo und danke fürs vorbei schaun,
Ich wollte fragen ob ihr villt. wisst wie man ein business im Non GF macht bzw ein script oder ein Link habt.
Ich hoffe ihr wisst was.
MFG
Philipp
Hallo und danke fürs vorbei schaun,
Ich wollte fragen ob ihr villt. wisst wie man ein business im Non GF macht bzw ein script oder ein Link habt.
Ich hoffe ihr wisst was.
MFG
Philipp
Das hat sich erledigt aba nun hab ich n paar errer wollt ihr mir helfen ??
Hier die Errors
C:\Documents and Settings\Owner\Desktop\SamP\gamemodes\reallife2.pwn(3904) : warning 219: local variable "Business" shadows a variable at a preceding level
C:\Documents and Settings\Owner\Desktop\SamP\gamemodes\reallife2.pwn(3909) : warning 219: local variable "Business" shadows a variable at a preceding level
C:\Documents and Settings\Owner\Desktop\SamP\gamemodes\reallife2.pwn(3915) : error 033: array must be indexed (variable "Business")
C:\Documents and Settings\Owner\Desktop\SamP\gamemodes\reallife2.pwn(3915) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Owner\Desktop\SamP\gamemodes\reallife2.pwn(3915) : error 091: ambiguous constant; tag override is required (symbol "Name")
C:\Documents and Settings\Owner\Desktop\SamP\gamemodes\reallife2.pwn(3915) : fatal error 107: too many error messages on one line
Hier der Code
//Business System
AddBusiness(Business, Float:iconX, Float:iconY, Float:iconZ, Float:interiorX, Float:interiorY, Float:interiorZ, Costa, Sella, Interiora, virtualworld)
{
for(new i=0; i<SLOTS; i++)
{
new Businessid = GetBusinessID(i);
new Business[256];
format(Business, sizeof(Business), "Business/Businessid%d",Businessid);
if(!dini_Exists(Business))
{
dini_Create(Business);
format(Business[Business][Name], 24, "ForSale");
dini_Set(house, "Name", "ForSale");
format(Business[Business][Renter], 24, "ForRent");
dini_Set(house, "Renter", "ForRent");
Business[Business][Rentable] = 0;
dini_IntSet(house, "Rentable", 0);
Business[Business][Rentcost] = 0;
dini_IntSet(house, "Rentcost", 0);
Business[Business][Cost] = Costa;
dini_IntSet(house, "Cost", Costa);
Business[Business][Sell] = Sella;
dini_IntSet(house, "Sell", Sella);
Business[Business][Interior] = Interiora;
dini_IntSet(house, "Interior", Interiora);
dini_IntSet(house, "Virtualworld", virtualworld);
Business[Business][Virtualworld] = virtualworld;
Business[Business][Locked] = 1;
dini_IntSet(house, "Locked", 1);
Business[Business][InteriorX] = interiorX;
Business[Business][InteriorY] = interiorY;
Business[Business][InteriorZ] = interiorZ;
dini_FloatSet(house, "X", interiorX);
dini_FloatSet(house, "Y", interiorY);
dini_FloatSet(house, "Z", interiorZ);
dini_IntSet(house, "RentPay", 0);
dini_IntSet(house, "RentGet", 0);
cInfo[Business][HouseCar] = 429;
dini_IntSet(house, "HouseCar", 0);
cInfo[Business][CarModel] = 429;
dini_IntSet(house, "CarModel", 0);
cInfo[Business][CarX] = 0;
cInfo[Business][CarY] = 0;
cInfo[Business][CarZ] = 0;
dini_FloatSet(house, "CarX", 0);
dini_FloatSet(house, "CarY", 0);
dini_FloatSet(house, "CarZ", 0);
cInfo[Business][CarColor1] = 0;
cInfo[Business][CarColor2] = 0;
dini_IntSet(house, "CarColor1", 0);
dini_IntSet(house, "CarColor2", 0);
cInfo[Business][GotCar] = 0;
print("-");
print("--------------House Created--------------");
printf("- Business: %d", Business);
printf("- Kosten: %d", Costa);
printf("- Verkaufspreis: %d", Sella);
printf("- VirtualWorld: %d", virtualworld);
print("-----------------------------------------");
print("-");
print("--------------Business Created--------------");
printf("- Businessid: %d", Businessid);
printf("- Kosten: %d", Costa);
printf("- Verkaufspreis: %d", Sella);
printf("- VirtualWorld: %d", virtualworld);
print("-----------------------------------------");
print("-");
}
else
{
format(Business[Businessid][Name], 24, dini_Get(Business, "Name"));
format(Business[Businessid][Renter], 24, dini_Get(Business, "Renter"));
Business[Businessid][Rentable] = dini_Int(Business, "Rentable");
Business[Businessid][Rentcost] = dini_Int(Business, "Rentcost");
Business[Businessid][Cost] = dini_Int(Business, "Cost");
Business[Businessid][Sell] = dini_Int(Business, "Sell");
Business[Businessid][Interior] = dini_Int(Business, "Interior");
Business[Businessid][Locked] = dini_Int(Business, "Locked");
Business[Businessid][InteriorX] = dini_Float(Business, "X");
Business[Businessid][InteriorY] = dini_Float(Business, "Y");
Business[Businessid][InteriorZ] = dini_Float(Business, "Z");
Business[Businessid][Virtualworld] = dini_Int(Business, "Virtualworld");
}
Business[Businessid][iconx]=iconX;
Business[Businessid][icony]=iconY;
Business[Businessid][iconz]=iconZ;
format(Business, sizeof(Business), "Business/Businessid%d",Businessid);
if(strcmp(Business[Businessid][Name],"ForSale",true)==0)
{
BusinessPickup[Businessid] = CreatePickup(1273, 23, iconX, iconY, iconZ);
}
else
{
BusinessPickup[Businessid] = CreatePickup(1272,23, iconX, iconY, iconZ);
}
}
}
MFG Philipp
>>>> Hier <<<<
Sorry ich kann ich auf antworten ka warum da kommt immer n Mysql error, und sorry fürs spammen pushen oder sonstiges nur bin ich verzweifelt ich hab keine Ahnung was falsch ist
Push Ist verboten!!!!
Push Ist verboten!!!!
Spammen genauso!
Warum pusht er? tut er nicht!
Er hat seit 2 Stunden nichts reingeschrieben gehabt, man sollte auch auf die Zeit schauen bevor man sonen käse schreibt...
B2T:
Forward vergessen?
Mfg
Hier mal die Codes die ich alle hab(was das angeht):
//Business System
new BusinessPickup[MAX_Business];
enum BusinessInfo
{
Name[24],
Cost,
Sell,
Interior,
Virtualworld,
Locked,
Float:InteriorX,
Float:InteriorY,
Float:InteriorZ,
Float:iconx,
Float:icony,
Float:iconz,
}
new Business[MAX_Business][BusinessInfo];
bei OnGameModeInit:
//Businesses
AddBusiness(0, 1442.9769,-629.5287,95.7186, 2317.8201,-1024.7500,1050.2109, 0, 0, 9, 0);
AddBusiness(1, 1496.9106,-688.2329,95.5120, 328.1465, 1478.4457,1084.4375, 0, 0, 15, 0);
//Business System
AddBusiness(Business, Float:iconX, Float:iconY, Float:iconZ, Float:interiorX, Float:interiorY, Float:interiorZ, Costa, Sella, Interiora, virtualworld)
{
for(new i=0; i<SLOTS; i++)
{
new Businessid = GetBusinessID(i);
new Biz[256];
format(Biz, sizeof(Biz), "Business/Businessid%d",Businessid);
if(!dini_Exists(Biz))
{
dini_Create(Biz);
format(BusinessInfo[businessid][Name], 24, "ForSale");
dini_Set(Biz, "Name", "ForSale");
BusinessInfo[Businessid][Cost] = Costa;
dini_IntSet(Biz, "Cost", Costa);
BusinessInfo[Businessid][Sell] = Sella;
dini_IntSet(Biz, "Sell", Sella);
BusinessInfo[Businessid][Interior] = Interiora;
dini_IntSet(Biz, "Interior", Interiora);
dini_IntSet(Biz, "Virtualworld", virtualworld);
BusinessInfo[Businessid][Virtualworld] = virtualworld;
BusinessInfo[Businessid][Locked] = 1;
dini_IntSet(Biz, "Locked", 1);
BusinessInfo[Businessid][InteriorX] = interiorX;
BusinessInfo[Businessid][InteriorY] = interiorY;
BusinessInfo[Businessid][InteriorZ] = interiorZ;
dini_FloatSet(Biz, "X", interiorX);
dini_FloatSet(Biz, "Y", interiorY);
dini_FloatSet(Biz, "Z", interiorZ);
}
else
{
format(BusinessInfo[Businessid][Name], 24, dini_Get(Business, "Name"));
format(BusinessInfo[Businessid][Renter], 24, dini_Get(Business, "Renter"));
BusinessInfo[Businessid][Rentable] = dini_Int(Business, "Rentable");
BusinessInfo[Businessid][Rentcost] = dini_Int(Business, "Rentcost");
BusinessInfo[Businessid][Cost] = dini_Int(Business, "Cost");
BusinessInfo[Businessid][Sell] = dini_Int(Business, "Sell");
BusinessInfo[Businessid][Interior] = dini_Int(Business, "Interior");
BusinessInfo[Businessid][Locked] = dini_Int(Business, "Locked");
BusinessInfo[Businessid][InteriorX] = dini_Float(Business, "X");
BusinessInfo[Businessid][InteriorY] = dini_Float(Business, "Y");
BusinessInfo[Businessid][InteriorZ] = dini_Float(Business, "Z");
BusinessInfo[Businessid][Virtualworld] = dini_Int(Business, "Virtualworld");
}
BusinessInfo[Businessid][iconx]=iconX;
BusinessInfo[Businessid][icony]=iconY;
BusinessInfo[Businessid][iconz]=iconZ;
format(Biz, sizeof(Biz), "Business/Businessid%d",Businessid);
if(strcmp(BusinessInfo[Businessid][Name],"ForSale",true)==0)
{
BusinessPickup[Businessid] = CreatePickup(1273, 23, iconX, iconY, iconZ);
}
else
{
BusinessPickup[Businessid] = CreatePickup(1272,23, iconX, iconY, iconZ);
}
}
}
stock GetBusinessID(playerid)
{
for(new i=0; i<MAX_Business; i++)
{
if(PlayerToPoint(MAX_DISTANCE_TO_PROP, playerid, Business[i][iconx], Business[i][icony], Business[i][iconz]))
{
return i;
}
}
return -255;
}
Sry aba ich konnte eben nicht auf Antworten