[HELP] Two Questions
#1

1. Can someone make an mute-unmute command with "strcmp"?
2. Mega Jump (on/off)

Mega Jump(on):
pawn Код:
else if(dialogid == 15)
    {
        if(response)
        {
            if (PRESSED(KEY_JUMP))
            }
                SetPlayerVelocity(playerid,0.0,0.2,0.5);
            }
        }
        return 1;
    }
Mega Jump(off):
pawn Код:
else if(dialogid == 16)
    {
        if(response)
        {
            if (PRESSED(KEY_JUMP))
            }
                SetPlayerVelocity(playerid,0.0,0.0,0.0);
            }
        }
        return 1;
    }
Reply
#2

pawn Код:
new JUMP[MAX_PLAYERS];
pawn Код:
JUMP[playerid] == 1  // Actived
         JUMP[playerid] == 0 // Desactived
Reply
#3

just use ZCMD or DCMD... but whatever.... enjoy: Mute command
pawn Код:
public OnPlayerCommandText(playerid,cmdtext[])
{
    new cc[128];
    sscanf(cmdtext,"s[128]",cc);
    if(!strcmp(cc,"/mute",true))
    {  
        new id[MAX_PLAYERS],str[128];
        if(sscanf(cmdtext,"s[128]i",cc,id[playerid])) return SendClientMessage(playerid,COLOR_RED,"How To Use: /Mute [ ID ]");
        if(!IsPlayerConnected(id[playerid])) return SendClientMessage(playerid,COLOR_RED,"Player Not Connected");
        if(MutedP[playerid]==0)
        {
            MutedP[playerid]=1;
            format(str,128,"You Have Muted Player ID : %d",id[playerid]);
            SendClientMessage(id[playerid],COLOR_WHITE,"You Have Been Muted By The Admin");
        }
        else
        {
            MutedP[playerid]=0;
            format(str,128,"You Have UnMuted Player ID : %d",id[playerid]);
            SendClientMessage(id[playerid],COLOR_WHITE,"You Have Been Muted By The Admin");
        }
        return SendClientMessage(playerid,COLOR_GREEN,str);
    }
           return 0;
}
//--------------
public OnPlayerText(playerid, text[])
{
    if(MutedP[playerid]==1)
           {
                   SendClientMessage(playerid,COLOR_RED,"You Are On Mute");
                   return 0;
           }
           return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)