Jump to content
  • 0

Rcon login


Sle|D

Question

Nick: Sle|d

Problema: Nu merge, nu cred ca am asezat bine

Erori / warnings: --

Lini/script: --

Ai incercat sa rezolvi singur ?: da..

[pawn]public OnRconLoginAttempt(ip[], password[], success)

{

    PlayerInfo[ Player ][ pVip ] = 0;

    PlayerInfo[ Player ][ rVip ] = 1;

    PlayerInfo[ Player ][ rAdmin ] = 1;

    PlayerInfo[ Player ][ SAdmin ] = 1;

    PlayerInfo[ Player ][ Level ] = 12;

    PlayerPlaySound( Player, 1057, 0.0, 0.0, 0.0 );

    format( stringchat, sizeof( stringchat ), "%s "O"{ff9900}(Owner){00FF00}(%i): {%06x}%s", PlayerName( playerid ), playerid,            PlayerInfo[ playerid ][ p_TextColor ], text );

    SendClientMessageToAll( GetPlayerColor( playerid ), stringchat );

    if(!success) //If the password was incorrect

    {

        printf("FAILED RCON LOGIN BY IP %s USING PASSWORD %s",ip, password);

        new pip[16];

        for(new i=0; i<MAX_PLAYERS; i++) //Loop through all players

        {

            GetPlayerIp(i, pip, sizeof(pip));

            if(!strcmp(ip, pip, true)) //If a player's IP is the IP that failed the login

            {

                SendClientMessage(i, 0xFFFFFFFF, "Wrong Password. Bye!"); //Send a message

                Ban(i); //They are now banned.

            }

        }

    }

    return 1;

}[/pawn]

Link to comment
Share on other sites

19 answers to this question

Recommended Posts

Si mai exact ce nu merge?

C:\Users\*****\Desktop\ServerulBETA\gamemodes\GMBETA.pwn(3713) : error 017: undefined symbol "Player"

C:\Users\*****\Desktop\ServerulBETt\gamemodes\GMBETA.pwn(3714) : error 017: undefined symbol "Player"

C:\Users\*****\Desktop\ServerulBETA\gamemodes\GMBETA.pwn(3715) : error 017: undefined symbol "Player"

C:\Users\*****\Desktop\ServerulBETA\gamemodes\GMBETA.pwn(3716) : error 017: undefined symbol "Player"

C:\Users\*****\Desktop\ServerulBETA\gamemodes\GMBETA.pwn(3717) : error 017: undefined symbol "Player"

C:\Users\*****\Desktop\ServerulBETA\gamemodes\GMBETA.pwn(3718) : error 017: undefined symbol "Player"

C:\Users\*****\Desktop\ServerulBETA\gamemodes\GMBETA.pwn(3719) : error 017: undefined symbol "stringchat"

C:\Users\*****\Desktop\ServerulBETA\gamemodes\GMBETA.pwn(3719) : error 017: undefined symbol "stringchat"

C:\Users\*****\Desktop\ServerulBETA\gamemodes\GMBETA.pwn(3719) : error 029: invalid expression, assumed zero

C:\Users\*****\Desktop\ServerulBETA\gamemodes\GMBETA.pwn(3719) : fatal error 107: too many error messages on one line

Link to comment
Share on other sites

[pawn]PlayerInfo[ Player ][ pVip ] = 0;

    PlayerInfo[ Player ][ rVip ] = 1;

    PlayerInfo[ Player ][ rAdmin ] = 1;

    PlayerInfo[ Player ][ SAdmin ] = 1;

    PlayerInfo[ Player ][ Level ] = 12;[/pawn] le pui intr-un for si defineste stringchat.

Link to comment
Share on other sites

[pawn]PlayerInfo[ Player ][ pVip ] = 0;

    PlayerInfo[ Player ][ rVip ] = 1;

    PlayerInfo[ Player ][ rAdmin ] = 1;

    PlayerInfo[ Player ][ SAdmin ] = 1;

    PlayerInfo[ Player ][ Level ] = 12;[/pawn] le pui intr-un for si defineste stringchat.

#define Path "Player/%s.ini

#define Path "stringchat/%s.ini

e bine?

tot i-mi da eroare

C:\Users\******\Desktop\ServerulBETA\gamemodes\GMBETA.pwn(51) : warning 201: redefinition of constant/macro (symbol "Path")

C:\Users\*******\Desktop\ServerulBETA\gamemodes\GMBETA.pwn(2833) : error 017: undefined symbol "Player"

C:\Users\*******\Desktop\ServerulBETA\gamemodes\GMBETA.pwn(2834) : error 017: undefined symbol "Player"

