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

So, basically I've a hosted tab server, the scripts allover working fine.

But when I tried to chat ''test'', it doesn't appears, no messages from players.

Why ?
Reply
#2

returning 0 at OnPlayerSpawn prevents de defaul chat to be sent.
Reply
#3

Quote:
Originally Posted by arakuta
Посмотреть сообщение
returning 0 at OnPlayerSpawn prevents de defaul chat to be sent.
What?

Please show your OnPlayerText callback without any script we can't assist you.
Reply
#4

Maybe you use a Command to Chat with another Players ^^
Reply
#5

wtf? you guys reply so quick to retarded ass shit like this but you never reply to my posts
Reply
#6

arakute please spesific it more...
Reply
#7

heres my OnPlayerText script

Код:
public OnPlayerText(playerid, text[])
{
    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;
    }
    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;
    }
    if(PInfo[playerid][pMute] == 1) {
    SendClientMessage(playerid, COLOR_RED, "You are muted, no one can hear you!");
    return 0; }
    return 0;
}
I've changed the ''return 1'' into ''return 0'' as it was told above.
Reply
#8

Uhm no. The last one's got to be 'return 1'.
Reply
#9

The problem seems to be still appeared...
Reply
#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


Forum Jump:


Users browsing this thread: 1 Guest(s)