/mute and /umute cmd plz using sscanf+zcmd
#1

plz using sscanf+zcmd
Reply
#2

plz help me
Reply
#3

Search for it - this has been done 1908312093 times before - or post in the Script Request thread.
Reply
#4

help me guys plzzzzzz
Reply
#5

plz plz
Reply
#6

DONT Spam here, use that Topic:

https://sampforum.blast.hk/showthread.php?tid=187229
Reply
#7

Quote:
Originally Posted by mittukuttan
Посмотреть сообщение
plz plz
Use ******, And STOP SPAMMING.
Reply
#8

pawn Код:
new muted[MAX_PLAYERS]; // on top of your gm
pawn Код:
CMD:mute(playerid,params[])
{
    new id,str[128];
    if(pInfo[playerid][Adminlevel] >= 1)
    {
        if(sscanf(params,"u",id)) return SendClientMessage(playerid,-1,"Usage: /mute [id]");
        if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, 0xFF0000AA, "Player not found");
        format(str,sizeof(str),"Admin %s[%i] has Muted %s[%i]",GetPlayersName(playerid),playerid,GetPlayersName(id),id);
        SendClientMessageToAll(COLOR_LIGHTBLUE,str);
        muted[id] = 1;
    }
    else return SendClientMessage(playerid,COLOR_RED1,"You may not use this command");
    return 1;
}
CMD:unmute(playerid,params[])
{
    new id,str[128];
    if(pInfo[playerid][Adminlevel] >= 1)
    {
        if(sscanf(params,"u",id)) return SendClientMessage(playerid,-1,"Usage: /unmute [id]");
        if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, 0xFF0000AA, "Player not found");
        format(str,sizeof(str),"Admin %s[%i] has unmuted %s[%i]",GetPlayersName(playerid),playerid,GetPlayersName(id),id);
        SendClientMessageToAll(COLOR_LIGHTBLUE,str);
        muted[id] = 0;
    }
    else return SendClientMessage(playerid,COLOR_RED1,"You may not use this command");
    return 1;
}// add the commands anywhere.
pawn Код:
if(muted[playerid] == 1)
    {
        SendClientMessage(playerid,COLOR_RED1,"You have been muted you can't talk");
        return 0;
    }
// add this at OnPlayerText
stock GetPlayersName(playerid)
{
    new pName[32];
    GetPlayerName(playerid,pName,32);
    return pName;
}// add this anywhere.
Reply
#9

C:\Users\intel\Desktop\New Folder\Roleplay Base Script\gamemodes\lfgr.pwn(546) : error 017: undefined symbol "COLOR_RED1"
C:\Users\intel\Desktop\New Folder\Roleplay Base Script\gamemodes\lfgr.pwn(952) : warning 219: local variable "pName" shadows a variable at a preceding level
C:\Users\intel\Desktop\New Folder\Roleplay Base Script\gamemodes\lfgr.pwn(959) : error 028: invalid subscript (not an array or too many subscripts): "pInfo"
C:\Users\intel\Desktop\New Folder\Roleplay Base Script\gamemodes\lfgr.pwn(959) : warning 215: expression has no effect
C:\Users\intel\Desktop\New Folder\Roleplay Base Script\gamemodes\lfgr.pwn(959) : error 001: expected token: ";", but found "]"
C:\Users\intel\Desktop\New Folder\Roleplay Base Script\gamemodes\lfgr.pwn(959) : error 029: invalid expression, assumed zero
C:\Users\intel\Desktop\New Folder\Roleplay Base Script\gamemodes\lfgr.pwn(959) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


5 Errors.
Reply
#10

Click Me If You Want mute FS
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)