SA-MP Forums Archive
onplayertext - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: onplayertext (/showthread.php?tid=229792)



onplayertext - xir - 22.02.2011

I have this problem that the tag doesnt show when i type

code
pawn Код:
for(new i = 0; i < sizeof(Clans); i++)
    {
        if(KeyInfo[playerid][pRank] > 0 && KeyInfo[playerid][pClan] != 255)
        {
            new clan = KeyInfo[playerid][pClan];
            new string[128], name[MAX_PLAYER_NAME];
            GetPlayerName(playerid, name, sizeof(name));
            if(Clans[clan][Front] == 1)
            {
            format(string,sizeof(string),"[%s]%s: %s",Clans[clan][cName],name,text);
            ProxDetector(20.0,playerid,string,GetPlayerColor(playerid),GetPlayerColor(playerid),GetPlayerColor(playerid),GetPlayerColor(playerid),GetPlayerColor(playerid));
            return 0;
            }
            else if(Clans[clan][Back] == 1)
            {
            format(string,sizeof(string),"%s[%s]: %s",name,Clans[clan][cName],text);
            ProxDetector(20.0,playerid,string,GetPlayerColor(playerid),GetPlayerColor(playerid),GetPlayerColor(playerid),GetPlayerColor(playerid),GetPlayerColor(playerid));
            return 0;
            }
        }
    }

here is my enum

pawn Код:
enum ClanSystem
{
    cName[MAX_PLAYER_NAME],
    clOwner[MAX_PLAYER_NAME],
    Front,
    Back,
    cID,
};
new Clans[100][ClanSystem];
why isnt it working


Re: onplayertext - Stigg - 22.02.2011

I think this is what you mean. Might not be tho.

SetPlayerChatBubble(playerid,text,0xF6F6F6AA,100.0 ,5000);

Peace...


Re: onplayertext - xir - 22.02.2011

i dont need chat bubble...

example when im ingame it will be like this

xir[tag]: and here is the text i write..


Re: onplayertext - Stigg - 22.02.2011

Try this:

https://sampwiki.blast.hk/wiki/Attach3DTextLabelToPlayer

Peace...


Re: onplayertext - xir - 22.02.2011

not that either.. man the normal chat.. it just shows the tag next to the name also..


Re: onplayertext - HyperZ - 22.02.2011

Try this:
pawn Код:
public OnPlayerText(playerid, text[])
{
    for(new i = 0; i < sizeof(Clans); i++)
    {
        if(KeyInfo[playerid][pRank] > 0 && KeyInfo[playerid][pClan] != 255)
        {
            new clan = KeyInfo[playerid][pClan];
            new string[128], name[MAX_PLAYER_NAME];
            GetPlayerName(playerid, name, sizeof(name));
            if(Clans[clan][Front] == 1)
            {
                format(string,sizeof(string),"[%s]%s: %s",Clans[clan][cName],name,text);
                SendPlayerMessageToAll(playerid, string);
                ProxDetector(20.0,playerid,string,GetPlayerColor(playerid),GetPlayerColor(playerid),GetPlayerColor(playerid),GetPlayerColor(playerid),GetPlayerColor(playerid));
            }
            else if(Clans[clan][Back] == 1)
            {
                format(string,sizeof(string),"%s[%s]: %s",name,Clans[clan][cName],text);
                SendPlayerMessageToAll(playerid, string);
                ProxDetector(20.0,playerid,string,GetPlayerColor(playerid),GetPlayerColor(playerid),GetPlayerColor(playerid),GetPlayerColor(playerid),GetPlayerColor(playerid));
            }
        }
    }
    return 0;
}



Re: onplayertext - Stigg - 22.02.2011

Quote:
Originally Posted by xir
Посмотреть сообщение
not that either.. man the normal chat.. it just shows the tag next to the name also..
Sozz man, i thought you meant over his head. Hence my replies.
My bad.

Peace...


Re: onplayertext - xir - 22.02.2011

didnt work


Re: onplayertext - xir - 22.02.2011

bump


Re: onplayertext - maramizo - 22.02.2011

You sure that you even SetPlayerColor? and what if he's not in a clan?