/facpay bugged [American Roleplay zGaming edit]
#1

The bug is when I try to do /facpay 0-1 400 for example it's show me the command " You have set rank 1's pay to %d"
and the 3-10 not working, and it's not save it at the scriftfiles always it's a $53 faction pay if someone know the gamemode this: Click here

Please help me to fix the bug if you need more something a cmd tell me I'll post it here

Код:
CMD:facpay(playerid, params[])
{
	new rank, amount, string[128];
	if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You are not allowed to use command.");
	if(!PlayerInfo[playerid][pFacLeader]) return SendClientMessage(playerid, COLOR_GREY, "You are not a faction leader.");
	if(sscanf(params, "ui", rank, amount)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /facpay [rank] [amount]");
	if(amount > 300000) return SendClientMessage(playerid, COLOR_WHITE, "Invalid Amount");
	if(amount <= 0) return SendClientMessage(playerid, COLOR_WHITE, "Invalid Amount");
    new idx = PlayerInfo[playerid][pFac];
	if(PlayerInfo[playerid][pFacLeader])
	switch(rank)
	{
	    case 0:
	    {
	    	FacInfo[idx][fPay1] = amount;
	        format(string, sizeof(string), "You have set rank 1's pay to %d", amount);
	        SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
	    }
	    case 1:
	    {
	        FacInfo[idx][fPay2] = amount;
	        format(string, sizeof(string), "You have set rank 2's pay to %d", amount);
	        SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
	    }
	    case 2:
	    {
	        FacInfo[idx][fPay3] = amount;
	        format(string, sizeof(string), "You have set rank 3's pay to %d", amount);
	        SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
	    }
	    case 3:
	    {
	        FacInfo[idx][fPay4] = amount;
	        format(string, sizeof(string), "You have set rank 4's pay to %d", amount);
	        SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
	    }
     	case 4:
	    {
	        FacInfo[idx][fPay5] = amount;
	        format(string, sizeof(string), "You have set rank 5's pay to %d", amount);
	        SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
	    }
	    case 5:
	    {
	        FacInfo[idx][fPay6] = amount;
	        format(string, sizeof(string), "You have set rank 6's pay to %d", amount);
	        SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
	    }
	    case 6:
	    {
	        FacInfo[idx][fPay7] = amount;
	        format(string, sizeof(string), "You have set rank 7's pay to %d", amount);
	        SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
	    }
	    case 7:
	    {
	        FacInfo[idx][fPay8] = amount;
	        format(string, sizeof(string), "You have set rank 8's pay to %d", amount);
	        SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
	    }
	    case 8:
	    {
	        FacInfo[idx][fPay9] = amount;
	        format(string, sizeof(string), "You have set rank 9's pay to %d", amount);
	        SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
	    }
	    case 9:
	    {
	        FacInfo[idx][fPay10] = amount;
	        format(string, sizeof(string), "You have set rank 10's pay to %d", amount);
	        SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
	    }
	    case 10:
	    {
	        FacInfo[idx][fPay11] = amount;
	        format(string, sizeof(string), "You have set rank 11's pay to %d", amount);
	        SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
	    }
	}
	return 1;
}
Reply
#2

Could you post the part that saves to the script files as well?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)