[Include] [INC]EasyNames
#1

[INC]EasyNames
Damn, i didn't know saying goodbye to sa:mp was so hard
Anyway, after some questions from people about detecting (parts of) playernames and such, i decided to make an easy to use include with some handy functions:


PlayerNameIs(playerid, const name[]);
This function will return '1' if the playername is equal to "name" and will return '0' if the PlayerName is not equal to the inserted string.

PlayerNameContains(playerid, const name[]);
This function will return '1' if "name" is found somewhere in the PlayerName of that player.

PlayerNameStartsWith(playerid, const name[]);
This function will return '1' if the playername of that player starts with "name".

PlayerNameEndsWith(playerid, const name[]);
This function will return '1' if the playername of that player ends with "name".

ReversePlayerName(playerid);
This function will reverse the playername (just to joke players )
Example: "Sandra19[NL]" will become "]NL[91ardnaS"


Note: If you use 1 of the functions on an unconnected player, the function will automatically return '0'.


How To Install:
  • Download "EasyNames.inc"
  • Place it in the "include"-folder which is located in the "pawno"-folder
  • Add to your gamemode of filterscript (or whereever you want to use these functions) at the top:
Code:
#include <EasyNames>

Download:
http://www.mediafire.com/?m420zzuoxdy


Enjoy
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)