Im looking for a global chat filterscript /g (only global chat)

Safa

Well-Known Member
Joined
Feb 24, 2015
Messages
249
Likes
58
Points
78
Website
ascensioncheats.com
#3
Code:
ocmd:g(playerid, params[])
{
        new str[256], text[200];
        if(sscanf(params, "s[200]", text)) return SendClientMessage(playerid, - 1, "use b1-g /g [text]");
        format(str, sizeof(str), "[Gay-Chat] %s: %s ))", PlayerName(playerid), text);
        SendClientMessageToAll(-1, str);
        return 1;
}

To use PlayerName as a function, do a stock on your own and stop asking for shitty simple chat functions that you actually learn when you start PAWN.
Code is untested, written down in 1min
 
Last edited:

Safa

Well-Known Member
Joined
Feb 24, 2015
Messages
249
Likes
58
Points
78
Website
ascensioncheats.com
#7
Create a boolean (as example):

Code:
new bool:gchat;
Then create a command for you (ex. for your admin-system) where you assign true or false (1 / 0) to the boolean.

Code:
this isnt code, just logic example:

cmd : togchat

if gchat false (0)
then gchat = true (1)
else if gchat true (1)
then gchat = false (0)
After that you go to your command to write to the g-chat and do this kind of logic:

Code:
cmd: gchat (text)

if gchat false (0) then SendClientMessage(playerid, -1, "G-Chat is not turned on"); return
// then just execute the cmd
I hope I didn't forget something and you can learn the logic / how it works.
 
Top