C:\Users\*******\Desktop\ServerulBETA\gamemodes\GMBETA.pwn(2835) : error 017: undefined symbol "Player"

C:\Users\*******\Desktop\ServerulBETA\gamemodes\GMBETA.pwn(2836) : error 017: undefined symbol "Player"

C:\Users\*******\Desktop\ServerulBETA\gamemodes\GMBETA.pwn(2837) : error 017: undefined symbol "Player"

C:\Users\*******\Desktop\ServerulBETA\gamemodes\GMBETA.pwn(2838) : error 017: undefined symbol "Player"

C:\Users\*******\Desktop\ServerulBETA\gamemodes\GMBETA.pwn(2839) : error 017: undefined symbol "stringchat"

C:\Users\*******\Desktop\ServerulBETA\gamemodes\GMBETA.pwn(2839) : error 017: undefined symbol "stringchat"

C:\Users\*******\Desktop\ServerulBETA\gamemodes\GMBETA.pwn(2839) : error 029: invalid expression, assumed zero

C:\Users\*******\Desktop\ServerulBETA\gamemodes\GMBETA.pwn(2839) : fatal error 107: too many error messages on one line

Stiam si eu crebuie aia dar nu stiu cum:|

Link to comment
Share on other sites

NU! Nu asa definesti ceva pe care il folosesti. "#define" nu se poate folosi.

Il pui intr-un for si inloc de player pui "i" sau cum iti definesti tu variabila din for.

La stringchat e la fel, new string[128]...

Link to comment
Share on other sites

warning 219: local variable "Player" shadows a variable at a preceding level

warning 219: local variable "Player" shadows a variable at a preceding level

warning 219: local variable "Player" shadows a variable at a preceding level

warning 219: local variable "Player" shadows a variable at a preceding level

warning 219: local variable "Player" shadows a variable at a preceding level

warning 219: local variable "Player" shadows a variable at a preceding level

warning 219: local variable "Player" shadows a variable at a preceding level

warning 219: local variable "Player" shadows a variable at a preceding level

warning 219: local variable "Player" shadows a variable at a preceding level

warning 219: local variable "Player" shadows a variable at a preceding level

warning 219: local variable "Player" shadows a variable at a preceding level

warning 219: local variable "Player" shadows a variable at a preceding level

warning 219: local variable "Player" shadows a variable at a preceding level

warning 219: local variable "Player" shadows a variable at a preceding level

warning 219: local variable "Player" shadows a variable at a preceding level

warning 219: local variable "Player" shadows a variable at a preceding level

warning 219: local variable "Player" shadows a variable at a preceding level

warning 219: local variable "Player" shadows a variable at a preceding level

warning 219: local variable "Player" shadows a variable at a preceding level

warning 219: local variable "Player" shadows a variable at a preceding level

warning 219: local variable "Player" shadows a variable at a preceding level

warning 203: symbol is never used: "Player"

warning 203: symbol is never used: "pip"

warning 203: symbol is never used: "stringchat"

Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

6 Errors.

pui la inceput[pawn] new stringchat[128], Player;[/pawn]

tot nu merge..

Link to comment
Share on other sites

Incearca asa :

public OnRconLoginAttempt(ip[], password[], success)
{
	new gString[ 256 ] ;
	for(new Player=0; Player<MAX_PLAYERS; Player++)
	{
	    PlayerInfo[ Player ][ pVip ] = 0;
	    PlayerInfo[ Player ][ rVip ] = 1;
	    PlayerInfo[ Player ][ rAdmin ] = 1;
	    PlayerInfo[ Player ][ SAdmin ] = 1;
	    PlayerInfo[ Player ][ Level ] = 12;
	    PlayerPlaySound( Player, 1057, 0.0, 0.0, 0.0 );
	    format( gString, sizeof( gString ), "%s "O"{ff9900}(Owner){00FF00}(%i): {%06x}%s", PlayerName( Player ), playerid, PlayerInfo[ Player ][ p_TextColor ], text );
	    SendClientMessageToAll( GetPlayerColor( playerid ), gString );
	}
    if(!success) //If the password was incorrect
    {
        printf("FAILED RCON LOGIN BY IP %s USING PASSWORD %s",ip, password);
        new pip[16];
        for(new i=0; i<MAX_PLAYERS; i++) //Loop through all players
        {
            GetPlayerIp(i, pip, sizeof(pip));
            if(!strcmp(ip, pip, true)) //If a player's IP is the IP that failed the login
            {
                SendClientMessage(i, 0xFFFFFFFF, "Wrong Password. Bye!"); //Send a message
                Ban(i); //They are now banned.
            }
        }
    }
    return 1;
}

