Jump to content

Question

Posted

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);
		}

12 answers to this question

Recommended Posts

  • 0
Posted

Nu.. am vrut ca de exemplu numele meu fiind Adrian si scriu in chat sa nu apara Adrian says ci cum scriu eu acolo ex

SA:MP.RO Adrian says:

SA:MP.RO semnificand scrisul de acolo

  • 0
Posted

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;
}

  • 0
Posted

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
  • 0
Posted

error 021: symbol already defined: "strmatch"

invalid expression, assumed zero

expected token: ")", but found "return"

{
  if ((strcmp(String1, String2, true, strlen(String2)) == ) && (strlen(String2) == strlen(String1)))
   return true;

  • 0
Posted

Mda nu am rezolvat. Ei bine cand scriu apare 2x.. Am sters acel else ca asa aparea la toti. Acum apare doar la mine AdY.Capone..

Ar fi trebuit adaugat realchat sau ceva?

  • 0
Posted

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 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.