Nametag System
#1

I'm running a roleplay server, and have a few ideas, lately I've been trying to make it more realistic. Today I tried to make it so that when you do /shake, your name goes into SQL, and you will see that players name above his head. Before you do that, you will only see "Stranger". My only problem was that I didn't know how to make this

pawn Код:
NameTagInfo[playerd][Friend1],
    NameTagInfo[playerd][Friend2],
    NameTagInfo[playerd][Friend3],
    NameTagInfo[playerd][Friend4],
    NameTagInfo[playerd][Friend5],
    NameTagInfo[playerd][Friend6],
    NameTagInfo[playerd][Friend7],
    NameTagInfo[playerd][Friend8],
    NameTagInfo[playerd][Friend9],
    NameTagInfo[playerd][Friend10],
        NameTagInfo[playerd][Friend11],
    NameTagInfo[playerd][Friend12],
    NameTagInfo[playerd][Friend13],
    NameTagInfo[playerd][Friend14],
    NameTagInfo[playerd][Friend15],
    NameTagInfo[playerd][Friend16],
    NameTagInfo[playerd][Friend17],
    NameTagInfo[playerd][Friend18],
    NameTagInfo[playerd][Friend19],
    NameTagInfo[playerd][Friend20],
        NameTagInfo[playerd][Friend21],
    NameTagInfo[playerd][Friend22],
    NameTagInfo[playerd][Friend23],
    NameTagInfo[playerd][Friend24],
    NameTagInfo[playerd][Friend25],
    NameTagInfo[playerd][Friend26],
    NameTagInfo[playerd][Friend27],
    NameTagInfo[playerd][Friend28],
    NameTagInfo[playerd][Friend29],
    NameTagInfo[playerd][Friend30]
into one single format.
I know this is absurd, but just to show you what I meant I'll do it like this.

pawn Код:
new friend;
        friend =
        NameTagInfo[playerd][Friend1],
    NameTagInfo[playerd][Friend2],
    NameTagInfo[playerd][Friend3],
    NameTagInfo[playerd][Friend4],
    NameTagInfo[playerd][Friend5],
    NameTagInfo[playerd][Friend6],
    NameTagInfo[playerd][Friend7],
    NameTagInfo[playerd][Friend8],
    NameTagInfo[playerd][Friend9],
    NameTagInfo[playerd][Friend10],
        NameTagInfo[playerd][Friend11],
    NameTagInfo[playerd][Friend12],
    NameTagInfo[playerd][Friend13],
    NameTagInfo[playerd][Friend14],
    NameTagInfo[playerd][Friend15],
    NameTagInfo[playerd][Friend16],
    NameTagInfo[playerd][Friend17],
    NameTagInfo[playerd][Friend18],
    NameTagInfo[playerd][Friend19],
    NameTagInfo[playerd][Friend20],
        NameTagInfo[playerd][Friend21],
    NameTagInfo[playerd][Friend22],
    NameTagInfo[playerd][Friend23],
    NameTagInfo[playerd][Friend24],
    NameTagInfo[playerd][Friend25],
    NameTagInfo[playerd][Friend26],
    NameTagInfo[playerd][Friend27],
    NameTagInfo[playerd][Friend28],
    NameTagInfo[playerd][Friend29],
    NameTagInfo[playerd][Friend30];
Hope you understood what I meant.

But after that I got an even better idea instead of the /shake thing. I want to do it so that it adds when you write your name. Something like if you write "My name is Knappen", it automatically inserts into the SQL that the player I wrote it to knows my name and can see my nametag. And I can see his name tag when he writes his name. I know the basics of scripting, and would probably be able to make it somehow, but how do I make the server react when a specific string appears, for example if I write "My name is Knappen", and it contains my player name. How do I make it react?

Thanks for all answers!
Reply
#2

I would be grateful if someone could help me. Don't mean to cause any trouble bumping this thread.
Reply
#3

make a loop ?
Reply
#4

How could I make a loop in this case?
Reply
#5

bump
Reply
#6

bump
Reply
#7

You mean this:
pawn Код:
new NameTagInfo[playerid][Friend[31]];
?
Reply
#8

Quote:
Originally Posted by Knappen
Посмотреть сообщение
How could I make a loop in this case?
Click me!
Reply
#9

I read through, and tried a bit, but can't really understand it. Could you give me a boost? I would really appreciate it!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)