SA-MP Forums Archive
[Include] Chat #hashtag system - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+---- Forum: Includes (https://sampforum.blast.hk/forumdisplay.php?fid=83)
+---- Thread: [Include] Chat #hashtag system (/showthread.php?tid=669626)



Chat #hashtag system - AbyssMorgan - 26.09.2019

Include contain function for chat #hashtag system

PHP Code:
/*************************************************************************************************************************************
 *                                                                                                                                   *
 *                                                        )(   #hashtag   )(                                                         *
 *                                                                                                                                   *
 * 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.0.0                                                                                                               *
 *                                                                                                                                   *
 * Functions:                                                                                                                        *
 * GetHashTag(playerid,text[],hashtag_color=0xCC0000FF,back_color=0xFFFFFFFF,max_len=sizeof(text));                                  *
 * HashTag::name(playerid);                                                                                                          *
 *                                                                                                                                   *
 * Callbacks:                                                                                                                        *
 * OnHashTagPresented(hashtag[]);                                                                                                    *
 *                                                                                                                                   *
 *************************************************************************************************************************************/ 
Example:
PHP Code:
//I want #suicide now :D
HashTag::suicide(playerid){
    
SetPlayerHealth(playerid,0.0);
    return 
1;
}

HashTag::banned(playerid){
    
PlayAudioStreamForPlayer(playerid,"https://adm.ct8.pl/upload/banned.mp3");
    return 
1;
}

public 
OnPlayerText(playerid,text[]){
    
GetHashTag(playerid,text,0xCC0000FF,0x00AA00FF); //back_color the same as first chat color
    
SendClientMessageToAll(0x00AA00FF,text);
    return 
0;

Download:
hashtag.inc
RGB.inc

Non-Registered Users:
Bug Report