SA-MP Forums Archive
RP Names - 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)
+--- Thread: RP Names (/showthread.php?tid=497573)



RP Names - Lajko1 - 27.02.2014

Hey, I want to ask how can I make length of player name? First name should be 3-7 same goes for the Last name 3-7? I'm trying to make those RP name Like_This


Re: RP Names - Lajko1 - 28.02.2014

So how can I make name length limit ? I still didn't figured out :/ for example name can be only from 3-15 characters or smth like that


Re: RP Names - BroZeus - 28.02.2014

use this for declaration-
Код:
new firstname[15],lastname[15];
and condition this--
Код:
if(strlen(firstname)>15)
{
//wahtever u want to do
}
if(strlen(lastname)>15)
{
//wahtever u want to do
}



Re: RP Names - Lajko1 - 28.02.2014

Quote:
Originally Posted by BroZeus
Посмотреть сообщение
use this for declaration-
Код:
new firstname[15],lastname[15];
and condition this--
Код:
if(strlen(firstname)>15)
{
//wahtever u want to do
}
if(strlen(lastname)>15)
{
//wahtever u want to do
}
How exactly I should use that? And how script knows what is firstname and what is lastname?