09.09.2016, 19:27
I need help with roleplay kind.
When i /getprods to test the command he gets 0 prods then after 5 minutes i try to /getprods again and it's bugged
And i made it again after an hour and it's still bugged
and this is the script of it can anyone help me with it? im not good with scripting just begun scripting 4months back
-------
dcmd_getprods(playerid, params[])
{
new amount, string[128], id;
new bizkey = PlayerInfo[playerid][pPbiskey];
if(BizzInfo[bizkey][bType] !=
{
if( sscanf( params, "d", amount) )
{
SendClientMessage( playerid, COLOR_WHITE, "USAGE: /getprods [amount]" );
}
if(UseGetProdsTimer[playerid]) return SendClientMessage(playerid,COLOR_GREY," You must wait 5 minutes to get your products!");
else
{
id = PlayerInfo[playerid][pPbiskey];
format( string, sizeof( string ), "Businesses/Business_%d.ini", id);
if(!dini_Exists( string) )
{
SendClientMessage( playerid, COLOR_GREY, " You don't own a Business!" );
return 1;
}
else
{
BizzInfo[id][bDelivProd] = amount;
BizzInfo[id][bPriceProd] = amount*Tax;
if(BizzInfo[id][bTill] < BizzInfo[id][bPriceProd])
{
SendClientMessage( playerid, COLOR_GREY, "You don't have enough of money in your Business Bank!");
}
else
{
SaveBusiness(id);
format( string, sizeof( string ), "You have purchased %d products for $%d.", amount, BizzInfo[id][bPriceProd]);
SendClientMessage( playerid, COLOR_LIGHTBLUE, string);
SendClientMessage( playerid, COLOR_YELLOW, "Your products will be delivered in 5 minutes please wait.");
SetTimerEx("FillingBizz", 300*1000, 0, "u", playerid);
TaxValue += amount;
UseGetProdsTimer[playerid] = true;
SetTimerEx("UseGetProds",300*1000,0,"u",playerid);
}
}
}
}
return 1;
}
This above is the getprods coding, tell me if you find any way to fix it.
When i /getprods to test the command he gets 0 prods then after 5 minutes i try to /getprods again and it's bugged
And i made it again after an hour and it's still bugged
and this is the script of it can anyone help me with it? im not good with scripting just begun scripting 4months back
-------
dcmd_getprods(playerid, params[])
{
new amount, string[128], id;
new bizkey = PlayerInfo[playerid][pPbiskey];
if(BizzInfo[bizkey][bType] !=

{
if( sscanf( params, "d", amount) )
{
SendClientMessage( playerid, COLOR_WHITE, "USAGE: /getprods [amount]" );
}
if(UseGetProdsTimer[playerid]) return SendClientMessage(playerid,COLOR_GREY," You must wait 5 minutes to get your products!");
else
{
id = PlayerInfo[playerid][pPbiskey];
format( string, sizeof( string ), "Businesses/Business_%d.ini", id);
if(!dini_Exists( string) )
{
SendClientMessage( playerid, COLOR_GREY, " You don't own a Business!" );
return 1;
}
else
{
BizzInfo[id][bDelivProd] = amount;
BizzInfo[id][bPriceProd] = amount*Tax;
if(BizzInfo[id][bTill] < BizzInfo[id][bPriceProd])
{
SendClientMessage( playerid, COLOR_GREY, "You don't have enough of money in your Business Bank!");
}
else
{
SaveBusiness(id);
format( string, sizeof( string ), "You have purchased %d products for $%d.", amount, BizzInfo[id][bPriceProd]);
SendClientMessage( playerid, COLOR_LIGHTBLUE, string);
SendClientMessage( playerid, COLOR_YELLOW, "Your products will be delivered in 5 minutes please wait.");
SetTimerEx("FillingBizz", 300*1000, 0, "u", playerid);
TaxValue += amount;
UseGetProdsTimer[playerid] = true;
SetTimerEx("UseGetProds",300*1000,0,"u",playerid);
}
}
}
}
return 1;
}
This above is the getprods coding, tell me if you find any way to fix it.

