Updating Names (+rep)
#5

Quote:
Originally Posted by TTJJ
Посмотреть сообщение
Hi there,

May I ask what
pawn Код:
if(GetPlayerBusinessID(playerid) == 1)
That line is for?

Also, you have not formatted the business info "bLabel" variable. Try adding this to your code:

pawn Код:
format(BusinessInfo[cpid[playerid]][bLabel],128,"%s",name);
Change the 128 integer to be the length of your bLabel variable.

Cheers,

TJ
Quote:
Originally Posted by Tanush123
Посмотреть сообщение
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;
}
I was trying to use it to see if the player owned the biz

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;
}
And why do they need the biz id? it should be the players biz id already there for them so they need just /namebiz (name)
The players can change the name of the other players biz now. I want it to check if the player owns a biz and set the name of his biz ONLY.
Reply


Messages In This Thread
Updating Names (+rep) - by SnG.Scot_MisCuDI - 14.03.2012, 07:49
Re: Updating Names (+rep) - by TTJJ - 14.03.2012, 09:37
Re: Updating Names (+rep) - by Tanush123 - 14.03.2012, 13:16
Re: Updating Names (+rep) - by TTJJ - 14.03.2012, 13:28
Re: Updating Names (+rep) - by SnG.Scot_MisCuDI - 14.03.2012, 21:55
Re: Updating Names (+rep) - by SnG.Scot_MisCuDI - 15.03.2012, 00:51
Re: Updating Names (+rep) - by [ABK]Antonio - 15.03.2012, 02:45

Forum Jump:


Users browsing this thread: 1 Guest(s)