Can somebody help me with a command please....
#1

Код:
dcmd_setfaction(playerid, params[])
{
	new
	giveplayerid,
	amount;
	if (sscanf(params, "ud", giveplayerid, amount)) SendClientMessage(playerid, 0xFF0000AA, "Usage: /setfaction [playerid] [factionid]");
	else if (giveplayerid == INVALID_PLAYER_ID) SendClientMessage(playerid, 0xFF0000AA, "Player not found");
	else
	{
    new name[MAX_PLAYER_NAME], file[256];
    GetPlayerName(playerid, name, sizeof(name));
    format(file, sizeof(file), SERVER_USER_FILE, name);
    if (!dini_Exists(file))
    {
    SendClientMessage(playerid, 0xFF0000AA, "Player is not registred");
    }
    if(fexist(file))
    {
	PlayerInfo[playerid][pFaction] = amount;
	dini_IntSet(SERVER_USER_FILE, "Faction",PlayerInfo[playerid][pFaction]);
    }
	}
	return 1;
}
I want it to change the settings from the user's file,the command works but it dosent change the value...please can somebody help me out...its just a simple thing i guess...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)