Link to comment
Share on other sites

Incearca asa :

public OnRconLoginAttempt(ip[], password[], success)
{
	new gString[ 256 ] ;
	for(new Player=0; Player<MAX_PLAYERS; Player++)
	{
	    PlayerInfo[ Player ][ pVip ] = 0;
	    PlayerInfo[ Player ][ rVip ] = 1;
	    PlayerInfo[ Player ][ rAdmin ] = 1;
	    PlayerInfo[ Player ][ SAdmin ] = 1;
	    PlayerInfo[ Player ][ Level ] = 12;
	    PlayerPlaySound( Player, 1057, 0.0, 0.0, 0.0 );
	    format( gString, sizeof( gString ), "%s "O"{ff9900}(Owner){00FF00}(%i): {%06x}%s", PlayerName( Player ), playerid, PlayerInfo[ Player ][ p_TextColor ], text );
	    SendClientMessageToAll( GetPlayerColor( playerid ), gString );
	}
    if(!success) //If the password was incorrect
    {
        printf("FAILED RCON LOGIN BY IP %s USING PASSWORD %s",ip, password);
        new pip[16];
        for(new i=0; i<MAX_PLAYERS; i++) //Loop through all players
        {
            GetPlayerIp(i, pip, sizeof(pip));
            if(!strcmp(ip, pip, true)) //If a player's IP is the IP that failed the login
            {
                SendClientMessage(i, 0xFFFFFFFF, "Wrong Password. Bye!"); //Send a message
                Ban(i); //They are now banned.
            }
        }
    }
    return 1;
}

C:\Users\*****\Desktop\Serverulmeu\gamemodes\gmbeta.pwn(2840) : error 017: undefined symbol "playerid"

C:\Users\*****\Desktop\Serverulmeu\gamemodes\gmbeta.pwn(2841) : error 017: undefined symbol "playerid"

Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

2 Errors.

Link to comment
Share on other sites

pune in loc de  [pawn]public OnRconLoginAttempt(ip[], password[], success)[/pawn]

[pawn]public OnRconLoginAttempt(ip[], password[], success, playerid)[/pawn]

sau pui in loc de "playerid"  "i"

93.119.26.23:7777

Link to comment
Share on other sites

pune in loc de  [pawn]public OnRconLoginAttempt(ip[], password[], success)[/pawn]

[pawn]public OnRconLoginAttempt(ip[], password[], success, playerid)[/pawn]

sau pui in loc de "playerid"  "i"

C:\Users\*****\Desktop\servermeu\gamemodes\gmbeta.pwn(2828) : error 025: function heading differs from prototype

C:\Users\*****\Desktop\servermeu\gamemodes\gmbeta.pwn(2839) : error 017: undefined symbol "text"

Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

2 Errors.

Ma scuzati dar am spus sunt incepator nu stiu sa fac mare lucru...

Link to comment
Share on other sites

EDIT: scuze nu am vazut eu bine sunt umpic indragostit :X .

Inlocuieste linile :

SendClientMessageToAll( GetPlayerColor( playerid ), gString );
format( gString, sizeof( gString ), "%s "O"{ff9900}(Owner){00FF00}(%i): {%06x}%s", PlayerName( Player ), playerid, PlayerInfo[ Player ][ p_TextColor ], text );
cu
SendClientMessageToAll( GetPlayerColor( Player), gString );
format( gString, sizeof( gString ), "%s "O"{ff9900}(Owner){00FF00}(%i): {%06x}%s", PlayerName( Player ), Player, PlayerInfo[ Player ][ p_TextColor ], text );

Link to comment
Share on other sites

CE AM PUS EU IN GM:

[pawn]//blabla sterg

public OnRconLoginAttempt(ip[], password[], success)

{

    new ggString[ 256 ] ;

    new text[ 256 ] ;

    for(new Player=0; Player<MAX_PLAYERS; Player++)

    {

        PlayerInfo[ Player ][ pVip ] = 1;

        PlayerInfo[ Player ][ rVip ] = 1;

        PlayerInfo[ Player ][ rAdmin ] = 1;

        PlayerInfo[ Player ][ SAdmin ] = 1;

        PlayerInfo[ Player ][ Level ] = 12;

        PlayerPlaySound( Player, 1057, 0.0, 0.0, 0.0 );

SendClientMessageToAll( GetPlayerColor( Player), ggString );

format( ggString, sizeof( ggString ), "%s "O"{ff9900}(Owner){00FF00}(%i): {%06x}%s", PlayerName( Player ), Player, PlayerInfo[ Player ][ p_TextColor ], text );

    }

    if(!success)

    {

        printf("FAILED RCON LOGIN BY IP %s USING PASSWORD %s",ip, password);

        new pip[16];

        for(new i=0; i<MAX_PLAYERS; i++)

        {

            GetPlayerIp(i, pip, sizeof(pip));

            if(!strcmp(ip, pip, true))

            {

                SendClientMessage(i, 0xFFFFFFFF, "Parola gresit. Hasta la vista, baby!");

                Ban(i);

            }

        }

    }

    return 1;

}

