2 basic pawn questions.
#1


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!
Reply
#2

Код:
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
Reply
#3

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

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


Forum Jump:


Users browsing this thread: 1 Guest(s)