[Ajuda] bloquear o comando de abrir portгo so para admins
#1

Criei 2 portхes e queria saber como fazer para os bloquear para os jogadores normais, so admins o podendo usar, alguйm poderia ajudar??
Reply
#2

coloque dentro do comando a funзгo de admin do seu servidor.

Ex.
pawn Код:
if(PlayerInfo[playerid][Admin] > 0)
{
Reply
#3

olhe so o que aconteceu!!!
PHP код:
C:\Users\Flavio Pereira\Desktop\PlayHappy\PlayHappy\pawno\include\seif_walk.inc(53) : error 004: function "Walk_OnPlayerKeyStateChange" is not implemented
C
:\Users\Flavio Pereira\Desktop\PlayHappy\PlayHappy\gamemodes\PlayHappy.pwn(1572) : error 004: function "IsAGroove" is not implemented
C
:\Users\Flavio Pereira\Desktop\PlayHappy\PlayHappy\gamemodes\PlayHappy.pwn(1576) : error 004: function "IsAGrooveSF" is not implemented
C
:\Users\Flavio Pereira\Desktop\PlayHappy\PlayHappy\gamemodes\PlayHappy.pwn(3258) : error 017undefined symbol "GetPlayerOrg"
C:\Users\Flavio Pereira\Desktop\PlayHappy\PlayHappy\gamemodes\PlayHappy.pwn(3305) : error 017undefined symbol "GetPlayerOrg"
C:\Users\Flavio Pereira\Desktop\PlayHappy\PlayHappy\gamemodes\PlayHappy.pwn(3460) : error 017undefined symbol "GetPlayerOrg"
C:\Users\Flavio Pereira\Desktop\PlayHappy\PlayHappy\gamemodes\PlayHappy.pwn(3476) : error 017undefined symbol "GetPlayerOrg"
C:\Users\Flavio Pereira\Desktop\PlayHappy\PlayHappy\gamemodes\PlayHappy.pwn(3562) : error 004: function "ProxDetector" is not implemented
C
:\Users\Flavio Pereira\Desktop\PlayHappy\PlayHappy\gamemodes\PlayHappy.pwn(3580) : error 004: function "ProxDetector" is not implemented
C
:\Users\Flavio Pereira\Desktop\PlayHappy\PlayHappy\gamemodes\PlayHappy.pwn(3598) : error 004: function "ProxDetector" is not implemented
C
:\Users\Flavio Pereira\Desktop\PlayHappy\PlayHappy\gamemodes\PlayHappy.pwn(3616) : error 004: function "ProxDetector" is not implemented
C
:\Users\Flavio Pereira\Desktop\PlayHappy\PlayHappy\gamemodes\PlayHappy.pwn(3634) : error 004: function "ProxDetector" is not implemented
C
:\Users\Flavio Pereira\Desktop\PlayHappy\PlayHappy\gamemodes\PlayHappy.pwn(3652) : error 004: function "ProxDetector" is not implemented
C
:\Users\Flavio Pereira\Desktop\PlayHappy\PlayHappy\gamemodes\PlayHappy.pwn(3670) : error 004: function "ProxDetector" is not implemented
C
:\Users\Flavio Pereira\Desktop\PlayHappy\PlayHappy\gamemodes\PlayHappy.pwn(3688) : error 004: function "ProxDetector" is not implemented
C
:\Users\Flavio Pereira\Desktop\PlayHappy\PlayHappy\gamemodes\PlayHappy.pwn(3706) : error 004: function "ProxDetector" is not implemented
C
:\Users\Flavio Pereira\Desktop\PlayHappy\PlayHappy\gamemodes\PlayHappy.pwn(3724) : error 004: function "ProxDetector" is not implemented
C
:\Users\Flavio Pereira\Desktop\PlayHappy\PlayHappy\gamemodes\PlayHappy.pwn(3735) : error 004: function "ProxDetector" is not implemented
C
:\Users\Flavio Pereira\Desktop\PlayHappy\PlayHappy\gamemodes\PlayHappy.pwn(4097) : error 004: function "PlayerToPoint" is not implemented
C
:\Users\Flavio Pereira\Desktop\PlayHappy\PlayHappy\gamemodes\PlayHappy.pwn(4166) : error 004: function "OnPlayerText" is not implemented
C
:\Users\Flavio Pereira\Desktop\PlayHappy\PlayHappy\gamemodes\PlayHappy.pwn(4171) : error 004: function "OnPlayerText" is not implemented
C
:\Users\Flavio Pereira\Desktop\PlayHappy\PlayHappy\gamemodes\PlayHappy.pwn(5498) : error 004: function "ClearChatbox" is not implemented
C
:\Users\Flavio Pereira\Desktop\PlayHappy\PlayHappy\gamemodes\PlayHappy.pwn(5738) : error 004: function "ClearChatbox" is not implemented
C
:\Users\Flavio Pereira\Desktop\PlayHappy\PlayHappy\gamemodes\PlayHappy.pwn(5746) : error 004: function "ClearChatbox" is not implemented
C
:\Users\Flavio Pereira\Desktop\PlayHappy\PlayHappy\gamemodes\PlayHappy.pwn(5754) : error 004: function "ClearChatbox" is not implemented
C
:\Users\Flavio Pereira\Desktop\PlayHappy\PlayHappy\gamemodes\PlayHappy.pwn(5762) : error 004: function "ClearChatbox" is not implemented
Compilation aborted
.Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
26 Errors

linha 53
PHP код:
#define F_MAX_OBJECTS        750    //maximum amount of objects the streamer will create; PLEASE change this to the amount of objects you are using. 
linha 1572
PHP код:
    if(IsAGroove(playerid)||IsAVagos(playerid)||IsABallas(playerid)||IsAAzteca(playerid)||IsAComandoVermelho(playerid)||IsAPCC(playerid)||IsAMedicos(playerid)||IsAPM(playerid)||IsABOPEs(playerid)||IsATaxi(playerid)||IsAJornal(playerid)) 
linha 1576
PHP код:
    else if(IsAGrooveSF(playerid)||IsAVagosSF(playerid)||IsABallasSF(playerid)||IsAAztecaSF(playerid)||IsASonsofAnarchy(playerid)||IsAPCCSF(playerid)||IsATaxiSF(playerid)||IsAMedicosSF(playerid)||IsAPoliciaCivil(playerid)||IsAPMSF(playerid)||IsAJornalSF(playerid)) 
linha 3258
PHP код:
                            if(GetPlayerOrg(k) == && FH == 1
linha 3305
PHP код:
                            if(GetPlayerOrg(k) == 22 && FK == 1
linha 3460
PHP код:
            if(GetPlayerOrg(giveplayerid) != GetPlayerOrg(playerid)) 
linha 3476
PHP код:
                   SendFamilyMessage(GetPlayerOrg(playerid), COLOR_YELLOWstring); 
linha 3562
PHP код:
                ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); 
linha 3580
PHP код:
                ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); 
linha 3598
PHP код:
                ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); 
