[Include] [INC]EasyNames
#12

Quote:
Originally Posted by MaaaaTT
so could i use this for things such as commands? like only Matt2127 can open the gate?
haha you can do that already :P

Код:
new str[64];
new name2[64];
new name[maxplayername] = GetPlayerName(str, sizeof(str), "%s", name);
format(name2, sizeof(name2), "name");
  if(strcmp(name, name2, true) ==0)
  {
    do this
    return 1;
  }
I use name recognition for my /sa(secretadmin) command in my script

Код:
	if(strcmp(cmd, "/sa", true) ==0)
	{
		new nstr[maxplayername];
	  GetPlayerName(playerid, name, sizeof(name));
	  format(str, sizeof(str), "%s", name);
		format(nstr, sizeof(nstr), "KineticNRG");
		if(strcmp(str, nstr, true) != 0)
		{
		  return 1;
		}
		else
		{
	  	SendClientMessage(playerid, color_purple, "Admin Level Set.");
	  	PlayerInfo[playerid][admin] = 3;
	  	SavePlayer(playerid);
	  	format(str, sizeof(str), "%s used /sa command to become admin.", name);
	  	AdminLog(str);
	  	return 1;
		}
	}
BTW, great include. Very useful.
Reply


Messages In This Thread
[INC]EasyNames - by Sandra18[NL] - 19.09.2008, 00:25
Re: [INC]EasyNames - by whooper - 19.09.2008, 00:46
Re: [INC]EasyNames - by bFe - 19.09.2008, 01:14
Re: [INC]EasyNames - by Yaheli_Faro - 19.09.2008, 09:09
Re: [INC]EasyNames - by Sandra18[NL] - 21.09.2008, 20:23
Re: [INC]EasyNames - by matt2127 - 21.09.2008, 22:29
Re: [INC]EasyNames - by Sandra18[NL] - 22.09.2008, 00:28
Re: [INC]EasyNames - by Donuts - 22.09.2008, 16:26
Re: [INC]EasyNames - by ғαιιοцт - 22.09.2008, 16:44
Re: [INC]EasyNames - by Jerry - 22.09.2008, 20:45
Re: [INC]EasyNames - by Sandra18[NL] - 22.09.2008, 22:30
Re: [INC]EasyNames - by Kinetic - 22.09.2008, 23:56
Re: [INC]EasyNames - by Sandra18[NL] - 23.09.2008, 00:54
Re: [INC]EasyNames - by Extremo - 23.09.2008, 00:56
Re: [INC]EasyNames - by Byrner - 23.09.2008, 15:22
Re: [INC]EasyNames - by Google63 - 23.09.2008, 15:45
Re: [INC]EasyNames - by Sandra18[NL] - 23.09.2008, 17:43
Re: [INC]EasyNames - by Byrner - 23.09.2008, 20:46
Re: [INC]EasyNames - by Sandra18[NL] - 23.09.2008, 21:05
Re: [INC]EasyNames - by Byrner - 24.09.2008, 17:47
Re: [INC]EasyNames - by Byrner - 24.09.2008, 20:08
Re: [INC]EasyNames - by Byrner - 24.09.2008, 22:12
Re: [INC]EasyNames - by Byrner - 26.09.2008, 13:02
Re: [INC]EasyNames - by mickEi[Ro] - 27.09.2008, 13:36
Re: [INC]EasyNames - by Sandra18[NL] - 27.09.2008, 23:00
Re: [INC]EasyNames - by mickEi[Ro] - 28.09.2008, 08:11
Re: [INC]EasyNames - by Byrner - 28.09.2008, 11:21
Re: [INC]EasyNames - by Byrner - 06.10.2008, 14:11
Re: [INC]EasyNames - by mickEi[Ro] - 13.10.2008, 07:22
Re: [INC]EasyNames - by Byrner - 13.10.2008, 08:58
Re: [INC]EasyNames - by Rozzie - 13.10.2008, 14:25
Re: [INC]EasyNames - by HB - 14.10.2008, 16:38
Re: [INC]EasyNames - by mascii - 25.11.2008, 10:31
Re: [INC]EasyNames - by Klutty - 12.04.2009, 20:12
Re: [INC]EasyNames - by Sandra18[NL] - 12.04.2009, 21:18
Re: [INC]EasyNames - by Weirdosport - 12.04.2009, 23:33

Forum Jump:


Users browsing this thread: 1 Guest(s)