Deathmatch tag help :(
#1

i dont know what problem!

Код:
if(rocketdm[playerid] == 1)
    {
     new name[340], str[100];
     GetPlayerName(playerid, name, sizeof(name));
     format(str, sizeof(str), "[ROCKETDM]%s", name);
     SetPlayerName(playerid, str);
    }
When i join this rocketdm and i type something chat is say normal [ROCKETDM]Hunud: blaabbla but when i repeat same thing its like this [ROCKETDM][ROCKETDM][ROCKETDM][ROCKETDM]Hunud: blaabbla! Each time i type something this script add one more [ROCKETDM]!
Reply
#2

That's because your name is set to "[ROCKETDM]Hunud" and the next time, the tag is added again so it is
"[ROCKETDM][ROCKETDM]Hunud" which the marked in red is your previous name and the longer you do this, the more times the tag will be added.

I don't really understand why you want to set a tag to the name but do this once when player joins rocketdm.
Reply
#3

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
That's because your name is set to "[ROCKETDM]Hunud" and the next time, the tag is added again so it is
"[ROCKETDM][ROCKETDM]Hunud" which the marked in red is your previous name and the longer you do this, the more times the tag will be added.

I don't really understand why you want to set a tag to the name but do this once when player joins rocketdm.
I want this tag because it shows that player is in [ROCKETDM] so i want add tag on his name! if he leave dm tag will be removed! But i dont understand how to do that! Thank you for reply!
Reply
#4

When a player joins the DM, add the tag and that's it. No need to keep checking if the player is in DM and add the tag over and over again.

By the way keep in mind that if a player has a name 14+ characters long, it will fail to display the whole name when adding the tag.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)