[Ajuda] Comando de LogarAdm
#1

Bom Galera o comando que eu estou tentando modificar para dcmd pois eu uso o ladmin e o comando eh em ZCMD й o logaradm que qualquer player pode usar se souber a senha.
Nгo Estou conseguindo compilar.
Help?

pawn Код:
dcmd(logaradm,8,cmdtext);

//DEFINA A SENHA PARA SE LOGAR DE ADM ESCONDIDO
#define                         SENHA                                           "suasenha"

dcmd_logaradm(playerid,params[]) {
new senha[40];
    if(sscanf(params, "s", senha))
    SendClientMessage(playerid,red,"Use /logaradm <senha>");
    if(strcmp(senha, SENHA, true) == 0) {
        SendClientMessage(playerid,red,"Bem Vindo б Adminstraзгo");
        SendClientMessage(playerid,red,"Vocк se Logou como Adm Escondido");
        SendClientMessage(playerid,red,"BEM VINDO ADM");
        if(PlayerInfo[playerid][LoggedIn] == 1) {
        if(PlayerInfo[playerid][Level] >= 5 || IsPlayerAdmin(playerid)) {
        return 1;
    }
    SendClientMessage(playerid,red,"Senha incorreta.");
    return 1;
}
Reply
#2

Mande-nos os erros, amigo.
Reply
#3

Quote:
Originally Posted by #Luca[S].
Посмотреть сообщение
Mande-nos os erros, amigo.
Quote:

C:\Users\Admin\Desktop\samp server\filterscripts\ladmin4v2.pwn(336) : error 017: undefined symbol "AntiDeAMX"
C:\Users\Admin\Desktop\samp server\filterscripts\ladmin4v2.pwn(407) : error 017: undefined symbol "UpdateConfig"
C:\Users\Admin\Desktop\samp server\filterscripts\ladmin4v2.pwn(825) : error 017: undefined symbol "LoadConfig"
C:\Users\Admin\Desktop\samp server\filterscripts\ladmin4v2.pwn(827) : error 017: undefined symbol "SaveToFile"
C:\Users\Admin\Desktop\samp server\filterscripts\ladmin4v2.pwn(861) : error 017: undefined symbol "SaveToFile"
C:\Users\Admin\Desktop\samp server\filterscripts\ladmin4v2.pwn(88 : error 017: undefined symbol "ResetPlayerCash"
C:\Users\Admin\Desktop\samp server\filterscripts\ladmin4v2.pwn(966) : error 017: undefined symbol "PlayerName2"
C:\Users\Admin\Desktop\samp server\filterscripts\ladmin4v2.pwn(971) : error 017: undefined symbol "SaveToFile"
C:\Users\Admin\Desktop\samp server\filterscripts\ladmin4v2.pwn(973) : error 017: undefined symbol "PlayerName2"
C:\Users\Admin\Desktop\samp server\filterscripts\ladmin4v2.pwn(975) : error 017: undefined symbol "PlayerName2"
C:\Users\Admin\Desktop\samp server\filterscripts\ladmin4v2.pwn(97 : error 017: undefined symbol "PlayerName2"
C:\Users\Admin\Desktop\samp server\filterscripts\ladmin4v2.pwn(986) : error 017: undefined symbol "SaveToFile"
C:\Users\Admin\Desktop\samp server\filterscripts\ladmin4v2.pwn(1007) : error 017: undefined symbol "SaveToFile"
C:\Users\Admin\Desktop\samp server\filterscripts\ladmin4v2.pwn(1021) : error 017: undefined symbol "SaveToFile"
C:\Users\Admin\Desktop\samp server\filterscripts\ladmin4v2.pwn(1050) : error 017: undefined symbol "PlayerName2"
C:\Users\Admin\Desktop\samp server\filterscripts\ladmin4v2.pwn(1063) : error 017: undefined symbol "LoginPlayer"
C:\Users\Admin\Desktop\samp server\filterscripts\ladmin4v2.pwn(1080) : error 017: undefined symbol "PlayerName2"
C:\Users\Admin\Desktop\samp server\filterscripts\ladmin4v2.pwn(108 : error 017: undefined symbol "LoginPlayer"
C:\Users\Admin\Desktop\samp server\filterscripts\ladmin4v2.pwn(1151) : error 017: undefined symbol "PlayerName2"
C:\Users\Admin\Desktop\samp server\filterscripts\ladmin4v2.pwn(1152) : error 017: undefined symbol "SaveToFile"
C:\Users\Admin\Desktop\samp server\filterscripts\ladmin4v2.pwn(119 : error 017: undefined symbol "SavePlayer"
C:\Users\Admin\Desktop\samp server\filterscripts\ladmin4v2.pwn(1199) : error 017: undefined symbol "PlayerName2"
C:\Users\Admin\Desktop\samp server\filterscripts\ladmin4v2.pwn(1199) : error 017: undefined symbol "PlayerName2"
C:\Users\Admin\Desktop\samp server\filterscripts\ladmin4v2.pwn(1209) : error 017: undefined symbol "CarDeleter"
C:\Users\Admin\Desktop\samp server\filterscripts\ladmin4v2.pwn(1214) : error 017: undefined symbol "AdvanceSpectate"
C:\Users\Admin\Desktop\samp server\filterscripts\ladmin4v2.pwn(1297) : error 017: undefined symbol "KickPlayerEx"

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


26 Errors.

Vish
Reply
#4

Precisa mandar erro? 26 erros й falta de fechamaneto de chaves... Olha o comando do cara... Correзгo:
Код:
dcmd_logaradm(playerid,params[])
{
    new senhaa[40];
	if(sscanf(params, "s[40]", senhaa))
        return SendClientMessage(playerid,red,"Use /logaradm <senha>");

    if(strcmp(senhaa, SENHA, true) == 0)
    {
	    SendClientMessage(playerid,red,"Bem Vindo б Adminstraзгo");
	    SendClientMessage(playerid,red,"Vocк se Logou como Adm Escondido");
	    SendClientMessage(playerid,red,"BEM VINDO ADM");
        PlayerInfo[playerid][LoggedIn] = 1;
	}
    else
	   SendClientMessage(playerid,red,"Senha incorreta.");
	return 1;
}
Reply
#5

quantas linhas vcs gastam atoa o.o chaves tb
pawn Код:
dcmd(logaradm,8,cmdtext);
#define                         SENHA                                           "suasenha"
dcmd_logaradm(playerid,params[]) {
    new senha[40];
    if(sscanf(params, "s", senha)) return SendClientMessage(playerid,red,"Use /logaradm <senha>");
    else
    if(strcmp(senha, SENHA, true) == 0) {
        SendClientMessage(playerid,red,"Bem Vindo б Adminstraзгo"), SendClientMessage(playerid,red,"Vocк se Logou como Adm Escondido"), SendClientMessage(playerid,red,"BEM VINDO ADM");
        if(PlayerInfo[playerid][LoggedIn] == 1)
            if(PlayerInfo[playerid][Level] >= 5 || IsPlayerAdmin(playerid)) return 1;
    }
    else SendClientMessage(playerid,red,"Senha incorreta.");
    return 1;
}
Reply
#6

Quote:
Originally Posted by Krusheer
Посмотреть сообщение
quantas linhas vcs gastam atoa o.o chaves tb
pawn Код:
dcmd(logaradm,8,cmdtext);
#define                         SENHA                                           "suasenha"
dcmd_logaradm(playerid,params[]) {
    new senha[40];
    if(sscanf(params, "s", senha)) return SendClientMessage(playerid,red,"Use /logaradm <senha>");
    else
    if(strcmp(senha, SENHA, true) == 0) {
        SendClientMessage(playerid,red,"Bem Vindo б Adminstraзгo"), SendClientMessage(playerid,red,"Vocк se Logou como Adm Escondido"), SendClientMessage(playerid,red,"BEM VINDO ADM");
        if(PlayerInfo[playerid][LoggedIn] == 1)
            if(PlayerInfo[playerid][Level] >= 5 || IsPlayerAdmin(playerid)) return 1;
    }
    else SendClientMessage(playerid,red,"Senha incorreta.");
    return 1;
}
Como eu faзo ele setar para o lvl5?
Reply
#7

Quote:
Originally Posted by ShOwD
Посмотреть сообщение
Como eu faзo ele setar para o lvl5?
PHP код:
dcmd(logaradm,8,cmdtext);
#define                         SENHA                                           "suasenha"
dcmd_logaradm(playerid,params[]) {
    new 
senha[40];
    if(
PlayerInfo[playerid][LoggedIn] == 0) return 0//caso nгo estiver logado, o comando nгo responde
    
if(sscanf(params"s"senha)) return SendClientMessage(playerid,red,"Use /logaradm <senha>"); //aqui vc jб sabe, pametros corretos..
    
else 
    if(
strcmp(senhaSENHAtrue) == 0) { //checar se a senha й igual a senha definida
        
PlayerInfo[playerid][Level] = 5//setar lvl de admin
        
SendClientMessage(playerid,red,"Bem vindo a administraзгo, vocк logou como administrador escondido!"); //mensagem ao jogador
    
}
    else 
SendClientMessage(playerid,red,"Vocк digitou a senha incorreta!");// caso errar a senha
    
return 1;

Reply
#8

Quote:
Originally Posted by Krusheer
Посмотреть сообщение
quantas linhas vcs gastam atoa o.o chaves tb
pawn Код:
dcmd(logaradm,8,cmdtext);
#define                         SENHA                                           "suasenha"
dcmd_logaradm(playerid,params[]) {
    new senha[40];
    if(sscanf(params, "s", senha)) return SendClientMessage(playerid,red,"Use /logaradm <senha>");
    else
    if(strcmp(senha, SENHA, true) == 0) {
        SendClientMessage(playerid,red,"Bem Vindo б Adminstraзгo"), SendClientMessage(playerid,red,"Vocк se Logou como Adm Escondido"), SendClientMessage(playerid,red,"BEM VINDO ADM");
        if(PlayerInfo[playerid][LoggedIn] == 1)
            if(PlayerInfo[playerid][Level] >= 5 || IsPlayerAdmin(playerid)) return 1;
    }
    else SendClientMessage(playerid,red,"Senha incorreta.");
    return 1;
}
Quote:
Originally Posted by Krusheer
Посмотреть сообщение
PHP код:
dcmd(logaradm,8,cmdtext);
#define                         SENHA                                           "suasenha"
dcmd_logaradm(playerid,params[]) {
    new 
senha[40];
    if(
PlayerInfo[playerid][LoggedIn] == 0) return 0//caso nгo estiver logado, o comando nгo responde
    
if(sscanf(params"s"senha)) return SendClientMessage(playerid,red,"Use /logaradm <senha>"); //aqui vc jб sabe, pametros corretos..
    
else 
    if(
strcmp(senhaSENHAtrue) == 0) { //checar se a senha й igual a senha definida
        
PlayerInfo[playerid][Level] = 5//setar lvl de admin
        
SendClientMessage(playerid,red,"Bem vindo a administraзгo, vocк logou como administrador escondido!"); //mensagem ao jogador
    
}
    else 
SendClientMessage(playerid,red,"Vocк digitou a senha incorreta!");// caso errar a senha
    
return 1;

Funfou! Muito Obrigado Mano!
Reply
#9

Quote:
Originally Posted by ShOwD
Посмотреть сообщение
Funfou! Muito Obrigado Mano!
Nгo hб de que!
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)