Not Receiving Any Message
#1

pawn Код:
CMD:afactionname(playerid, params[])
{
    new
    name[128], id, string[128];
    if(PlayerInfo[playerid][pAdmin] < 2) return SCM(playerid, COLOR_GREY,"[Error]: You're not authorized to use this command.");
    if(sscanf(params, "ds[128]", id, name)) return SendClientMessage(playerid, COLOR_GREY, "[Usage]: /afactionname [factionID] [name]");
    if(id < 1 || id > 10 ) return SCM(playerid, COLOR_LIGHTRED, "Invalid faction ID.");

    for(new f = 1;f < sizeof(FactionInfo);f++)
    {
        if(id == f)
        {
            FactionInfo[id][fName] = name;
            new file4[40];
            format(file4, sizeof(file4), FPATH, id);
            new INI:File = INI_Open(file4);
            INI_SetTag(File,"data");
            INI_WriteString(File,"Name", FactionInfo[id][fName]);
            INI_Close(File);
        }
    }
   
    SendClientMessage(playerid, COLOR_WHITE, string);
    format(string, sizeof(string), "You have changed the name of this faction to %s.", FactionInfo[id][fName]);
    return 1;
}
My chatbox goes up one bit but I don't see any text..
Reply
#2

pawn Код:
SendClientMessage(playerid, COLOR_WHITE, string);
    format(string, sizeof(string), "You have changed the name of this faction to %s.", FactionInfo[id][fName]);
You are basically sending an empty string, you need to flip these.

pawn Код:
format(string, sizeof(string), "You have changed the name of this faction to %s.", FactionInfo[id][fName]);
    SendClientMessage(playerid, COLOR_WHITE, string);
Reply
#3

LOL. Thanks mate, I'm a bit tired I guess.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)