Jump to content
  • 0

text x2


shaun

Question

sall all...mai ales tie zh3r0 ca vad ca esti primul tot timpul :D

cand scriu in chat scrie si stringu din gm si ala din luxadmin adika scrie si CookieMonster:[iD:]:TEXTU MEU BLABLABLA

DAR SI

CookieMonster:sal

deci apare cam asa:

CookieMonster:[iD:0]:COLORAT""""TEXT

CookieMonster:sal

2x ce zic yo...

onplayertext de la luxadmin:

public OnPlayerText(playerid, text[])
{
//==============================================================================
// Vip Chat
//==============================================================================
	if(text[0] == '*' && AccInfo[playerid][pVip] >= 1)
	{
	    new string[128]; GetPlayerName(playerid,string,sizeof(string));
		format(string,sizeof(string),"|ChatVip| %s: %s",string,text[1]);
		MessageToPlayerVIP(0xDC686BAA,string);
		SaveIn("ChatVipLog",string);
	    return 1;
	}
//==============================================================================
// Administration Chat
//==============================================================================
	if(text[0] == '#' && AccInfo[playerid][Level] >= 1)
	{
	    new string[128]; GetPlayerName(playerid,string,sizeof(string));
		format(string,sizeof(string),"Admin Chat: %s: %s",string,text[1]);
		MessageToAdmins(green,string);
		#if ADM_CHAT_LOG == true
		SaveIn("AdmChatLog",string);
		#endif
	    return 1;
	}
//==============================================================================
// Chat Disabled
//==============================================================================
	if(ServerInfo[DisableChat] == 1)
	{
		SendClientMessage(playerid,red,"|- Chat has been Disabled! -|");
	 	return 1;
	}
//==============================================================================
// Player Muted
//==============================================================================
 	if(AccInfo[playerid][Muted] == 1)
	{
 		AccInfo[playerid][MuteWarnings]++;
 		new string[128];
		if(AccInfo[playerid][MuteWarnings] < ServerInfo[MaxMuteWarnings])
		{
		format(string, sizeof(string),"|- ATTENTION: You are Muted! Cannot talk (Warnings: %d/%d) -|",AccInfo[playerid][MuteWarnings],ServerInfo[MaxMuteWarnings]);
		SendClientMessage(playerid,red,string);
		}
		else
		{
		SendClientMessage(playerid,red,"|- You have been Automatically Kicked. | Reason: Exceeding Mute Warnings -|");
		format(string, sizeof(string),"|- Player %s (Id:%d) has been Automatically Kicked. | Reason: Exceeding Mute Warnings -|",PlayerName2(playerid),playerid);
		SendClientMessageToAll(grey,string);
		SaveIn("KickLog",string); Kick(playerid);
		} return 1;
	}
//==============================================================================
// Flood/Spam Protection
//==============================================================================
	if(ServerInfo[AntiSpam] == 1 && (AccInfo[playerid][Level] == 0 && !IsPlayerAdmin(playerid)))
	{
		if(AccInfo[playerid][SpamCount] == 0) AccInfo[playerid][SpamTime] = TimeStamp();

	    AccInfo[playerid][SpamCount]++;
		if(TimeStamp() - AccInfo[playerid][SpamTime] > SPAM_TIMELIMIT) { // Its OK your messages were far enough apart
			AccInfo[playerid][SpamCount] = 0;
			AccInfo[playerid][SpamTime] = TimeStamp();
		}
		else if(AccInfo[playerid][SpamCount] == SPAM_MAX_MSGS) {
			new string[64]; format(string,sizeof(string),"|- Player %s (Id:%d) has been Automatically Kicked. | Reason: Flood/Spam Protection", PlayerName2(playerid),playerid);
			SendClientMessageToAll(grey,string); print(string);
			SaveIn("KickLog",string);
			Kick(playerid);
		}
		else if(AccInfo[playerid][SpamCount] == SPAM_MAX_MSGS-1) {
			SendClientMessage(playerid,red,"ATTENTION: Anti Spam Warning! Next is a Kick!");
			return 1;
		}
	}
//==============================================================================
// Send Admin in front of name
//==============================================================================
	#if ADM_InMSG == true
	if (AccInfo[playerid][Hide] == 0)
	{
	if(AccInfo[playerid][Level] > 0)
	{
	new str3[256];
	format(str3, 256, "(Admin): %s", text);
	for(new gz=0;gz<200;gz++)
	if(IsPlayerConnected(gz))
	SendPlayerMessageToPlayer(gz, playerid, str3);
	else SendPlayerMessageToPlayer(gz, playerid, text);
	}
	return 1;
	}
	#endif
//==============================================================================
// Forbidden Words
//==============================================================================
	if(ServerInfo[AntiSwear] == 1 && AccInfo[playerid][Level] < ServerInfo[MaxAdminLevel])
	for(new s = 0; s < BadWordsCount; s++)
	{
	new pos;
	while((pos = strfind(text,BadWords[s],true)) != -1)
	for(new i = pos, j = pos + strlen(BadWords[s]); i < j; i++) text[i] = '*';
	}
//==============================================================================
// Anti Advertisements
//==============================================================================
	if(ServerInfo[AntiAds] == 1)
	{
		if(AdvertisementCheck(text) && AccInfo[playerid][Level] < 3)
		{
			AccInfo[playerid][MaxAdv]++;
			new string[128];
			format(string,sizeof(string),"|- Warning! Suspected ads in your message! (Warnings: %d/%d)",AccInfo[playerid][MaxAdv], MAX_ADV_WARNINGS);
			SendClientMessage(playerid, grey,string);

			if(AccInfo[playerid][MaxAdv] == MAX_ADV_WARNINGS)
			{
				format(string,sizeof(string),"|- You is Automatically Kicked. | Reason: Many ads in your Messages (%d/%d) -|",AccInfo[playerid][MaxAdv], MAX_ADV_WARNINGS);
 				SendClientMessage(playerid, lightred,string);

 				format(string,sizeof(string),"|- Player %s (Id:%d) has beenAutomatically  Kicked. | Reason: Many Advertisements! (%d) -|",PlayerName2(playerid),playerid, MAX_ADV_WARNINGS);
 				SaveIn("KickLog",string); Kick(playerid);
				SendClientMessageToAll(lightred, string);
				print(string);
			}
			return 1;
		}
	}
//==============================================================================
// Block CapsLock
//==============================================================================
	if(AccInfo[playerid][Caps] == 1)
	UpperToLower(text);
	if(ServerInfo[NoCaps] == 1)
	UpperToLower(text);

//==============================================================================
// Chat Lines (Console)
//==============================================================================
	for(new i = 1; i < MAX_CHAT_LINES-1; i++)
	Chat[i] = Chat[i+1];
	new ChatSTR[128];
	GetPlayerName(playerid,ChatSTR,sizeof(ChatSTR));
	format(ChatSTR,128,"[CHAT]%s: %s",ChatSTR, text[0]);
	Chat[MAX_CHAT_LINES-1] = ChatSTR;
	return 1;
}
//==============================================================================
//-------------------------------------------------
// Private Message (PM)
//-------------------------------------------------
//==============================================================================
public OnPlayerPrivmsg(playerid, recieverid, text[])
{
	if(ServerInfo[ReadPMs] == 1 && AccInfo[playerid][Level] != ServerInfo[MaxAdminLevel])
	{
//==============================================================================
// Send PM
//==============================================================================
    	new string[128];
		new pReciever[MAX_PLAYER_NAME];
		GetPlayerName(playerid, string, sizeof(string));
		GetPlayerName(recieverid, pReciever, sizeof(pReciever));
		format(string, sizeof(string), "|- PM: %s To %s: %s", string, pReciever, text);
  		for (new a = 0; a < MAX_PLAYERS; a++)
		if(IsPlayerConnected(a) && (AccInfo[a][Level] >= ServerInfo[MaxAdminLevel]) && a != playerid)
		SendClientMessage(a, grey, string);
		#if PM_CHAT_LOG == true
		SaveIn("AdmChatLog",string);
		#endif
	}
//==============================================================================
// Muted
//==============================================================================
 	if(AccInfo[playerid][Muted] == 1)
	{
		new string[128];
 		AccInfo[playerid][MuteWarnings]++;
		if(AccInfo[playerid][MuteWarnings] < ServerInfo[MaxMuteWarnings])
		{
		format(string, sizeof(string),"|- ATTENTION: You are Muted! Cannot talk (Warnings: %d/%d) -|",AccInfo[playerid][MuteWarnings],ServerInfo[MaxMuteWarnings]);
		SendClientMessage(playerid,red,string);
		}
		else
		{
		SendClientMessage(playerid,red,"|- You have been Automatically Kicked. | Reason: Exceeding Mute Warnings -|");
		GetPlayerName(playerid, string, sizeof(string));
		format(string, sizeof(string),"|- Player %s (Id:%d) has been Automatically Kicked. | Reason: Exceeding Mute Warnings -|", string, playerid);
		SendClientMessageToAll(lightred,string);
		SaveIn("KickLog",string);
		Kick(playerid);
		}
		return 1;
	}
	#if EnablePM_Cmd == true
	new string[128];
	format(string,256,"|- PM: Message to '%s(%d)': \"%s\" -|",PmReceiver,PMplayer1,text);
	SendClientMessage(playerid,0x00A765AA,string);
 	PlayerPlaySound(playerid,1057,0.0,0.0,0.0);

	GetPlayerName(playerid, string, sizeof(string));
	format(string, sizeof(string),"|- PM: Message from: %s: \"%s\" -|",string,text);
	SendClientMessage(recieverid,0x00A765AA,string);
	#endif
	return 1;
}
de la gm meu:
public OnPlayerText(playerid, text[])
{
	new stringOPT[128];
	format(stringOPT,128,"{E01BBC}[Id:%d] {E3C254} %s",playerid,ColouredText(text));
    SendPlayerMessageToAll( playerid,  stringOPT );
    SetPlayerChatBubble(playerid, text, COLOR_GREEN, 100.0, 10000);
  
    return 1;
}

HELP MEH!

u78ch.jpg

CHECK MY CHANNEL!

http://www.youtube.com/user/amysoica

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

Guest
This topic is now closed to further replies.
  • Similar Content

    • By salexm93
      Salutare 
      Poate nu inteleg eu bine , pe wiki scrie max 2048 globale si 256 per player .
      Sa luam cazul ipotetic al unui server cu 1000 de playeri online .
      new Text:xpbar[MAX_PLAYERS]; new Text:playername[MAX_PLAYERS]; Aici vor fi 2000 create ? Adica destul de aproape de limita
       
      new PlayerText:xpbar[MAX_PLAYERS]; new PlayerText:playername[MAX_PLAYERS]; Iar Aici vor fi doar 2 ?
      Totodata , PlayerTextDrawDestroy ,la onplayerdisconnect ?
    • By GabyRo.off
      cum pot rezolva eroarea asta in sublime text 
      [WinError 2] The system cannot find the file specified
      [cmd: ['pawncc.exe', '-i includes', 'D:\\Users\\Gaby\\Downloads\\gamemode GTA-SAMP\\gamemodes\\GM.pwn', '-;+']]
      [dir: D:\Users\Gaby\Downloads\gamemode GTA-SAMP\gamemodes]
      [path: C:/pawno]
      [Finished]
       
      [ma puteti gasi pe discord:GabyRoノ#4068]
    • By VAurel
      Salut, am si eu nevoie de ceva, eu am un bug la vipname de pe masini si deoarece oricum nu imi place chestia asta cu mutatul text-ului vip, manual pe vehicule, vreau sa il fac sa se puna automat pe vehicule, faza este alta, nu stiu de unde sa fac rost de coordonatele unde atasez obiectul pe masina respectiva...
      Daca cunoasteti voi o metoda sau un program pentru a face asta, v-as ruga sa imi spuneti..
    • By ealin75
      bună ziua!
      vă scriu în legătură cu o problemă.
      am descărcat de curând de pe forum un GM tip b-hood. în cele din urmă nu am găsit în gamemode nicăieri unele textdraw-uri.
      aveți idee unde le pot găsi pentru a le edita?
      atașez mai jos niște poze.
      vă mulțumesc mult!
       
      https://imgur.com/a/7E6xgZg
    • By sika
      La schimbare textului pe vehicul sau culori textului apare o poza cu cereale... da ati auzit bine cereale... as dori sa o elimin...
      Poza : https://imgur.com/a/kcBj0oR
       
      daca aveti idei va rog frumos... aceasta poza apare apare o minisecunda dar as dori sa o fac sa dispara.
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.