Player name help
#1

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??
Reply
#2

You could try strdel or strreplace (not a sa:mp function, is downloadable)
Reply
#3

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?
Reply
#4

pawn Код:
strdel(name, 0, 6);
This would work i think

0 = where it should start cutting
6 = where it should stop cutting
Reply
#5

It isn't working :/. Any other ideas?
Reply
#6

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
Reply
#7

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...
Reply
#8

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??
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)