OnPlayerText
#1

Hello

Code :

PHP код:
public OnPlayerText(playeridtext[])
{
    if(
P_Data[playerid][pMute] == 1
    {
        
SCM(playeridCOLOR_RED"You are muted, noone can hear you!");
        return 
0;
    }
    if(!
strcmp(xCharstext))
    {
        new
        
string[128],
        
xName[MAX_PLAYER_NAME]
        ;
        
GetPlayerName(playeridxNamesizeof(xName));
        
format(stringsizeof(string), "« \%s\" has won the reaction test. »"xName);
        
SendClientMessageToAll(GREENstring);
        
format(stringsizeof(string), "« You have earned $%d »"xCashxScore);
        
SendClientMessage(playeridGREENstring);
        
GivePlayerMoney(playeridxCash);
        
xReactionTimer SetTimer("xReactionTest"TIME1);
        
xTestBusy false;
        return 
0;
    }
    if(
text[0] == '#' && Info[playerid][indm] == 1)
    {
        new 
str[128], name[MAX_PLAYER_NAME];
        
GetPlayerName(playeridnamesizeof(name));
        
format(strsizeof(str), ""REDx"[DM CHAT] %s: "WHITEx"%s"nametext[1]);
        for(new 
0MAX_PLAYERSi++)
        {
            if(!
IsPlayerConnected(i)) continue;
            if(
Info[i][indm] == )continue;
            
SendClientMessage(i, -1str);
        }
        return 
0;
    }
    if(
IsPlayerAdmin(playerid))
    {
        new 
pname[128];
        
GetPlayerName(playerid,pname,sizeof(pname));
        new 
stf[128];
        new 
stringig[128];
        
format(stfsizeof(stf), "%s [%d] (Administrator): "WHITEx"%s"pnameplayeridtext);
        
SendClientMessageToAll(GetPlayerColor(playerid), stf);
        
format(stringig,sizeof(stringig),"02[%d] 07%s(Administrator): %s",playeridpname,text);
        
IRC_Say(groupIDIRC_ECHOstringig);
        return 
0;
    } 
    else
    {
        new 
pname[128];
        
GetPlayerName(playerid,pname,sizeof(pname));
        new 
stf[128];
        new 
stringig[128];
        
format(stfsizeof(stf), "%s [%d]: "WHITEx"%s"pnameplayeridtext);
        
SendClientMessageToAll(GetPlayerColor(playerid), stf);
        
format(stringig,sizeof(stringig),"02[%d] 07%s: %s",playeridpname,text);
        
IRC_Say(groupIDIRC_ECHOstringig);
        return 
0;
    } 
      return 
1; <---- Line 79

Error :

PHP код:
D:\pawno-master\include\SAPData/Chat/ChatManager.pwn(79) : warning 225unreachable code 
How the hell i can fix this :/
Reply


Messages In This Thread
OnPlayerText - by Yaa - 30.10.2016, 12:08
Re: OnPlayerText - by iLearner - 30.10.2016, 12:21
Re: OnPlayerText - by Yaa - 30.10.2016, 12:24
Re: OnPlayerText - by Jayse - 30.10.2016, 12:25
Re: OnPlayerText - by J0sh... - 30.10.2016, 12:26
Re: OnPlayerText - by Yaa - 30.10.2016, 12:30

Forum Jump:


Users browsing this thread: 2 Guest(s)