SA-MP Forums Archive
Mute not showing reason - 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: Mute not showing reason (/showthread.php?tid=325257)



Mute not showing reason - iStrow - 12.03.2012

I have problem with my script, i started making it from 0 but i got trouble with mute command, command is working but it won't show reason in chat...
it just stays empty like

Administrator Tom_Smith je oduzeo pravo govora igracu Tom_Smith. [Reason:]

Look down there in code and help me please, and sory for language

Код:
CMD:mute(playerid,params[]) {
    new
        id,
        name1[30],
        name2[30],
        reason[50],
        text[128];
    if(sscanf(params,"u",id, reason))
        return SendClientMessage(playerid, 0xFF9900AA,"Koristenje: /mute [ID/dio imena] [Reason]");
    if(PlayerInfo[playerid][pAdminLevel] >= 2) {
        if(IsPlayerConnected(id)) {
            if(PlayerInfo[id][pAdminLevel] <= PlayerInfo[playerid][pAdminLevel]) {
                if(PlayerInfo[playerid][pMute] == 0) {
                    GetPlayerName(playerid,name1,sizeof(name1));
                    GetPlayerName(id,name2,sizeof(name2));
                    format(text,sizeof(text),"Administrator %s je oduzeo pravo govora igracu %s. [Reason: %s]",name1,name2, reason);
                    SendClientMessageToAll(red,text);
                    PlayerInfo[id][pMute] = 1;
                    new command[30];
                    format(command,sizeof(command),"unmute(%i)",id);
                } else {
                    return SendClientMessage(playerid, 0xFF0000FF,"Greska: Igracu je vec oduzeto pravo govora.");
                }
            } else {
                return SendClientMessage(playerid, 0xFF0000FF,"Greska: Nemozete oduzeti pravo govora adminu veceg levela.");
            }
        } else {
            return SendClientMessage(playerid,0xFF0000FF,"Greska: ID/dio imena koji ste upisali nije ispravan.");
        }
    } else {
        return SendClientMessage(playerid, 0xFF0000FF,"Greska: Ovu komandu mogu koristiti samo admini level 2 ili vise.");
    }
    return 1;
}



Re: Mute not showing reason - Twisted_Insane - 12.03.2012

if(sscanf(params,"us",id,reason))


Re: Mute not showing reason - iStrow - 12.03.2012

thanks, that works rep+


Re: Mute not showing reason - Twisted_Insane - 12.03.2012

Glad I could help!