OnPlayerText BUG
#1

PHP код:
public OnPlayerText(playeridtext[]) {
    new 
txt[128];
    if (
strlen(text) > && text[0] == '!' && text[1] == '!') {
        if (
PlayerInfo[playerid][pAdmin] < 1) {
            
SendChatMessage(playerid, -1Error("Admin Permissions Needed!"));
            return 
0;
        }
        
strdel(text,0,2);
        
format(txt,sizeof(txt),"[ADMIN] %s (Rate: %d): %s",GetPlayerNameEx(playerid),PlayerInfo[playerid][pAdmin],text);
        
SendAdminMessage(COLOR_LIME,txt);
        return 
0;
    }
    if (
IsPlayerTalkingWithCellphone(playerid)) {
        
format(txt,sizeof(txt),"[MOBILE] %s : %s",GetPlayerNameEx(playerid),text);
        
SendLocalMessage(TALK_RANGE,playerid,txt,COLOR_CHAT_ONE,COLOR_CHAT_TWO,COLOR_CHAT_THREE,COLOR_CHAT_FOUR,COLOR_CHAT_FIVE);
        
SendChatMessage(GetPlayerCaller(playerid),COLOR_CHAT_ONE,txt);
        return 
0;
    }
    if (
strlen(text) > && text[0] == '(' && text[1] == '(' && text[strlen(text) - 1] == ')' && text[strlen(text) - 2] == ')') {
        
strdel(text,0,2);
        
strdel(text,strlen(text) - 2,strlen(text) - 1);
        
format(txt,sizeof(txt),"%s : (( %s ))",GetPlayerNameEx(playerid),text);
    }
    else {
        
format(txt,sizeof(txt),"%s Says: %s",GetPlayerNameEx(playerid),text);
    }
    
SendLocalMessage(TALK_RANGE,playerid,txt,COLOR_CHAT_ONE,COLOR_CHAT_TWO,COLOR_CHAT_THREE,COLOR_CHAT_FOUR,COLOR_CHAT_FIVE);
    
SetPlayerChatBubble(playerid,text,COLOR_White,50.0,CHAT_BUBBLE_TIME);
    return 
0;

This Callback is does not working. I was placed a print under the 'public OnPlayerText' and typed something in chat in-game and print wasen't worked!
(Sorry for english)

[EDIT] Note: i have a macro similar to this: #define SendChatMessage SendClientMessage
Reply


Messages In This Thread
OnPlayerText BUG - by hesambia - 14.12.2014, 11:27
Re: OnPlayerText BUG - by hesambia - 15.12.2014, 02:32
Re: OnPlayerText BUG - by Abagail - 15.12.2014, 02:35
Re: OnPlayerText BUG - by hesambia - 15.12.2014, 10:53
Respuesta: OnPlayerText BUG - by !R1Ch@rD! - 15.12.2014, 10:54
Re: OnPlayerText BUG - by hesambia - 15.12.2014, 11:09
Re: OnPlayerText BUG - by hesambia - 15.12.2014, 11:38
Re: OnPlayerText BUG - by hesambia - 15.12.2014, 11:53

Forum Jump:


Users browsing this thread: 1 Guest(s)