Help with Tag Giving permission
#1

hey guys ,
For example
i want The plpayer gets in front of his name [TAGHERE] he gets special Cmds ig , i mean .. when he puts it he Get a rank , but he can't Get it unless the admins change his name ,
Thank you ..
lets try it with the vip : if(VipLevel(playerid) >= 2)
Reply
#2

Lack of inforamtion that i need .. so I cant help you ...

for example give us the commands you want them to be on player who has level vip 2

wich name you want it , do you want the name Permanently or just temporarily ..
Reply
#3

i meant ,
If player name contained [TAG]
Example : [TAG]Person
his stats auto give him Vip lvl 2
Example
Thanks
Reply
#4

The chaos in your posts makes it really hard to understand, whatever you would like to have help with.
So, you'd like something like:
Код:
Does player name contains special tag? If yes -> Do something; If not - Do nothing
?

Well..
Quote:

i meant ,
If player name contained [TAG]
Example : [TAG]Person
his stats auto give him Vip lvl 2
Example
Thanks

Well, the best way for it would be something like this:
Код:
public OnPlayerConnect(playerid)
{
	new pName[MAX_PLAYER_NAME+1];
	GetPlayerName(playerid, pName, MAX_PLAYER_NAME+1);
	if(strfind(pName), "your_tag_here") == 0)
	{
	    // This will be executed, when player name contains "your_tag_here"
	    //Player[playerid][VipLevel] = 2, Ban(playerid), SendClientMessage(playerid, -1, "Woow, you have \"your_tag_here\" in your nickname!! How amazing!");
 	}
But now, anyone is able to join in with your_tag_here included in nickname, so that automatically everyone would gain.. Extra something, just for having this 'something' in theirs nickname? You should think over what you really want to get.

Greetz.
Reply
#5

Thanks for that . but you know How to fix that?
i mean Not everyone Can enter with it?
Reply
#6

Quote:
Originally Posted by SWAT4
Посмотреть сообщение
Thanks for that . but you know How to fix that?
i mean Not everyone Can enter with it?
Your welcome.
Well, the easiest way to go for it would be to create either database (MySQL or SQLite) or file (*.ini) where you'll keep all the nick names that can connect with this tag. And that's, how the alghoritm would work:

Код:
Player connects -> Retreive player name -> Check in database/file, if there is player with this nickname -> If yes: Everything's okay; If not - change his nick name, kick him, ban him, whatever.
Using either database or file with those nicknames you have capability to give them (players with nickname inscribed in db or file) actually anything independently of whether they wear any tags or not.

Greetings
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)