SA-MP Forums Archive
Help Pickup gone - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help Pickup gone (/showthread.php?tid=611918)



Help Pickup gone - meranti1995 - 12.07.2016

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


Re: Help Pickup gone - TaiRinsuru - 12.07.2016

show code please


Re: Help Pickup gone - meranti1995 - 12.07.2016

// 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;


Re: Help Pickup gone - TaiRinsuru - 12.07.2016

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


Re: Help Pickup gone - meranti1995 - 12.07.2016

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.");
}


Re: Help Pickup gone - meranti1995 - 12.07.2016

up up up up


Re: Help Pickup gone - Jonesy96 - 12.07.2016

Код:
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.)


Re: Help Pickup gone - meranti1995 - 12.07.2016

Fixed i just update latest include version