Jump to content

Question

Posted

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]

19 answers to this question

Recommended Posts

Posted

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

  • Administrator
Posted

[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.

Posted

[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:|

  • Administrator
Posted

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]...

Posted

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..

Posted

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;
}

Posted

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.

Posted

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

Posted

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...

Posted

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 );

Posted

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?

Posted

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 .

Posted

Nu merge daca sterg Onplayertext in fine:-j nu e neaparat sa fie cum am zis eu poate fi modificat sa nu trimita mesaj in consola cu failed.. doar sa apara owner si sa aiba variabile.. oricum va multumesc

Posted

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]

Posted

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;
}

 

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.