12.10.2011, 01:49
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
into one single format.
I know this is absurd, but just to show you what I meant I'll do it like this.
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!
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]
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];
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!