Command doesn't work.
#7

PHP код:
CMD:toggle(playeridparams[]) 
{
    new 
settings[24];
    if(
sscanf(params"s[24]"settings)) return SendClientMessage(playerid, -1"Use /toggle (PM, TesterChat, AdminChat, Radio)");
    if(!
strcmp(settings"pm"true))
    { 
        if(
pInfo[playerid][pPM] == 1
        {
            
pInfo[playerid][pPM] = 0
            
SendClientMessage(playerid, -1""COL_LGREEN" Now you get PMs."); 
        } 
        else
        { 
            
pInfo[playerid][pPM] = 1
            
SendClientMessage(playerid, -1""COL_LGREEN" Now you don't get PMs."); 
        }
        return 
1
    }  
    else if(!
strcmp(settings"testerchat"true)) 
    { 
        if(
pInfo[playerid][tChat] == 1
        {
            
pInfo[playerid][tChat] = 0
            
SendClientMessage(playerid, -1,""COL_LGREEN" Activatedl."); 
        } 
        else
        { 
            
pInfo[playerid][tChat] = 1
            
SendClientMessage(playerid, -1,""COL_LGREEN" not"); 
        } 
        return 
1
    } 
    else if(!
strcmp(settings"adminchat"true)) 
    { 
        if(
pInfo[playerid][aChat] == 1
        { 
            
pInfo[playerid][aChat] = 0
            
SendClientMessage(playerid, -1,""COL_LGREEN" Yes."); 
        } 
        else
        { 
            
pInfo[playerid][aChat] = 1
            
SendClientMessage(playerid, -1,""COL_LGREEN" Not"); 
        } 
        return 
1
    }
    else if(!
strcmp(settings"radio"true)) 
    {
        new 
str[MAX_PLAYER_NAME+10];
        if(
pInfo[playerid][rChat] == 1
        { 
            
pInfo[playerid][rChat] = 0;
            
format(strsizeof(str), "* %s yes."PlayerName(playerid));
            
ProxDetector(30playeridstrCOLOR_PURPLE);
        } 
        else
        { 
            
pInfo[playerid][rChat] = 1
            
format(strsizeof(str), "* %s not."PlayerName(playerid)); 
            
ProxDetector(30playeridstrCOLOR_PURPLE); 
        }
        return 
1;
    }
    else 
SendClientMessage(playerid, -1"Use /toggle (PM, TesterChat, AdminChat, Radio)");
    return 
1;

Reply


Messages In This Thread
Command doesn't work. - by Zeus666 - 24.10.2018, 11:24
Re: Command doesn't work. - by Ermanhaut - 24.10.2018, 11:48
Re: Command doesn't work. - by Infin1ty - 24.10.2018, 11:49
Re: Command doesn't work. - by Infin1ty - 24.10.2018, 11:52
Re: Command doesn't work. - by Ermanhaut - 24.10.2018, 11:56
Re: Command doesn't work. - by Zeus666 - 24.10.2018, 12:16
Re: Command doesn't work. - by Undef1ned - 24.10.2018, 15:48
Re: Command doesn't work. - by Zeus666 - 24.10.2018, 19:26
Re: Command doesn't work. - by ReD_HunTeR - 24.10.2018, 19:34
Re: Command doesn't work. - by Zeus666 - 24.10.2018, 19:36

Forum Jump:


Users browsing this thread: 1 Guest(s)