Hy, a have a problem with 3dTextLabel , i use OnPropTextDrawUpdate , for houses and Bizz its working but for sBizz the commands /bizname /extortion /bizwithdraw /bizfee its not working, i dont know what to doo , i have tried everything , here its the commands, when i tipe the command its says SERVER:Unknown Command but after the server restart apear the name and entrancefee, !
Код:
if(strcmp(cmd, "/bizname", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new bouse = PlayerInfo[playerid][pPbiskey];
if (bouse == 255)
{
SendClientMessage(playerid, COLOR_GRAD2, " You don't own a business");
return 1;
}
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /bizname [Name]");
}
if (bouse >= 100)
{
strmid(SBizzInfo[bouse-100][sbMessage], result, 0, 64, 255);
format(string, sizeof(string), "Business name set to %s",SBizzInfo[bouse-100][sbMessage]);
OnPropTextdrawUpdate(3, bouse);
}
else
{
strmid(BizzInfo[bouse][bMessage], result, 0, 64, 255);
format(string, sizeof(string), "Business name set to %s",BizzInfo[bouse][bMessage]);
OnPropTextdrawUpdate(2, bouse);
}
SendClientMessage(playerid, COLOR_WHITE, string);
OnPropUpdate();
}
return 1;
}
if(strcmp(cmd, "/bizwithdraw", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new bouse = PlayerInfo[playerid][pPbiskey];
if (bouse == 255)
{
SendClientMessage(playerid, COLOR_GRAD2, " You don't own a business");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
if (bouse >= 100)
{
format(string, sizeof(string), " You Have $%d in your till.", SBizzInfo[bouse-100][sbTill]);
SendClientMessage(playerid, COLOR_GRAD3, string);
}
else
{
format(string, sizeof(string), " You Have $%d in your till.", BizzInfo[bouse][bTill]);
SendClientMessage(playerid, COLOR_GRAD3, string);
}
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /bizwithdraw [amount]");
return 1;
}
new cashdeposit = strval(tmp);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /bizwithdraw [amount]");
return 1;
}
if (bouse >= 100)
{
if(cashdeposit > SBizzInfo[bouse-100][sbTill] || cashdeposit < 1)
{
SendClientMessage(playerid, COLOR_GRAD2, " You dont have that much");
return 1;
}
}
else
{
if (cashdeposit > BizzInfo[bouse][bTill] || cashdeposit < 1)
{
SendClientMessage(playerid, COLOR_GRAD2, " You dont have that much");
return 1;
}
}
if (bouse >= 100)
{
if(!PlayerToPoint(100, playerid,SBizzInfo[bouse-100][sbEntranceX],SBizzInfo[bouse-100][sbEntranceY],SBizzInfo[bouse-100][sbEntranceZ]))
{
SendClientMessage(playerid, COLOR_GRAD2, " You are to far from your business");
return 1;
}
else
{
ConsumingMoney[playerid] = 1;
GivePlayerMoney(playerid,cashdeposit);
SBizzInfo[bouse-100][sbTill] -= cashdeposit;
format(string, sizeof(string), " You Have Withdrawn $%d from your till Total: $%d ", cashdeposit,SBizzInfo[bouse-100][sbTill]);
OnPropUpdate();
OnPropTextdrawUpdate(3, bouse);
SendClientMessage(playerid, COLOR_YELLOW, string);
return 1;
}
}
else
{
if (!PlayerToPoint(100, playerid,BizzInfo[bouse][bExitX],BizzInfo[bouse][bExitY],BizzInfo[bouse][bExitZ]))
{
SendClientMessage(playerid, COLOR_GRAD2, " You are to far from your business");
return 1;
}
else
{
ConsumingMoney[playerid] = 1;
GivePlayerMoney(playerid,cashdeposit);
BizzInfo[bouse][bTill] -= cashdeposit;
format(string, sizeof(string), " You Have Withdrawn $%d from your till Total: $%d ", cashdeposit,BizzInfo[bouse][bTill]);
OnPropUpdate();
OnPropTextdrawUpdate(2, bouse);
SendClientMessage(playerid, COLOR_YELLOW, string);
return 1;
}
}
}
return 1;
}
if(strcmp(cmd, "/bizfee", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new bouse = PlayerInfo[playerid][pPbiskey];
if (bouse == 255)
{
SendClientMessage(playerid, COLOR_GRAD2, " You don't own a business !");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /bizfee [EntranceFee]");
}
if(strval(tmp) < 0 || strval(tmp) > 9999)
{
SendClientMessage(playerid, COLOR_WHITE, "Minimum entrance is $0, Maximum entrance is $9999.");
return 1;
}
if (bouse >= 100)
{
SBizzInfo[bouse-100][sbEntranceCost] = strval(tmp);
format(string, sizeof(string), "Entrance fee set to $%d.", SBizzInfo[bouse-100][sbEntranceCost]);
OnPlayerUpdateEx(playerid);
OnPropTextdrawUpdate(3, bouse);
}
else
{
BizzInfo[bouse][bEntranceCost] = strval(tmp);
format(string, sizeof(string), "Entrance fee set to $%d.", BizzInfo[bouse][bEntranceCost]);
OnPlayerUpdateEx(playerid);
OnPropTextdrawUpdate(2, bouse);
}
OnPropUpdate();
SendClientMessage(playerid, COLOR_WHITE, string);
}
return 1;
}
if(strcmp(cmd, "/extortion", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new bouse = PlayerInfo[playerid][pPbiskey];
if (bouse == 255)
{
SendClientMessage(playerid, COLOR_GRAD2, " You don't own a business");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /extortion [playerid/PartOfName] (or 555 for No-one)");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "* %s is know Extortioning your Business.",giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* %s has adjusted his Business, you are now Extortioning his Business.",sendername);
SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
if (bouse >= 100)
{
format(string, sizeof(string), "%s",giveplayer);
strmid(SBizzInfo[bouse-100][sbExtortion], string, 0, sizeof(string), 255);
format(string, sizeof(string), "Business Extortion Name set to %s",SBizzInfo[bouse-100][sbExtortion]);
OnPropTextdrawUpdate(3, bouse);
}
else
{
format(string, sizeof(string), "%s",giveplayer);
strmid(BizzInfo[bouse][bExtortion], string, 0, sizeof(string), 255);
format(string, sizeof(string), "Business Extortion Name set to %s",BizzInfo[bouse][bExtortion]);
OnPropTextdrawUpdate(2, bouse);
}
OnPropUpdate();
SendClientMessage(playerid, COLOR_WHITE, string);
}
}
else if(giveplayerid == 555)
{
if (bouse >= 100)
{
format(string, sizeof(string), "No-one");
strmid(SBizzInfo[bouse-100][sbExtortion], string, 0, sizeof(string), 255);
format(string, sizeof(string), "Business Extortion Name set to %s",SBizzInfo[bouse-100][sbExtortion]);
OnPropTextdrawUpdate(3, bouse);
}
else
{
format(string, sizeof(string), "No-one");
strmid(BizzInfo[bouse][bExtortion], string, 0, sizeof(string), 255);
format(string, sizeof(string), "Business Extortion Name set to %s",BizzInfo[bouse][bExtortion]);
OnPropTextdrawUpdate(2, bouse);
}
OnPropUpdate();
SendClientMessage(playerid, COLOR_WHITE, string);
}
else
{
SendClientMessage(playerid, COLOR_GREY, " That player is Offline !");
return 1;
}
}
return 1;
}
new PropertyString[256];
for(new h = 0; h < sizeof(HouseInfo); h++)
{
if(HouseInfo[h][hOwned] == 0)
{
format(PropertyString,sizeof(PropertyString),"{FFFFFF}Aceasta casa este de vanzare!{00E800} \n Pret: {FFFFFF}$%d {00E800}\n Descriere: {FFFFFF}%s {00E800}\n Level: {FFFFFF}%d {00E800}\n Pentru a cumpara scrie {FFFFFF}/buyhouse",HouseInfo[h][hValue],HouseInfo[h][hDiscription], HouseInfo[h][hLevel]);
HouseLabel[h] = Create3DTextLabel(PropertyString ,COLOR_GROVE,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez],20.0, 0, 1);
}
if(HouseInfo[h][hOwned] == 1)
{
format(PropertyString,sizeof(PropertyString),"Propietar: {FFFFFF}%s {00E800}\n Pret Inchiriere: {FFFFFF}$%d {00E800}\n Descriere: {FFFFFF}%s {00E800}\n Pentru a inchiria scrie {FFFFFF}/rentroom",HouseInfo[h][hOwner],HouseInfo[h][hRent], HouseInfo[h][hDiscription]);
HouseLabel[h] = Create3DTextLabel(PropertyString ,COLOR_GROVE,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez],20.0, 0, 1);
}
}
for(new h = 0; h < sizeof(BizzInfo); h++)
{
if(BizzInfo[h][bOwned] == 0)
{
format(PropertyString,sizeof(PropertyString),"{FFFFFF}Aceasta afacere este de vanzare!{00E800} \n Nume: {FFFFFF}%s {00E800}\n Pret: {FFFFFF}$%d {00E800}\n Level: {FFFFFF}%d {00E800}\n Pentru a cumpara scrie, {FFFFFF}/buybiz",BizzInfo[h][bMessage],BizzInfo[h][bBuyPrice],BizzInfo[h][bLevelNeeded]);
BizzLabel[h] = Create3DTextLabel(PropertyString ,COLOR_GROVE,BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ],20.0, 0, 1);
}
if(BizzInfo[h][bOwned] == 1)
{
format(PropertyString,sizeof(PropertyString),"{FFFFFF}%s {00E800}\n Propietar: {FFFFFF}%s {00E800}\n Manager: {FFFFFF}%s {00E800}\n Pret Intrare: {FFFFFF}$%d. {00E800}\n Pentru a intra scrie, {FFFFFF}/enter.",BizzInfo[h][bMessage],BizzInfo[h][bOwner],BizzInfo[h][bExtortion],BizzInfo[h][bEntranceCost]);
BizzLabel[h] = Create3DTextLabel(PropertyString ,COLOR_GROVE,BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ],20.0, 0, 1);
}
}
for(new h = 0; h < sizeof(SBizzInfo); h++)
{
if(SBizzInfo[h][sbOwned] == 0)
{
format(PropertyString,sizeof(PropertyString),"{FFFFFF}Aceasta afacere este de vanzare!{00E800} \n Nume: {FFFFFF}%s {00E800}\n Pret: {FFFFFF}$%d {00E800}\n Level: {FFFFFF}%d {00E800}\n Pentru a cumpara scrie, {FFFFFF}/buybiz",SBizzInfo[h][sbMessage],SBizzInfo[h][sbBuyPrice],SBizzInfo[h][sbLevelNeeded]);
SBizzLabel[h] = Create3DTextLabel(PropertyString ,COLOR_GROVE,SBizzInfo[h][sbEntranceX], SBizzInfo[h][sbEntranceY], SBizzInfo[h][sbEntranceZ],20.0, 0, 1);
}
if(SBizzInfo[h][sbOwned] == 1)
{
format(PropertyString,sizeof(PropertyString),"{FFFFFF}%s {00E800}\n Propietar: {FFFFFF}%s {00E800}\n Manager: {FFFFFF}%s {00E800}\n Intrare: {FFFFFF}$%d {00E800}\n Pentru a intra scrie, {FFFFFF}/enter.",SBizzInfo[h][sbMessage],SBizzInfo[h][sbOwner],SBizzInfo[h][sbExtortion],SBizzInfo[h][sbEntranceCost]);
SBizzLabel[h] = Create3DTextLabel(PropertyString ,COLOR_GROVE,SBizzInfo[h][sbEntranceX], SBizzInfo[h][sbEntranceY], SBizzInfo[h][sbEntranceZ],20.0, 0, 1);
}
}
public OnPropTextdrawUpdate(update, id)
{
new PropertyString[256];
if(update == 1)
{
if(HouseInfo[id][hOwned] == 0)
{
Delete3DTextLabel(HouseLabel[id]);
format(PropertyString,sizeof(PropertyString),"{FFFFFF}Casa de vanzare!{00E800} \n Pret: {FFFFFF}$%d {00E800}\n Descriere: {FFFFFF}%s {00E800}\n Level: {FFFFFF}%d {00E800}\n Pentru a cumpara scrie {FFFFFF}/buyhouse",HouseInfo[id][hValue],HouseInfo[id][hDiscription], HouseInfo[id][hLevel]);
HouseLabel[id] = Create3DTextLabel(PropertyString ,COLOR_GROVE,HouseInfo[id][hEntrancex], HouseInfo[id][hEntrancey], HouseInfo[id][hEntrancez],20.0, 0, 1);
}
if(HouseInfo[id][hOwned] == 1)
{
Delete3DTextLabel(HouseLabel[id]);
format(PropertyString,sizeof(PropertyString),"Propietar: {FFFFFF}%s {00E800}\n Pret Chirie: {FFFFFF}$%d {00E800}\n Descriere: {FFFFFF}%s {00E800}\n Pentru a inchiria scrie {FFFFFF}/rentroom",HouseInfo[id][hOwner],HouseInfo[id][hRent], HouseInfo[id][hDiscription]);
HouseLabel[id] = Create3DTextLabel(PropertyString ,COLOR_GROVE,HouseInfo[id][hEntrancex], HouseInfo[id][hEntrancey], HouseInfo[id][hEntrancez],20.0, 0, 1);
}
}
else if(update == 2)
{
if(BizzInfo[id][bOwned] == 0)
{
Delete3DTextLabel(BizzLabel[id]);
format(PropertyString,sizeof(PropertyString),"{FFFFFF}Afacerea este de vanzare!{00E800} \n Nume: {FFFFFF}%s {00E800}\n Pret: {FFFFFF}$%d {00E800}\n Level: {FFFFFF}%d {00E800}\n Pentru a cumpara scrie, {FFFFFF}/buybiz",BizzInfo[id][bMessage],BizzInfo[id][bBuyPrice],BizzInfo[id][bLevelNeeded]);
BizzLabel[id] = Create3DTextLabel(PropertyString ,COLOR_GROVE,BizzInfo[id][bEntranceX], BizzInfo[id][bEntranceY], BizzInfo[id][bEntranceZ],20.0, 0, 1);
}
if(BizzInfo[id][bOwned] == 1)
{
Delete3DTextLabel(BizzLabel[id]);
format(PropertyString,sizeof(PropertyString),"{FFFFFF}%s {00E800}\n Propietar: {FFFFFF}%s {00E800}\n Manager: {FFFFFF}%s {00E800}\n Intrare: {FFFFFF}$%d. {00E800}\n Pentru a intra scrie, {FFFFFF}/enter.",BizzInfo[id][bMessage],BizzInfo[id][bOwner],BizzInfo[id][bExtortion],BizzInfo[id][bEntranceCost]);
BizzLabel[id] = Create3DTextLabel(PropertyString ,COLOR_GROVE,BizzInfo[id][bEntranceX], BizzInfo[id][bEntranceY], BizzInfo[id][bEntranceZ],20.0, 0, 1);
}
}
else if(update == 3)
{
if(SBizzInfo[id][sbOwned] == 0)
{
Delete3DTextLabel(SBizzLabel[id]);
format(PropertyString,sizeof(PropertyString),"{FFFFFF}Afacerea este de vanzare!{00E800}\n Nume: {FFFFFF}%s {00E800}\n Pret: {FFFFFF}$%d {00E800}\n Level: {FFFFFF}%d {00E800}\n Pentru a cumpara scrie, {FFFFFF}/buybiz",SBizzInfo[id][sbMessage],SBizzInfo[id][sbBuyPrice],SBizzInfo[id][sbLevelNeeded]);
SBizzLabel[id] = Create3DTextLabel(PropertyString ,COLOR_GROVE,SBizzInfo[id][sbEntranceX], SBizzInfo[id][sbEntranceY], SBizzInfo[id][sbEntranceZ],20.0, 0, 1);
}
if(SBizzInfo[id][sbOwned] == 1)
{
Delete3DTextLabel(SBizzLabel[id]);
format(PropertyString,sizeof(PropertyString),"{FFFFFF}%s {00E800}\n Propietar: {FFFFFF}%s {00E800}\n Manager: {FFFFFF}%s {00E800}\n Intrare: {FFFFFF}$%d {00E800}\n Pentru a intra scrie, {FFFFFF}/enter.",SBizzInfo[id][sbMessage],SBizzInfo[id][sbOwner],SBizzInfo[id][sbExtortion],SBizzInfo[id][sbEntranceCost]);
SBizzLabel[id] = Create3DTextLabel(PropertyString ,COLOR_GROVE,SBizzInfo[id][sbEntranceX], SBizzInfo[id][sbEntranceY], SBizzInfo[id][sbEntranceZ],20.0, 0, 1);
}
}
return 1;
}
Most likely from an outdated plugin. Remove any trace of the sscanf plugin from your server directory, and script. Now go download the latest one, install it again, re-compile your script and see what happens from there.
All plugins is updated, the problem persist. Any ideea ?