SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 07/11/2013, 07:19 PM   #11
Elorreli
Gangsta
 
Elorreli's Avatar
 
Join Date: Feb 2009
Location: Sweden
Posts: 709
Reputation: 162
Default Re: How to remove OOC Chat.

Quote:
Originally Posted by DanishHaq View Post
He wants to remove the /o command, and that's what I said.



And then I said to show us the OnPlayerText.



If you also look carefully, I did say "like I told you"



And my previous post represents that:



Here I told him what to do to find the command, and then after use that callback. I wasn't going to explain the whole thing again to him. So, that's why I told him that in my previous quote.
Still doesn't explain why you mix in OnPlayerText ;9

On topic, I guess you're using some old soggy edit so it's not very likely it uses any command processor, probably just strcmp so search for /o and remove it.
__________________
New Dawn - server.dawn-tdm.com:7777

Elorreli is offline   Reply With Quote
Old 07/11/2013, 07:22 PM   #12
DanishHaq
High-roller
 
Join Date: Sep 2011
Location: Manchester, England, United Kingdom
Posts: 1,351
Reputation: 134
Default Re: How to remove OOC Chat.

Quote:
Originally Posted by Elorreli View Post
Still doesn't explain why you mix in OnPlayerText ;9

On topic, I guess you're using some old soggy edit so it's not very likely it uses any command processor, probably just strcmp so search for /o and remove it.
It does, look at the thread poster's post:

Quote:
Originally Posted by Bost View Post
My chat is now with /o
I want it only with T > Text > enter
He wants to remove /o, I told him how to do that.
He wants to make it so it's just T > Text > Enter, I also told him how we can help him with that because currently it could be like a RP chat, i.e. sending the message to players in range of the sender.
__________________
SA-MP Scripting knowledge: 80%
Pawn scripting knowledge: 3%

Know the difference...
DanishHaq is offline   Reply With Quote
Old 08/11/2013, 04:28 AM   #13
Bost
Little Clucker
 
Join Date: Oct 2011
Posts: 47
Reputation: 0
Default Re: How to remove OOC Chat.

Code:
public OnPlayerText(playerid, text[])
{
	new giver[MAX_PLAYER_NAME];
	new sendername[MAX_PLAYER_NAME];
	new giveplayer[MAX_PLAYER_NAME];
	new tmp[128];
	new string[156];
	new giveplayerid;
	new y,m,d;
	new h,mi,s;
	getdate(y,m,d);
	gettime(h,mi,s);
	if(PlayerInfo[playerid][pMuted] == 1)
	{
		SendClientMessage(playerid, TEAM_CYAN_COLOR, "You cannot speak, you have been silenced");
		return 0;
	}
	if(text[0] == '#' && PlayerInfo[playerid][pAdmin] >= 1)
	{
		GetPlayerName(playerid,sendername,sizeof(sendername));

		new arank[24];
		if(PlayerInfo[playerid][pAdmin] == 1) { arank = "Moderator"; } // By CuervO_NegrO
		else if(PlayerInfo[playerid][pAdmin] == 2) { arank = "Global Moderator"; } // By CuervO_NegrO
		else if(PlayerInfo[playerid][pAdmin] == 3) { arank = "Administrator"; } // By CuervO_NegrO
		else if(PlayerInfo[playerid][pAdmin] == 4) { arank = "Senior Admin"; } // By CuervO_NegrO
		else if(PlayerInfo[playerid][pAdmin] == 5) { arank = "Main Admin"; } // By CuervO_NegrO
		else if(PlayerInfo[playerid][pAdmin] == 6) { arank = "Developer"; } // By CuervO_NegrO
		else if(PlayerInfo[playerid][pAdmin] == 1337) { arank = "Scripter"; } // By CuervO_NegrO
		else if(PlayerInfo[playerid][pAdmin] == 1338) { arank = "Owner"; } // By CuervO_NegrO
		else { arank = "Unknown"; }

		format(string, sizeof(string), "[%s] %s (%d): %s", arank, sendername, playerid, text[1]);
		SendAdminMessage(COLOR_LIGHTRED, string);
		
		printf("%s %s: %s",arank, sendername, text[1]);

		format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s %s: %s",arank,d,m,y,h,mi,s,sendername, text[1]);
		AdminChatLog(string);
	    return 0;
	}
	if(text[0] == '@' && (PlayerInfo[playerid][pTester] >= 1 || PlayerInfo[playerid][pAdmin] >= 1))
	{
		GetPlayerName(playerid,sendername,sizeof(sendername));

		new arank[24];
		if(PlayerInfo[playerid][pTester] == 1) { arank = "Trial Tester"; } // By CuervO_NegrO
		else if(PlayerInfo[playerid][pTester] == 2) { arank = "Tester"; } // By CuervO_NegrO
		else if(PlayerInfo[playerid][pTester] == 3) { arank = "Lead Tester"; } // By CuervO_NegrO
		else if(PlayerInfo[playerid][pAdmin] == 1) { arank = "Moderator"; } // By CuervO_NegrO
		else if(PlayerInfo[playerid][pAdmin] == 2) { arank = "Global Moderator"; } // By CuervO_NegrO
		else if(PlayerInfo[playerid][pAdmin] == 3) { arank = "Administrator"; } // By CuervO_NegrO
		else if(PlayerInfo[playerid][pAdmin] == 4) { arank = "Senior Admin"; } // By CuervO_NegrO
		else if(PlayerInfo[playerid][pAdmin] == 5) { arank = "Main Admin"; } // By CuervO_NegrO
		else if(PlayerInfo[playerid][pAdmin] == 6) { arank = "Developer"; } // By CuervO_NegrO
		else if(PlayerInfo[playerid][pAdmin] == 1337) { arank = "Scripter"; } // By CuervO_NegrO
		else if(PlayerInfo[playerid][pAdmin] == 1338) { arank = "Owner"; } // By CuervO_NegrO
		else { arank = "Unknown"; }

		format(string, sizeof(string), "[%s] %s (%d): %s", arank, sendername, playerid, text[1]);
		SendTesterAdminMessage(COLOR_YELLOW, string);

		printf("%s %s: %s",arank, sendername, text[1]);

		format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s %s: %s",arank,d,m,y,h,mi,s,sendername, text[1]);
		AdminChatLog(string);
	    return 0;
	}
	
	if(PlayerInfo[playerid][pAdmin] == 0) Text[playerid] ++;
	if(Text[playerid] >= 1)
	{
	    KillTimer(TextTimer[playerid]);
		TextTimer[playerid] = SetTimerEx("ResetText",1500,false,"i",playerid);
	}
	if(Text[playerid] == 5) SendClientMessage(playerid, COLOR_LIGHTBLUE,"* Slow it down or you will be kicked!");
	if(Text[playerid] == 10)
	{
	    GetPlayerName(playerid, sendername, sizeof(sendername));
        format(string, sizeof(string), "%s (%d), Has been kicked by The Anticheat Peter Griffin for Flooding the chat.", sendername, playerid);
		SendClientMessageToAll(COLOR_NICERED, string);
		SendClientMessage(playerid,COLOR_LIGHTBLUE, "You have been Kicked by The Anticheat For Flooding the chat.");
		format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] Anticheat Has Kicked %s for: Flooding the chat.",d,m,y,h,mi,s,sendername);
		KickLog(string);
		format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] Kicked by the Anticheat - Flooding the chat.",d,m,y,h,mi,s,sendername);
		AddPunishment(playerid, string);
		Kick(playerid);

		KillTimer(TextTimer[playerid]);
	}
