Help, my normal chat doesn't work.
#10

use "else if" and also the callback must return 1 for normal chat.
that'll work:

PHP код:
public OnPlayerText(playeridtext[])
{
    if(
text[0] == '*' && PInfo[playerid][Admin] >= 1)
    {
        new 
str[256]; GetPlayerName(playerid,str,sizeof(str));
        
format(str,sizeof(str),"Admin Chat: {B4B5B7}%s: %s",str,text[1]);
        
AdminPrivateChat(COLOR_RED,str);
        
SaveLogs("AdminChat",str);
        return 
0;
    }
    else if(
text[0] == '@' && PInfo[playerid][VIP] == 1)
    {
        new 
str[256]; GetPlayerName(playerid,str,sizeof(str));
        
format(str,sizeof(str),"VIP Chat: {B4B5B7}%s: %s",str,text[1]);
        
VIPPrivateChat(COLOR_YELLOW,str);
        
SaveLogs("VIPChat",str);
        return 
0;
    }
    else if(
PInfo[playerid][pMute] == 1)
    {
        
SendClientMessage(playeridCOLOR_RED"You are muted, no one can hear you!");
        return 
0;
    }
    
    return 
1;

Quote:
Originally Posted by SA-MP Wiki
Returning 0 in this callback will stop the text from being sent
Reply


Messages In This Thread
Help, my normal chat doesn't work. - by Flaken - 21.12.2013, 17:17
Re: Help, my normal chat doesn't work. - by arakuta - 21.12.2013, 17:48
Re: Help, my normal chat doesn't work. - by iZN - 21.12.2013, 17:55
AW: Help, my normal chat doesn't work. - by atzeex - 21.12.2013, 18:02
Re: Help, my normal chat doesn't work. - by TFoCap - 21.12.2013, 18:04
Re: Help, my normal chat doesn't work. - by Flaken - 22.12.2013, 00:06
Re: Help, my normal chat doesn't work. - by Flaken - 22.12.2013, 08:59
Re: Help, my normal chat doesn't work. - by Vince - 22.12.2013, 10:20
Re: Help, my normal chat doesn't work. - by Flaken - 22.12.2013, 12:00
Re: Help, my normal chat doesn't work. - by CutX - 22.12.2013, 12:55

Forum Jump:


Users browsing this thread: 2 Guest(s)