I want a script
where you have to use a name with usage _ like in samp roleplay server,s
example, Sebastian_Klemens
real names
how?
if (player.Name.find("_") == null) //Do your shets here
Split player name with _
Make sure, the number of tokens == 2
Make sure both token's string length is > 1
I use this in my rp
if (player.Name.find( "_" ) == null){
MessagePlayer( "[#FFFFFF]Porfavor usa el formato correcto: Nombre_Apellido", player );
MessagePlayer( "[#FFFFFF]Vuelve a entrar con el formato indicado.", player );
KickPlayer( player );
}
Quote from: aXXo on Jul 27, 2016, 07:45 PMSplit player name with _
Make sure, the number of tokens == 2
Make sure both token's string length is > 1
function CPlayer::IsNiceName()
try
{
local sSplitName = Name.split("_");
if (sSplitName.len() != 2) return 0;
if (sSplitName[0].len() > 1 && sSplitName[1].len() > 1) return 1;
}
catch (e)
{
return 0;
}
Usage:
int CPlayer.IsNiceName()
if (CPlayer.IsNiceName() == 0) //fuck this player up, how dare he choose this shitty and ridiculous name!!!
thx all, worked