SA-MP Forums

Go Back   SA-MP Forums > Non-English > Languages > Português/Portuguese

Reply
 
Thread Tools Display Modes
Old 07/05/2012, 12:20 AM   #1
Sergiosousa
Huge Clucker
 
Join Date: Feb 2012
Posts: 409
Reputation: 14
Default [Ajuda] RegistoPlayer

Boas

E possivel que quando um player se registe as primeiras letras do nome seja sempre letra maiuscula?

Exemplo:

miguel_marsh

Ao registar mesmo metendo miguel_marsh no scriptfiles fique salvo Miguel_Marsh

Com primeira letras maiuscula e depois do _ tambem maiuscula

Alguem podera ajudar me?
Sergiosousa is offline   Reply With Quote
Old 07/05/2012, 12:24 AM   #2
Lós
High-roller
 
Lós's Avatar
 
Join Date: Sep 2010
Location: Casterly Rock
Posts: 3,897
Reputation: 307
Default Re: [Ajuda] RegistoPlayer

SetPlayerName
__________________
Lós is offline   Reply With Quote
Old 07/05/2012, 12:29 AM   #3
Sergiosousa
Huge Clucker
 
Join Date: Feb 2012
Posts: 409
Reputation: 14
Default AW: [Ajuda] RegistoPlayer

fiquei na mesma...
Sergiosousa is offline   Reply With Quote
Old 07/05/2012, 12:50 AM   #4
zbt
Gangsta
 
zbt's Avatar
 
Join Date: Feb 2012
Posts: 752
Reputation: 76
Default Re: [Ajuda] RegistoPlayer

Kickando o player fica mais fácil..

pawn Code:
public OnPlayerConnect(playerid) {
    new n[24];
    GetPlayerName(playerid, n, 24);
    if(!IsARolePlayName(n)) {
        SendClientMessage(playerid, -1, "Nick inválido...");
        Kick(playerid);
    }
    return true;
}

stock IsARolePlayName(name[]) //by Lenny
{
    new
                szLastCell,
        bool:   bUnderScore;

    for(new i; i < strlen(name); i++)
    {
        if(name[i] == '_')
        {
            if(bUnderScore == true)
            {
                return 0;
            }

            bUnderScore = true;
        }

        else if(!szLastCell || szLastCell == '_')
        {
            if(name[i] < 'A' || name[i] > 'Z')
            {
                return 0;
            }
        }

        else
        {
            if(name[i] < 'a' || name[i] > 'z')
                return 0;
        }

        szLastCell = name[i];
    }

    if(bUnderScore == false)
        return 0;

    return 1;
}
zbt is offline   Reply With Quote
Old 07/05/2012, 08:36 PM   #5
Sergiosousa
Huge Clucker
 
Join Date: Feb 2012
Posts: 409
Reputation: 14
Default AW: [Ajuda] RegistoPlayer

Tipo nao está a kickar o player, aparece "A carrregar servidor..."

E de seguida Connection Lost

Alguem podera ajudar?
Sergiosousa is offline   Reply With Quote
Old 08/05/2012, 12:41 AM   #6
Sergiosousa
Huge Clucker
 
Join Date: Feb 2012
Posts: 409
Reputation: 14
Default AW: [Ajuda] RegistoPlayer

alguem pode ajudar?
Sergiosousa is offline   Reply With Quote
Old 08/05/2012, 12:42 AM   #7
ViictorDaay-
Gangsta
 
ViictorDaay-'s Avatar
 
Join Date: Apr 2012
Location: Rio de Janeiro
Posts: 772
Reputation: 23
Default Re: [Ajuda] RegistoPlayer

pawn Code:
public OnPlayerConnect(playerid) {
    new n[24];
    GetPlayerName(playerid, n, 24);
    if(!IsARolePlayName(n)) {
        SendClientMessage(playerid, -1, "A Carregar Servidor...")
        SendClientMessage(playerid, -1, "Connection Lost");
        Kick(playerid);
    }
    return true;
}

stock IsARolePlayName(name[]) //by Lenny
{
    new
                szLastCell,
        bool:   bUnderScore;

    for(new i; i < strlen(name); i++)
    {
        if(name[i] == '_')
        {
            if(bUnderScore == true)
            {
                return 0;
            }

            bUnderScore = true;
        }

        else if(!szLastCell || szLastCell == '_')
        {
            if(name[i] < 'A' || name[i] > 'Z')
            {

Pronto =D
ViictorDaay- is offline   Reply With Quote
Old 08/05/2012, 12:56 AM   #8
Sergiosousa
Huge Clucker
 
Join Date: Feb 2012
Posts: 409
Reputation: 14
Default Re: [Ajuda] RegistoPlayer

nao e isso

Problema e que antes de kickar o player da Connection Lost
Sergiosousa is offline   Reply With Quote
Old 12/05/2012, 06:12 PM   #9
DreyPT
Big Clucker
 
Join Date: Jun 2011
Location: Amares - Braga - Portugal
Posts: 179
Reputation: 2
Default Re: [Ajuda] RegistoPlayer

Sergio, ali no script têm uma frase a dizer "Connection lost "

Agora edita aquilo e poim a frase que quiseres --'
DreyPT is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Ajuda] Preciso de ajuda pra criar um xat interno entra as orgs Lucas_Killers Português/Portuguese 10 15/12/2011 04:36 AM
[ajuda]Problema no sistema de VBemail,acho que é facil resolve me ajuda aki O_O' Sonic Hero Português/Portuguese 14 21/11/2011 06:31 PM
[AJUDA] Ajuda Alugns Comandos Aki ? Podem Ajuda eu e Alguns tbm pedro Português/Portuguese 7 06/05/2010 05:12 PM
[AJUDA] RESOLVIdo POR andmeida10 Sao Duas Ajudas para kem sabe ajuda ae. zSuYaNw Português/Portuguese 8 06/04/2010 06:56 AM


All times are GMT. The time now is 07:19 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.