15.01.2015, 13:10
I have added a chat filterscript, but my chat doesn't change. It just stays the same as it was before.
This is the filterscript.
In my gamemode I have this:
This is the filterscript.
Код:
#include <a_samp> #include <sscanf2> #include <zcmd> #include <foreach> #define FILTERSCRIPT stock strreplace(string[], find, replace) { for(new i=0; string[i]; i++) { if(string[i] == find) { string[i] = replace; } } } stock GetName(playerid) { new name[24]; GetPlayerName(playerid, name, sizeof(name)); strreplace(name, '_', ' '); return name; } stock ProxDetector(Float:radi, playerid, string[],color) { new Float:x,Float:y,Float:z; GetPlayerPos(playerid,x,y,z); foreach(Player,i) { if(IsPlayerInRangeOfPoint(i,radi,x,y,z)) { SendClientMessage(i,color,string); } } } public OnPlayerText(playerid, text[]) { new message[128]; format(message, sizeof(message), "%s says: %s", GetName(playerid), text); ProxDetector(30.0, playerid, message, -1); return 0; }
Код:
public OnPlayerText() { return 0; }