[Include] Chat @mentiones system
#1

Include contain function for chat @mentiones system

PHP код:
/*************************************************************************************************************************************
 *                                                                                                                                   *
 *                                                       )(   @mentiones   )(                                                        *
 *                                                                                                                                   *
 * Copyright © 2018 Abyss Morgan. All rights reserved.                                                                               *
 * Contributors: None                                                                                                                *
 *                                                                                                                                   *
 * Website:  http://8.ct8.pl                                                                                                         *
 * Download: http://8.ct8.pl/r/download                                                                                              *
 *                                                                                                                                   *
 * Plugins: SScanf                                                                                                                   *
 * Modules: RGB                                                                                                                      *
 *                                                                                                                                   *
 * File Version: 1.0.0                                                                                                               *
 *                                                                                                                                   *
 * Functions:                                                                                                                        *
 * GetMentiones(playerid,text[],mention_color=0xCC0000FF,back_color=0xFFFFFFFF,max_len=sizeof(text));                                *
 *                                                                                                                                   *
 * Callbacks:                                                                                                                        *
 * OnPlayerMentioned(playerid,targetid);                                                                                             *
 *                                                                                                                                   *
 *************************************************************************************************************************************/ 
Example:
PHP код:
public OnPlayerMentioned(playerid,targetid){
    
//create your own notice with TextDraw/sound
    
return 1;
}
public 
OnPlayerText(playerid,text[]){
    
GetMentiones(playerid,text,0xCC0000FF,0x00AA00FF); //back_color the same as first chat color
    
SendClientMessageToAll(0x00AA00FF,text);
    return 
0;
}
//Hi @Johny and @Alena how are you ?
//Two existing players got notice and nick color has been changed to 0xCC0000FF 
Download:
mentiones.inc
RGB.inc

Non-Registered Users:
Bug Report


Thread SRC: http://8.ct8.pl/t/[EN]mentiones.txt
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)