Player name help - 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: Player name help (
/showthread.php?tid=262735)
Player name help -
Marco_Valentine - 19.06.2011
Hey guys. Don't know if it's possible but,
My script i have made has a clan system. simple really /invite. then the other players name has a tag added to it '[CLAN1]'
Now i want on /uninvite
To remove '[CLAN1] from the name.
So far i got this.
pawn Код:
if(strfind(plname, "[CLAN1]", true) != -1)
{
SetPlayerName(plname, "");
}
But i have no idea what to put in there. Any one got any ideas
??
Re: Player name help -
alpha500delta - 19.06.2011
You could try
strdel or strreplace (not a sa:mp function, is downloadable)
Re: Player name help -
Marco_Valentine - 19.06.2011
could you give me an example. Such as, pretend my name is
[GEW]_Valentine
How do i make it so my name ends up as just Valentine?
Re: Player name help -
Wesley221 - 19.06.2011
This would work i think
0 = where it should start cutting
6 = where it should stop cutting
Re: Player name help -
Marco_Valentine - 19.06.2011
It isn't working :/. Any other ideas?
Re: Player name help -
Marco_Valentine - 19.06.2011
Guys, thank you so much I worked it out. If you're interested in knowing aswell just ask. Wasn't to difficult you guys figured out the hard part :P
Re: Player name help -
Babul - 19.06.2011
dodge that stress with removing tags by manipulating playerames, tell them not to use any tags, maybe you should decide to script an added tag to your gang system. then it will be easy to change all players tags ingame (by changing the clan-tag color, the tag itself etc), so you avoid a lot of stress. despite that your player saving routine wont drive nuts when your player-name-change-script fails...
Re: Player name help -
Marco_Valentine - 19.06.2011
Quote:
Originally Posted by Babul
dodge that stress with removing tags by manipulating playerames, tell them not to use any tags, maybe you should decide to script an added tag to your gang system. then it will be easy to change all players tags ingame (by changing the clan-tag color, the tag itself etc), so you avoid a lot of stress. despite that your player saving routine wont drive nuts when your player-name-change-script fails...
|
That's exactly what i've done. I plan to have clans register on the forum and i will make them official on my team death match server with there own team.
I have made 5 clan teams.
I have it so when you join a clan, you auto get a clan tag added to your name.
Example. Name: Marco.
/invite Marco
name: [GeW]_Marco
.
Then i wanted it so
/removeleader
(Remove tag)
/uninvite
(remove tag)
I now also have it so the tag is auto added to a players name once they log in and log out. So they do not need to add the tag into the SAMP clients.
_
I did not know you could make parts of players names color? How exactly do i do this
??