SA-MP Forums Archive
2 basic pawn questions. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: 2 basic pawn questions. (/showthread.php?tid=128784)



2 basic pawn questions. - Landon - 19.02.2010


I have a roleplay script, and you need Firstname_Lastname, so the question is; can you remove the underscore (_)? If yes, how?


I would like to have:
(INFO) Firstname Lastname made you a Scripter
(INFO) You have made Firstname Lastname a Scripter.


Pawn code for the /admins: http://pastebin.com/m4c89607
Pawn code for the /makeadmin: http://pastebin.com/d4a67297c

Help is appreciated really much!


Re: 2 basic pawn questions. - BlackFoX - 19.02.2010

Код:
CheckName(const str[],firstname = 4,lastname = 4) 
{
	new pos = strfind(str, "_", true);
	return (pos!=-1 && pos >=firstname && strlen(str[pos+1]) >= lastname);
}
Код:
if(CheckName("Player_Name")) // Returns True cause the Name Contains at First more than 4 Chars and the lastname 4
Код:
if(CheckName("Player_Name",4,4)) // with ur own Limit



Re: 2 basic pawn questions. - Correlli - 19.02.2010

http://forum.sa-mp.com/index.php?top...3503#msg913503


Re: 2 basic pawn questions. - Landon - 19.02.2010

Alright, request 1 is done. Anyone knows the answer on question 2?