Y_INI custom saving filename or by ID's
#3

Ok so i made the commande but when i use the command i get file name %s.ini instead of what i input as text. How i can fix that or get dealer when i type /newdealer that file name is either what i typed by command or automatically by id. Any help would be great. Thanks

pawn Код:
YCMD:newdealer(playerid, params[], help)
{
    new dealer[32];
    if(!(PlayerInfo[playerid][pAdmin] == 1338)) return SCM(playerid, COLOR_INFO,"You are not authorized to use this command");
    {
        if (sscanf(params, "s[64]",dealer)) SendClientMessage(playerid, COLOR_INFO, "Usage: \"/newdealer name"");
    new
        Dealer[32];
    format(Dealer, sizeof (Dealer), "
dealer/%s.ini", dealer);
   
    new
        INI:dealerfile = INI_Open(DEALER_FILE);
 
    INI_SetTag(dealerfile, "
Dealership Info");
   
    INI_WriteInt(dealerfile, "
Owner", DealerInfo[playerid][dOwner]);
   
   
    INI_Close(dealerfile);
    return 1;
    }
}
So output is %s.ini and in file is

[Dealership Info]
Owner = 0
Reply


Messages In This Thread
Y_INI custom saving filename or by ID's - by caki - 18.05.2012, 18:00
Re: Y_INI custom saving filename or by ID's - by caki - 19.05.2012, 10:37
Re: Y_INI custom saving filename or by ID's - by caki - 27.05.2012, 10:54

Forum Jump:


Users browsing this thread: 1 Guest(s)