Jump to content
  • 0

Chat Tag


AdY.Capone

Question

Salut am vrut sa creez tag in chat pentru administratorii sau pentru un nume.. am gasit si aici un model dar cum il fac sa fie doar pe numele meu.

ex

In acest script este pentru pMember 0 si leader 0. Cum pot face sa pun pe nume..?

  else if(PlayerInfo[playerid][pMember] == 0 || PlayerInfo[playerid][pLeader] == 0)
		{
		    text[0] = toupper(text[0]);
			format(string, sizeof(string), "{FAFAF1}Civil %s{00C0FF} [ID %d] {9AE1FC}spune{FCBE03}: {FFFFFF}%s", sendername,playerid, text);
			ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
			if(PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pLevel] >= 1) SetPlayerChatBubble(playerid, string, 0xa9c4e4FF, 20.0, 10000);
		}
Link to comment
Share on other sites

12 answers to this question

Recommended Posts

  • 0

Da acolo..

public OnPlayerText(playerid, text[])
{
    if(GetTickCount() - SpamCheck2[playerid] < 1000 && SpamCheck2[playerid] != 0 && PlayerInfo[playerid][pAdmin] < 5)
    {
        return 0;
    }
    SpamCheck2[playerid] = GetTickCount();

    if(PlayerInfo[playerid][pMuted] == 1)
    {
        SendClientMessage(playerid, COLOR_ERROR, "You cannot speak, you have been silenced.");
        return 0;
    }
    if(SpectatorID[playerid] != INVALID_PLAYER_ID)
    {
        SendClientMessage(playerid, COLOR_ERROR, "You cannot speak while spectating.");
        return 0;
    }
    if(FindAdvertise(text))
    {
        format(gString, sizeof(gString), "AdmWarning:{FFFFFF} %s typed: %s", GetName(playerid), text);
        ABroadCast(COLOR_LIGHTRED, gString, 1);
        return 0;
    }
    

    if(OnCall[playerid] == 1)
    {
          foreach(new i : Player)
        {
            if(Mobile == playerid)
            {
                format(gString, sizeof(gString), "%s Says (cellphone): %s", GetName(playerid), text);
                ProxDetector(20.0, playerid, gString, COLOR_FADE1, COLOR_FADE2, COLOR_FADE3, COLOR_FADE4, COLOR_FADE5);
                format(gString, sizeof(gString), "%s Says (cellphone): %s", GetName(playerid), text);
                SendClientMessage(i,  COLOR_YELLOW, gString);
                PhoneLog(playerid, i, text, 2);
            }
        }
    }
    else if(InLive[playerid] == 1)
    {
        if(PlayerInfo[playerid][pMember] + PlayerInfo[playerid][pLeader] == 4)
        {
            format(gString, sizeof(gString), "Live Reporter %s: %s", GetName(playerid), text);
            SendClientMessageToAll(COLOR_LIGHTGREEN, gString);
        }
        else
        {
            format(gString, sizeof(gString), "Live Player %s: %s", GetName(playerid), text);
            SendClientMessageToAll(COLOR_LIGHTGREEN, gString);
        }
    }
    else
    {
        if(Undercover[playerid] == 1)
        {
            format(gString, sizeof(gString), "Unknown says: %s", text);
            ProxDetector(20.0, playerid, gString, COLOR_FADE1, COLOR_FADE2, COLOR_FADE3, COLOR_FADE4, COLOR_FADE5);
        }
        else
        {
            format(gString, sizeof(gString), "%s says: %s", GetName(playerid), text);
            ProxDetector(20.0, playerid, gString, COLOR_FADE1, COLOR_FADE2, COLOR_FADE3, COLOR_FADE4, COLOR_FADE5);
        }
    }
    return 0;
}

Link to comment
Share on other sites

  • 0

foloseste te de acest stock,  

stock strmatch(const String1[], const String2[])
{
  if ((strcmp(String1, String2, true, strlen(String2)) == ) && (strlen(String2) == strlen(String1)))
   return true;
  else
   return false;
  
}

dar nu inteleg ce vrei sa faci, asta vreau sa imi explici,

ceva de genul asta?

if(strmatch(GetName(playerid),"AdY.Capone")) // adica daca te cheama AdY.Capone sa iti scrie asa, 
{

 	format(gString, sizeof(gString), "FONDATORUL %s says: %s", GetName(playerid), text);
    ProxDetector(20.0, playerid, gString, COLOR_FADE1, COLOR_FADE2, COLOR_FADE3, COLOR_FADE4, COLOR_FADE5);

}
else// daca te chema altcumva decat ady.capone
{

	format(gString, sizeof(gString), "%s says: %s", GetName(playerid), text);
    ProxDetector(20.0, playerid, gString, COLOR_FADE1, COLOR_FADE2, COLOR_FADE3, COLOR_FADE4, COLOR_FADE5);
}

 

 

    __  ____      __           
   /  |/  (_)____/ /____  _____
  / /|_/ / / ___/ __/ _ \/ ___/
 / /  / / (__  ) /_/  __/ /    
/_/  /_/_/____/\__/\___/_/     
SERVICII SCRIPTING DE CALITATE
Pagina     Scripting     pawn
Link to comment
Share on other sites

  • 0

Pai apare de doua ori pentru ca aveai deja un mesaj si eu ti am mai facut unul, tu trebuia sa stergi mesajul normal si sa il inlocuiesti cu codul meu nu sa adaugi 

 

    __  ____      __           
   /  |/  (_)____/ /____  _____
  / /|_/ / / ___/ __/ _ \/ ___/
 / /  / / (__  ) /_/  __/ /    
/_/  /_/_/____/\__/\___/_/     
SERVICII SCRIPTING DE CALITATE
Pagina     Scripting     pawn
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.