__________________
Boooooooooooooooooooooooooo
Bost is offline   Reply With Quote
Old 08/11/2013, 12:02 PM   #14
Bost
Little Clucker
 
Join Date: Oct 2011
Posts: 47
Reputation: 0
Default Re: How to remove OOC Chat.

So..?
__________________
Boooooooooooooooooooooooooo
Bost is offline   Reply With Quote
Old 08/11/2013, 12:41 PM   #15
BigETI
Banned
 
Join Date: Mar 2010
Location: Germany
Posts: 1,046
Reputation: 359
Default AW: How to remove OOC Chat.

OnPlayerText() has nothing to do with player commands at all. Just search for OnPlayerCommandText() and find something starting with "/o" or "/O". If you can't find anything inside OnPlayerCommandText(), just tell us what kind of command processor you use.
BigETI is offline   Reply With Quote
Old 08/11/2013, 01:20 PM   #16
Bost
Little Clucker
 
Join Date: Oct 2011
Posts: 47
Reputation: 0
Default Re: How to remove OOC Chat.

Code:
//---------------------------<[ OnPlayerCommandText ]>--------------------------------------------------------

public OnPlayerCommandText(playerid, cmdtext[])
{
    dcmd(xgoto, 5, cmdtext);
    dcmd(gpsfind, 7, cmdtext);
    dcmd(attach,6,cmdtext);
	dcmd(unattach,8,cmdtext);
	dcmd(acheckcode,10,cmdtext);
	dcmd(alias,5,cmdtext);
	dcmd(ips,3,cmdtext);
	dcmd(getips,6,cmdtext);
	dcmd(getaliases,10,cmdtext);
	dcmd(unban,5,cmdtext);
	dcmd(oban,4,cmdtext);
	//dcmd(saveeverything,14,cmdtext);
	new string[512 char];
	new playermoney;
	new sendername[MAX_PLAYER_NAME];
	new giveplayer[MAX_PLAYER_NAME];
	new playername[MAX_PLAYER_NAME];
	new cmd[128];
	new tmp[128];
	new dancestyle;
	new giveplayerid, moneys, idx;
	new idcar = GetPlayerVehicleID(playerid);
	new pveh = GetVehicleModel(GetPlayerVehicleID(playerid));
	cmd = strtok(cmdtext, idx);
	GetPlayerName(playerid, sendername, sizeof(sendername));
	new y5, m5, d5;
	new h5,mi5,s5;
	getdate(y5,m5,d5);
	gettime(h5,mi5,s5);
	format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s [CMD] -> %s",d5,m5,y5,h5,mi5,s5,sendername,cmdtext);
	AllCommandLog(string);
__________________
Boooooooooooooooooooooooooo
Bost is offline   Reply With Quote
Old 08/11/2013, 03:08 PM   #17
Bost
Little Clucker
 
Join Date: Oct 2011
Posts: 47
Reputation: 0
Default Re: How to remove OOC Chat.

Anyone?
__________________
Boooooooooooooooooooooooooo
Bost is offline   Reply With Quote
Old 08/11/2013, 03:50 PM   #18
BigETI
Banned
 
Join Date: Mar 2010
Location: Germany
Posts: 1,046
Reputation: 359
Default AW: How to remove OOC Chat.

Check for it inside other scripts aswell.
BigETI is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help: I tried to remove "_" from name. but all chat has been removed. bathushan Scripting Help 10 22/09/2013 04:44 PM
Remove PlayAudioStreamForPlayer chat message? ғαιιοцт Scripting Help 3 26/03/2013 07:26 PM
How to remove /g global chat from my GM Hittop65 Scripting Help 3 04/02/2013 03:38 AM
How to remove the real chat PaulDinam Scripting Help 4 18/10/2012 05:52 PM
Remove ooc chat [help] Joruz_Tellino Help Archive 5 13/07/2009 09:50 AM


All times are GMT. The time now is 03:48 PM.


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