Help Pickup gone
#1

Pickup cant see like i make house but house pickup cant see, but still can enter
Reply
#2

show code please
Reply
#3

// Getting Business Setup
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
// Making Business
BizInfo[idx][bType] = type;
BizInfo[idx][bStatus] = 0;
format(BizInfo[idx][bOwner], 32, "The State");
BizInfo[idx][bX] = X;
BizInfo[idx][bY] = Y;
BizInfo[idx][bZ] = Z;
BizInfo[idx][bMoney] = 0;
BizInfo[idx][bProducts] = 0;
BizInfo[idx][bSold] = 0;
BizInfo[idx][bLevel] = 1;
BizInfo[idx][bPrice] = 200000;
BizInfo[idx][bPickup] = CreateDynamicPickup(1272, 1, X, Y, Z, 0);
format(string, sizeof(string), "Owner: %s\nBusiness Type: %s\nStatus: For Sale\nPrice: $%d", BizInfo[idx][bOwner], RBT(idx), BizInfo[idx][bPrice]);
BizInfo[idx][bText] = CreateDynamic3DTextLabel(string, COLOR_WHITE, X, Y, Z, 15);
format(string, sizeof(string), "AdmWarn: %s has created business ID %d.", RPN(playerid), idx);
SendAdminMessage(COLOR_DARKRED, 1, string);
Log("logs/business.log", string);
idx = MAX_BIZ;
Reply
#4

Quote:
Originally Posted by meranti1995
Посмотреть сообщение
// Getting Business Setup
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
// Making Business
BizInfo[idx][bType] = type;
BizInfo[idx][bStatus] = 0;
format(BizInfo[idx][bOwner], 32, "The State");
BizInfo[idx][bX] = X;
BizInfo[idx][bY] = Y;
BizInfo[idx][bZ] = Z;
BizInfo[idx][bMoney] = 0;
BizInfo[idx][bProducts] = 0;
BizInfo[idx][bSold] = 0;
BizInfo[idx][bLevel] = 1;
BizInfo[idx][bPrice] = 200000;
BizInfo[idx][bPickup] = CreateDynamicPickup(1272, 1, X, Y, Z, 0);
format(string, sizeof(string), "Owner: %s\nBusiness Type: %s\nStatus: For Sale\nPrice: $%d", BizInfo[idx][bOwner], RBT(idx), BizInfo[idx][bPrice]);
BizInfo[idx][bText] = CreateDynamic3DTextLabel(string, COLOR_WHITE, X, Y, Z, 15);
format(string, sizeof(string), "AdmWarn: %s has created business ID %d.", RPN(playerid), idx);
SendAdminMessage(COLOR_DARKRED, 1, string);
Log("logs/business.log", string);
idx = MAX_BIZ;
the loadbiz cmd sir
Reply
#5

stock LoadBiz()
{
if(!fexist("biz.cfg")) fcreate("biz.cfg");
new binfo[12][32];
new string[256];
new File:file = fopen("biz.cfg", io_read);
if(file)
{
new idx = 1;
while(idx < MAX_BIZ)
{
fread(file, string);
split(string, binfo, '|');
BizInfo[idx][bType] = strval(binfo[0]);
BizInfo[idx][bStatus] = strval(binfo[1]);
format(BizInfo[idx][bOwner], 32, "%s", binfo[2]);
BizInfo[idx][bX] = floatstr(binfo[3]);
BizInfo[idx][bY] = floatstr(binfo[4]);
BizInfo[idx][bZ] = floatstr(binfo[5]);
BizInfo[idx][bMoney] = strval(binfo[6]);
BizInfo[idx][bProducts] = strval(binfo[7]);
BizInfo[idx][bSold] = strval(binfo[8]);
BizInfo[idx][bLevel] = strval(binfo[9]);
BizInfo[idx][bPrice] = strval(binfo[10]);
BizInfo[idx][bAP] = strval(binfo[11]);
if(BizInfo[idx][bType]) // If Business is owned
{
BizInfo[idx][bPickup] = CreateDynamicPickup(1272, 1, BizInfo[idx][bX], BizInfo[idx][bY], BizInfo[idx][bZ], 0);
if(!strcmp("Flux Roleplay", BizInfo[idx][bOwner])) format(string, sizeof(string), "Owner: %s\nBusiness Type: %s\nStatus: For Sale\nPrice: $%d", BizInfo[idx][bOwner], RBT(idx), BizInfo[idx][bPrice]);
else format(string, sizeof(string), "Business of %s\nBusiness type: %s\n%s", BizInfo[idx][bOwner], RBT(idx), RBS(idx));
BizInfo[idx][bText] = CreateDynamic3DTextLabel(string, COLOR_WHITE, BizInfo[idx][bX], BizInfo[idx][bY], BizInfo[idx][bZ]+0.3, 15);
}
idx++;
}
}
print("Businesses loaded successfully.");
return 1;
}

stock SaveBiz()
{
if(!fexist("biz.cfg")) fcreate("biz.cfg");
new idx = 1, File:file;
new string[256];
while(idx < MAX_BIZ)
{
format(string, sizeof(string), "%d|%d|%s|%f|%f|%f|%d|%d|%d|%d|%d|%d\r\n", BizInfo[idx][bType], BizInfo[idx][bStatus], BizInfo[idx][bOwner], BizInfo[idx][bX], BizInfo[idx][bY], BizInfo[idx][bZ], BizInfo[idx][bMoney], BizInfo[idx][bProducts], BizInfo[idx][bSold], BizInfo[idx][bLevel], BizInfo[idx][bPrice], BizInfo[idx][bAP]);
if(idx == 1)
{
file = fopen("biz.cfg", io_write);
}
else
{
file = fopen("biz.cfg", io_append);
}
fwrite(file, string);
fclose(file);
idx++;
}
print("Businesses saved successfully.");
}
Reply
#6

up up up up
Reply
#7

Код:
BizInfo[idx][bPickup] = CreateDynamicPickup(1272, 1, BizInfo[idx][bX], BizInfo[idx][bY], BizInfo[idx][bZ], 0);
This line is adding the pickup to the virtual world 0. That's the last parameter. Are you sure you are in virtual world 0? Maybe try setting 0 to -1 (This would make the pickup display in all virtual worlds.)
Reply
#8

Fixed i just update latest include version
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)