/codename -
Movado - 04.01.2012
So, here's want I wanted to do.
Something called /codename for admins. Basically what it would do is change the name above your head, but not in the tab list. Right now I did /codename, but I changes the name in the tab list too. Then when I do /codename [anything] It changes my name back to normal.
It does sound weird, but I've seen it happen.
To explain further. For example, my name is Movado_Williams. I'd do /codename EATER OF SOULS. It would then make me talk with the name EATER OF SOULS above my head and in the chat box. But if people checked the tab list, it would still say Movado_Williams. It would only stop when I did /codename again.
Re: /codename -
Tanush123 - 04.01.2012
on top
pawn Код:
new talkascodename[MAX_PLAYERS],codename[20],ifcodename[MAX_PLAYERS],str[128];
on player text
pawn Код:
public OnPlayerText(playerid, text[])
{
if(ifcodename[playerid] == 1)
{
return 0;
format(str,sizeof(str),"%s: %s",talkascodename,text);
SendClientMessageToAll(-1,str);
}
return 1;
}
command
pawn Код:
CMD:codename(playerid,params[])
{
if(sscanf(params,"s",codename)) return SendClientMessage(playerid,grey,"USAGE: /codename [name]");
if(ifcodename[playerid] == 0)
{
ifcodename[playerid] = 1;
talkascodename[playerid] = codename;
}
else if(ifcodename[playerid] == 1)
{
ifcodename[playerid] = 0;
}
return 1;
}
i might failed but still, just try it.
Re: /codename -
Ballu Miaa - 04.01.2012
EDIT: What Tanush has posted you is a good way to do what you want. But keep in mind to use it at your realchat also!
Re: /codename -
Movado - 04.01.2012
Thanks, I'm a new scripter. Right now its saying
Код:
C:\Documents and Settings\lMlovado\Desktop\gamemodes\gamemodes\lvdm.pwn(940) : warning 203: symbol is never used: "codename"
Re: /codename -
Ballu Miaa - 04.01.2012
Quote:
Originally Posted by Movado
Thanks, I'm a new scripter. Right now its saying
Код:
C:\Documents and Settings\lMlovado\Desktop\gamemodes\gamemodes\lvdm.pwn(940) : warning 203: symbol is never used: "codename"
|
Like he said! add this on the top of your GM
new talkascodename[MAX_PLAYERS],codename[20],ifcodename[MAX_PLAYERS],str[128];
Re: /codename -
Tanush123 - 04.01.2012
Quote:
Originally Posted by Ballu Miaa
Tanush he is talking about SetPlayerName or a 3DTextLabel!
@Movado - There is only two ways to do that in my view! If you will use SetPlayerName it will change your name on the Chat also on the Tab List. To overcome this you can use ShowPlayerNameTagForPlayer() to hide the Nametag of the player for everyone and create as well as attach 3DTextLabel with the string you want your name to be above the player's head!
|
first time i read it i was on a rush then i saw he wanna do some togglename, look i edited it
Re: /codename -
Ballu Miaa - 04.01.2012
Quote:
Originally Posted by Tanush123
first time i read it i was on a rush then i saw he wanna do some togglename, look i edited it
|
Even i edited the suggestion lol
Its all good brother. Sometime's it happens while helping others
Re: /codename -
Movado - 04.01.2012
Thanks guys. I'm really failing right now, but still, thanks for the help.
Is there a way to make it for a filterscript? Im sucking at putting it in the GM even though I realize its so simple.
Re: /codename -
Ballu Miaa - 04.01.2012
Quote:
Originally Posted by Movado
Thanks guys. I'm really failing right now, but still, thanks for the help.
|
Our Pleasure and i say you should add reputation to Tanush for coding it for you!
Re: /codename -
Movado - 04.01.2012
Added it for both of you. But look at the post before yours. I just editted it.