SA-MP Forums

SA-MP Forums (https://forum.sa-mp.com/index.php)
-   Includes (https://forum.sa-mp.com/forumdisplay.php?f=83)
-   -   [Include] Chat @mentiones system (https://forum.sa-mp.com/showthread.php?t=669623)

AbyssMorgan 26/09/2019 05:52 PM

Chat @mentiones system
 
Include contain function for chat @mentiones system

PHP Code:

/*************************************************************************************************************************************
 *                                                                                                                                   *
 *                                                       )(   @mentiones   )(                                                        *
 *                                                                                                                                   *
 * Copyright  2019 Abyss Morgan. All rights reserved.                                                                               *
 * Contributors: None                                                                                                                *
 *                                                                                                                                   *
 * Website:  adm.ct8.pl                                                                                                              *
 * Download: adm.ct8.pl/r/download                                                                                                   *
 *                                                                                                                                   *
 * Plugins: SScanf                                                                                                                   *
 * Modules: RGB                                                                                                                      *
 *                                                                                                                                   *
 * File Version: 1.2.0                                                                                                               *
 *                                                                                                                                   *
 * Functions:                                                                                                                        *
 * GetMentiones(playerid,text[],mention_color=0xCC0000FF,back_color=0xFFFFFFFF,max_len=sizeof(text));                                *
 *                                                                                                                                   *
 * Callbacks:                                                                                                                        *
 * OnPlayerMentioned(playerid,targetid);                                                                                             *
 *                                                                                                                                   *
 *************************************************************************************************************************************/ 

Example:
PHP Code:

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
DataConvert.inc

Non-Registered Users:
Bug Report

DRIFT_HUNTER 26/09/2019 06:13 PM

Re: Chat @mentiones system
 
Wow, simple yet useful. Is it me or these will also match email? xD

Mad 26/09/2019 09:47 PM

Re: Chat @mentiones system
 
You're amazing brother, i've wanted to make this a long time ago but it was compliacted for me but you've done it! Good job, keep up!

AbyssMorgan 26/10/2019 07:03 AM

Re: Chat @mentiones system
 
Update v1.2.0:

- Fixed missing include DataConvert.inc

- Fixed RGB functions


All times are GMT. The time now is 09:45 PM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.