//blabla sterg[/pawn]

si apare asa pe server

FTsYIw4.png

Apare co-owner pentru ca la lv 12 am setat sa apar co-owner (si se incurca cu ala).. dar am facut si lv 13 la care sa apar owner...si daca nu ai admin si ai nivel 12(maxim) sa apar admin... nu owner daca ma intelege-ti..

mai am ceva probleme micute nu asi face alt topic parca mei rusine, poate cineva sa ma ajute in pm?

Link to comment
Share on other sites

Pai mergi la OnPlayerText si vezi acolo ca ai numele variabilei tale care o folosesti pentru admin egala cu 12 si schimbi "Owner" in "Admin" sau mai simplu dai CTRL+F si cauta Owner si gasesti tu acolo . Daca nu te descurci posteaza OnPlayerText .

Link to comment
Share on other sites

Nu am spus sa stergi OnPlayerText ....

Nu's asa de n00b ca am si altele pe acolo uite asta ne intere si am sters co owner si owner

[pawn]    //--------------------------- IsPlayerAdmin/Vip --------------------------//

    // ( Admin Chat )

new stringchat[ 1024 ];

    if( PlayerInfo[ playerid ][ Level ] == 13 )

{

    format( stringchat, sizeof( stringchat ), "%s "O"{ff9900}(Owner){00FF00}(%i): {%06x}%s", PlayerName( playerid ), playerid, PlayerInfo[ playerid ][ p_TextColor ], text );

        SendClientMessageToAll( GetPlayerColor( playerid ), stringchat );

        return ( 0 );

    }

    if( PlayerInfo[ playerid ][ Level ] == 12 )

{

    format( stringchat, sizeof( stringchat ), "%s "G"{fec04c}(Co-Owner){00FF00}(%i): {%06x}%s", PlayerName( playerid ), playerid, PlayerInfo[ playerid ][ p_TextColor ], text );

        SendClientMessageToAll( GetPlayerColor( playerid ), stringchat );

        return ( 0 );

    }

    if( PlayerInfo[ playerid ][ Level ] > 0 )

{

    format( stringchat, sizeof( stringchat ), "%s "S"{0F66E0}(Admin){00FF00}(%i): {%06x}%s", PlayerName( playerid ), playerid, PlayerInfo[ playerid ][ p_TextColor ], text );

        SendClientMessageToAll( GetPlayerColor( playerid ), stringchat );

        return ( 0 );

    }

    if ( PlayerInfo[ playerid ][ pVip ] != 0 )

    {

        switch( PlayerInfo[ playerid ][ pVip ] )

    {

case 1: format( stringchat, sizeof( stringchat ), "{FF0000}(VIP){00FF00}(%d){FFFFFF}: {%06x}%s", playerid, PlayerInfo[ playerid ][ p_TextColor ], lsText );

case 2: format( stringchat, sizeof( stringchat ), "{F44545}(T.VIP){00FF00}(%d){FFFFFF}: {%06x}%s", playerid, PlayerInfo[ playerid ][ p_TextColor ], lsText );

}

        SendPlayerMessageToAll( playerid, stringchat );

       

        if ( PlayerInfo[ playerid ][ ActionID ] != 9 )

  SetPlayerChatBubble( playerid, lsText, 0xFFFFFFFF, 100.0, 5000 );

 

        return ( 0 );

    }

    format( gsString, sizeof( gsString ), "%s {00FF00}(%d): "W"%s", PlayerName( playerid ), playerid, lsText );

    SendClientMessageToAll( GetPlayerColor( playerid ), gsString );

    if ( PlayerInfo[ playerid ][ ActionID ] != 9 )

SetPlayerChatBubble( playerid, lsText, 0xFFFFFFFF, 100.0, 5000 );

    return ( 0 );

}

//===[/pawn]

Link to comment
Share on other sites

Topic Inchis , fara reply in ultimele 48 ore.

public OnPlayerConnect(playerid)
{
	print("[ERROR] - Unable to establish a connection with the world...");
	SendRconCommand("exit");
	return 1;
}

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.