SA-MP Forums Archive
[Ajuda] Comando determinado level - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Comando determinado level (/showthread.php?tid=403749)



Comando determinado level - curllen - 31.12.2012

Olб galera beleza?
Eu sou meio iniciante.
Gostaria de por esse comando para somente players LEVEL 2 usarem.
Meu gm й pLevel
Ja tentei e nгo consegui ;\
Ajuda eu?

pawn Code:
if (strcmp(cmd, "/brindenovato", true) == 0)
    {
        if (PlayerToPoint(2.0, playerid, 360.4893,170.2785,1008.3893))
        {
            ShowPlayerDialog(playerid, 2681,DIALOG_STYLE_MSGBOX,"{1E90FF}Brasil {FFFF00}Revolted {00FF00}City","{00FF00}Seja bem vindo.\nVocк acaba de ganhar um brinde, digite /rg e veja.","Fechar", "");
        }
        return true;
    }



Re: Comando determinado level - EditPawn - 31.12.2012

pawn Code:
if (strcmp(cmd, "/brindenovato", true) == 0)
    {
        if (PlayerToPoint(2.0, playerid, 1022.3365,-1126.3481,23.8699) && PlayerInfo[playerid][pLevel] == 2)
        {
            ShowPlayerDialog(playerid, 2681,DIALOG_STYLE_MSGBOX,"{1E90FF}Brasil {FFFF00}Revolted {00FF00}City","{00FF00}Seja bem vindo.\nVocк acaba de ganhar um brinde, digite /rg e veja.","Fechar", "");
        }
        return true;
    }



Re: Comando determinado level - curllen - 31.12.2012

Ah esqueci, teria como por uma msg retornando "Vocк nгo й um novato" caso algum level superior digite.


Re: Comando determinado level - EditPawn - 31.12.2012

Quote:
Originally Posted by curllen
View Post
Ah esqueci, teria como por uma msg retornando "Vocк nгo й um novato" caso algum level superior digite.
й sу colocar um "else" no final da chave "}" da if e um SendClientMessage


Re: Comando determinado level - mau.tito - 31.12.2012

pawn Code:
if(GetPlayerScore(playerid) < 2)
    return SendClientMessage(playerid, -1,"Voce nao pode utilizar o cmd");



Re: Comando determinado level - HeyHoLetsGo - 31.12.2012

Aqui manolo:

pawn Code:
if (strcmp(cmd, "/brindenovato", true) == 0)
    {
        if (PlayerToPoint(2.0, playerid, 1022.3365,-1126.3481,23.8699) && PlayerInfo[playerid][pLevel] <= 2)
        {
            ShowPlayerDialog(playerid, 2681,DIALOG_STYLE_MSGBOX,"{1E90FF}Brasil {FFFF00}Revolted {00FF00}City","{00FF00}Seja bem vindo.\nVocк acaba de ganhar um brinde, digite /rg e veja.","Fechar", "");
        }
        if(PlayerInfo[playerid][pLevel] > 2)
        {
            SendClientMessage(playerid,-1,"[ ! ] Vocк nгo й um novato!");
        }
        return true;
    }



Re: Comando determinado level - curllen - 31.12.2012

@EditPawn
Valeu mano deu certin.

Obrigado aos demais tambйm.

#Resolvido.