PuRiSaNu Posted October 8, 2016 Report Share Posted October 8, 2016 Salut, am incercat o multime de moduri in care sa elimin nume_prenume, dar am esuat, si am luat hotararea de a cere support poate cineva ma poate ajuta codul este urmatorul: stock IsPlayerNameCorrect(const name[]) { new bool:Symbol; if(name[0] < 'A' || name[0] > 'Z') return 0; for(new A = 1; A < strlen(name); A++) { if(name[A] == '_') { if(Symbol || name[A+1] < 'A' || name[A+1] > 'Z') return 0; Symbol = true; A += 2; continue; } if(name[A] < 'a' || name[A] > 'z') return 0; } if(!Symbol) return 0; return 1; } Quote Link to comment Share on other sites More sharing options...
0 Mister Posted October 8, 2016 Report Share Posted October 8, 2016 tu ce vrei mai exact sa faci acesta este un stock, ai o problema la conectare? Daca nu ai nume rp adica cu _ iti da kick sau ceva de genul? Daca da atunci ca sa nu ne arati sute si linii de code si erori modifica stockul cu asta stock IsPlayerNameCorrect(const name[]) { /*new bool:Symbol; if(name[0] < 'A' || name[0] > 'Z') return 0; for(new A = 1; A < strlen(name); A++) { if(name[A] == '_') { if(Symbol || name[A+1] < 'A' || name[A+1] > 'Z') return 0; Symbol = true; A += 2; continue; } if(name[A] < 'a' || name[A] > 'z') return 0; } if(!Symbol) return 0;*/ return 1; } Quote __ ____ __ / |/ (_)____/ /____ _____ / /|_/ / / ___/ __/ _ \/ ___/ / / / / (__ ) /_/ __/ / /_/ /_/_/____/\__/\___/_/ SERVICII SCRIPTING DE CALITATE Pagina Scripting pawn Link to comment Share on other sites More sharing options...
Question
PuRiSaNu
Salut, am incercat o multime de moduri in care sa elimin nume_prenume, dar am esuat, si am luat hotararea de a cere support poate cineva ma poate ajuta codul este urmatorul:
stock IsPlayerNameCorrect(const name[])
{
new bool:Symbol;
if(name[0] < 'A' || name[0] > 'Z') return 0;
for(new A = 1; A < strlen(name); A++)
{
if(name[A] == '_')
{
if(Symbol || name[A+1] < 'A' || name[A+1] > 'Z') return 0;
Symbol = true;
A += 2;
continue;
}
if(name[A] < 'a' || name[A] > 'z') return 0;
}
if(!Symbol) return 0;
return 1;
}
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.