SA-MP Forums Archive
CMD:Facpay ERROR - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: CMD:Facpay ERROR (/showthread.php?tid=296324)



CMD:Facpay ERROR - DaRkAnGeL[NBK] - 11.11.2011

Hey,

Testing my gamemode out for some bugs/glitches all good untill now. That is a problem with facpay command that was scripted by a friend of mine.
pawn Код:
CMD:facpay(playerid, params[]) {
    if(PlayerInfo[playerid][pAdmin] < 4) {

        new
            iFactionID,
            iRankValue,
            iPayValue;

        if(sscanf(params, "ddd", iFactionID, iRankValue, iPayValue)) {
            return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /facpay [faction ID] [rank] [pay amount]");
        }
        --iFactionID;
        if(!(0 <= iFactionID < sizeof(FactionPay))) {
            return SendClientMessageEx(playerid, COLOR_WHITE, "Valid faction IDs run from 1 to 12.");
        }
        else if(!(0 <= iRankValue <= 6)) {
            return SendClientMessageEx(playerid, COLOR_WHITE, "Valid ranks are 0 to 6.");
        }
        else if(!(1 <= iPayValue <= 100000)) {
            return SendClientMessageEx(playerid, COLOR_GRAD1, "The specified pay amount must be between $1 and $100,000.");
        }

        FactionPay[iFactionID][iRankValue] = iPayValue;

        new
            szMessage[46 + MAX_PLAYER_NAME];

        format(szMessage, sizeof(szMessage), "You have set faction %d's pay for rank %d to $%d.", iFactionID + 1, iRankValue, iPayValue);
        SendClientMessageEx(playerid, COLOR_WHITE, szMessage);
        format(szMessage, sizeof(szMessage), "%s has set faction %i's pay for rank %i to %i.", GetPlayerNameEx(playerid), iFactionID + 1, iRankValue, iPayValue);
        Log("logs/admin.log", szMessage);
        SaveThePay();
    }
    else SendClientMessageEx(playerid, COLOR_GRAD1, "You are not authorized to use this command.");
    return 1;
}
For some reason all i get ingame is "You are not authorized to use this command" please guide me on fixing,

Thanks


Re: CMD:Facpay ERROR - Norn - 11.11.2011

Because it'll only work if the administrator level is 3 or below, please stick to one thread.


Re: CMD:Facpay ERROR - DaRkAnGeL[NBK] - 11.11.2011

What do you mean "Stick to one thread" ?


Re: CMD:Facpay ERROR - Norn - 11.11.2011

Quote:
Originally Posted by DaRkAnGeL[NBK]
Посмотреть сообщение
What do you mean "Stick to one thread" ?



Re: CMD:Facpay ERROR - DaRkAnGeL[NBK] - 11.11.2011

So? Whats wrong with that? All the treads are different, I am simply asking help from the samp Community, There is nothing in the rules about posts per day ETC.


Re: CMD:Facpay ERROR - Norn - 11.11.2011

Yes there are rules actually and you know you can simply update the thread title.


Re: CMD:Facpay ERROR - DaRkAnGeL[NBK] - 11.11.2011

The rule state more about double posting on the same thread, This is not what i have done.


Re: CMD:Facpay ERROR - Norn - 11.11.2011

So spamming threads is better than double posting? Haha, get a grip.


Re: CMD:Facpay ERROR - DaRkAnGeL[NBK] - 11.11.2011

Its not spamming bro, Maybe you should look it up on ****** eh? and get off my threads if you dont like em.


Re: CMD:Facpay ERROR - Norn - 11.11.2011

Creating multiple threads when you have the option to modify the title is unnecessary thus spamming.