14.03.2012, 07:49
(
Последний раз редактировалось SnG.Scot_MisCuDI; 15.03.2012 в 05:52.
)
solved.
if(GetPlayerBusinessID(playerid) == 1)
format(BusinessInfo[cpid[playerid]][bLabel],128,"%s",name);
COMMAND:namebiz(playerid, params[])
{
new name[128],busid;
if(sscanf(params,"is",busid,name))return SendClientMessage(playerid, 0xFF0000AA, "Usage: /bizname [name]");
format(file,sizeof(file),"Business/%i.ini",busid);
dini_Set(file, "Name", name);
format(String,sizeof(String),"Biz renamed to: %s",name);
SendClientMessage(playerid,Green,String);
format(Label, sizeof(Label), "Business Name: %s\nOwner: No Owner\nCost: $%i\nPayout: $%i", name,dini_Int(file,"Cost"),dini_Int(file,"Payout"));
Update3DTextLabelText(BusinessInfo[busid][bLabel],White,Label);
return 1;
}
Hi there,
May I ask what pawn Код:
Also, you have not formatted the business info "bLabel" variable. Try adding this to your code: pawn Код:
Cheers, TJ |
You mean changing a business name?
Idk where you got getplayerbusinessid from Tee Dynamic Bus well use this pawn Код:
|
COMMAND:namebiz(playerid, params[])
{
new name[128],busid;
if(sscanf(params,"is",busid,name))return SendClientMessage(playerid, 0xFF0000AA, "Usage: /bizname [name]");
format(file,sizeof(file),"Business/%i.ini",busid);
dini_Set(file, "Name", name);
format(String,sizeof(String),"Biz renamed to: %s",name);
SendClientMessage(playerid,Green,String);
format(Label, sizeof(Label), "Business Name: %s\nOwner: No Owner\nCost: $%i\nPayout: $%i", name,dini_Int(file,"Cost"),dini_Int(file,"Payout"));
Update3DTextLabelText(BusinessInfo[busid][bLabel],White,Label);
return 1;
}
COMMAND:namebiz(playerid, params[])
{
new name[128],busid;
if(sscanf(params,"s",name))return SendClientMessage(playerid, 0xFF0000AA, "Usage: /bizname [name]");
if(GetPlayerBusinessID(playerid) == -1)return SendClientMessage(playerid,Red,"You do not own a business.");
format(file,sizeof(file),"Business/%i.ini",GetPlayerBusinessID(playerid));
dini_Set(file, "Name", name);
format(String,sizeof(String),"Biz renamed to: %s",name);
SendClientMessage(playerid,Green,String);
format(Label, sizeof(Label), "{ccccff}%s\n\n{999999}%s\n{00BC00}Cost: {999999}$%i\n{00BC00}Payout: {999999}$%i",dini_Get(file, "Name"),dini_Get(file, "Owner"),dini_Int(file, "Cost"),dini_Int(file, "Payout"));
Update3DTextLabelText(BusinessInfo[busid][bLabel],White,Label);
return 1;
}