Updating Names (+rep)
#6

This works but it sets the name of biz id 0 but after restart of FS it sets the correct biz name
pawn Код:
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;
}
Video: http://*********/hjI7rB7EVZQ
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: 2 Guest(s)