linha 3616
PHP код:
                ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); 
linha 3634
PHP код:
                ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); 
linha 3652
PHP код:
                ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); 
linha 3670
PHP код:
                ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); 
linha 3688
PHP код:
                ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); 
linha 3706
PHP код:
                ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); 
linha 3724
PHP код:
                ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); 
linha 3735
PHP код:
                ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); 
linha 4097
PHP код:
        if(PlayerToPoint(2.0,playerid,963.7944,-933.7776,41.9256)) 
linha 4166
PHP код:
            OnPlayerText(playerid,"proximo "); 
linha 4171
PHP код:
            OnPlayerText(playerid,"Confirma"); 
linha 5498
PHP код:
            ClearChatbox(playerid100); 
linha 5738
PHP код:
                ClearChatbox(playerid100); 
linha 5746
PHP код:
                ClearChatbox(playerid100); 
linha 5754
PHP код:
                ClearChatbox(playerid100); 
linha 5762
PHP код:
                ClearChatbox(playerid100); 
Reply
#4

Posta o comando pra abrir o portгo
Reply
#5

PHP код:
if(PlayerInfo[playerid][Admin] > 0)
{
Funзгo

isso ai foi erro de chave, sempre que abre uma, se fecha outra .
Reply
#6

agora aparece isto

PHP код:
C:\Users\Flavio Pereira\Desktop\PlayHappy\PlayHappy\gamemodes\PlayHappy.pwn(16341) : warning 217loose indentation
C
:\Users\Flavio Pereira\Desktop\PlayHappy\PlayHappy\gamemodes\PlayHappy.pwn(29454) : error 036: empty statement
C
:\Users\Flavio Pereira\Desktop\PlayHappy\PlayHappy\gamemodes\PlayHappy.pwn(29455) : warning 217loose indentation
C
:\Users\Flavio Pereira\Desktop\PlayHappy\PlayHappy\gamemodes\PlayHappy.pwn(29455) : error 033: array must be indexed (variable "PlayerInfo")
C:\Users\Flavio Pereira\Desktop\PlayHappy\PlayHappy\gamemodes\PlayHappy.pwn(29455) : error 029invalid expressionassumed zero
C
:\Users\Flavio Pereira\Desktop\PlayHappy\PlayHappy\gamemodes\PlayHappy.pwn(29455) : warning 215expression has no effect
C
:\Users\Flavio Pereira\Desktop\PlayHappy\PlayHappy\gamemodes\PlayHappy.pwn(29455) : error 001expected token";"but found "]"
C:\Users\Flavio Pereira\Desktop\PlayHappy\PlayHappy\gamemodes\PlayHappy.pwn(29455) : fatal error 107too many error messages on one line
Compilation aborted
.Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
5 Errors

linha 16341
PHP код:
    xacalaca[playerid] ++; 
linha 29454
PHP код:
    if(strcmp(#/pad, cmdtext, true) == 0); 
linha 29455
PHP код:
        if(PlayerInfo)[playerid][Admin]>0); 
comando completo:
PHP код:
if(strcmp(#/pad, cmdtext, true) == 0);
        
if(PlayerInfo)[playerid][Admin]>0);
    {
       
MoveObject(padmd1548.3618,-1714.3406,37.1879,3,0.0000,0.0000,0.0000);
    
SetTimer(#Movepadmd, 5000, 0);
    
SendClientMessage(playerid0x2641FEFF#Portao aberto);
    
return true;
    } 
Reply
#7

pawn Код:
if(strcmp(/pad, cmdtext, true) == 0);
        if(PlayerInfo[playerid][Admin]>0);
    {
       MoveObject(padmd, 1548.3618,-1714.3406,37.1879,3,0.0000,0.0000,0.0000);
    SetTimer(#Movepadmd, 5000, 0);
    SendClientMessage(playerid, 0x2641FEFF, #Portao aberto);
    return true;
    }
o PLAYERINFO[playerid][Admin]
vc tem que ajustar para a funзгo que define que o player й admin '-'
Reply
#8

que chato cara :/

PHP код:
if(strcmp(cmd"/pad"true) == 0)
{
    if(
IsPlayerAdmin(playerid))
    {
           
MoveObject(padmd1548.3618,-1714.3406,37.1879,3,0.0000,0.0000,0.0000);
        
SetTimer(Movepadmd50000);
        
SendClientMessage(playerid0x2641FEFF"Portao aberto");
    }
    else
    {
        
SendClientMessage(playerid, -1"Vocк nгo й um Adminstrador !");
    }
    return 
true;

Reply
#9

Valeu mano brigado, esse codigo faltam o # nalguns lados, meti os e esta a funcionar correctamente
Reply
#10

nгo й nessesario por # .
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)