Advanced scripting question
#1

I have come up with an idea that could be used in roleplay servers.


Part 1
I want to make it so nobody can see any body elses name tags. But, if one were to use a command to 'Introduce' themselves to a player, it would then show there name above there head for the other player.

As for part 1. I know exactly how I could do this, it would be easy. But...

Part 2
I'd also like to make it so if someone you don't know says something, it will come up like "Unknown says:", but if you do know them, then it will display like "Benji_Freemason says:".

Now this is tricky because I wouldn't know how to make it check if you know there name or not. Any ideas?
Reply
#2

Big odds it's impossible. You'd need a shitload of bools for each player about each player. So for example, there are 2500 accounts in your DB, you'd need to be able to have 2500 bool arrays for each player of 2499 (He knows himself). To save this you'd need a massive player file for storing all those bools.

Simply said: Impossible.
Reply
#3

1. You could use "ShowNameTags(0);" to disable name-tags completely and then use some 3DText to show the name...

2. You could use a variable for this one. Log in a players account if they did (i.e. /introduce) to another player and then they would know that person. Then use a variable under "OnPlayerText" to see if any nearby players have met the player "saying" things...
Reply
#4

I can see now that this is a ridiculous idea. Thanks for the info guys.
Reply
#5

Actually I believe it would be possible more or less with bools, hiding all names initially and then using bools to if they say specific words the server consent them and basically let them see the persons name.

So basically enabled upon saying "hello" "My name is" and blablabla, it CAN work but it'd probably be quite fucked up.
Reply
#6

Quote:
Originally Posted by Celson
Посмотреть сообщение
I can see now that this is a ridiculous idea. Thanks for the info guys.
Not a ridiculous or impossible idea. I had the same idea and I am currently implementing it. Basically, anytime someone logs in a check will need to be performed to see who knows who. Doing this using SQL is going to be pretty easy.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)