01.09.2011, 11:44
Hello again. I have a business system and it works just fine, but when I /sellbusiness the server says on main chat for example : Dragonu has sold Santos Bank. The thing is that I named the "Santos Bank" "Los Santos Bank" so in game when i sell my business it only appears Dragonu sold Santos Bank, instead of Dragonu sold Los Santos Bank.
Here is the business code :
And here is the business sale script
Here is the business code :
pawn Код:
1480.982177,-1770.193603,18.795799,389.832000,173.746200,1008.382812,Los Santos Bank,For Sale,0,0,100000000,35,0,3,1,49400,98
pawn Код:
if(strcmp(cmd, "/sellbusiness", true) == 0 || strcmp(cmd, "/sellbiz", true) == 0)
{
if(PlayerInfo[playerid][pBusinessKey] == INVALID_BUSINESS_ID)
{
SendClientMessage(playerid, COLOR_RED, "You cannot sell your business because you don't have one.");
return 1;
}
else
{
new businessid = PlayerInfo[playerid][pBusinessKey];
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
SendClientMessage(playerid, COLOR_YELLOW, "You have successfully sold your business.");
PlayerInfo[playerid][pBusinessKey] = INVALID_BUSINESS_ID;
new bizzname[32];
strmid(bizzname, BusinessInfo[businessid][bDescription], 3, strlen(BusinessInfo[businessid][bDescription]), 32);
format(string, sizeof(string), "%s has sold business %s.", PlayerName[playerid], bizzname);
SendClientMessageToAll(COLOR_YELLOW, string);
GivePlayerMoney(playerid, BusinessInfo[businessid][bPrice]/2);
SellBusiness(businessid);
OnBusinessUpdate();
}
return 1;
}