What's Wrong??
#1

Hello in my GM I have a Script This
pawn Код:
if ( ServerInfo[ ConnectMessages ] == 1 )
    {
        new str[ 256 ], pAKA[ 256 ];
        pAKA = dini_Get( "ladmin/config/aka.txt", tmp3 );
        if ( strlen( pAKA ) < 3 ) format( str, sizeof( str ),"*** {FFFF00}%s(%d) {ACACAC}has joined the server", PlayerName( playerid ), playerid );
        else if ( !strcmp( pAKA, PlayerName( playerid ), true ) ) format( str, sizeof( str ),"*** {FFFF00}%s(%d) {ACACAC}has joined the server", PlayerName( playerid ), playerid );
        else format( str, sizeof( str ),"*** {FFFF00}%s(%d) {ACACAC}has joined the server ( AKA: {FFFF00}%s{ACACAC} )", PlayerName( playerid ), playerid, pAKA );

        for ( new i = 0; i < MAX_PLAYERS; i++ ) if ( IsPlayerConnected( i ) && playerid != i )
        {
            if ( PlayerInfo[ i ][ Level ] > 2 ) SendClientMessage( i, COLOR_GREY, str );
            else
            {
                format( str, sizeof( str ),"*** {FFFF00}%s(%d) {ACACAC}has joined the server", PlayerName( playerid ), playerid );
                SendClientMessage( i, COLOR_GREY, str );
            }
        }
    }
    if ( dUserINT( PlayerName2( playerid ) ).( "Banned" ) == 1 )
    {
        new str2[ 256 ];
        SendClientMessage( playerid, -1, " " );
        SendClientMessage( playerid, -1, " " );
        SendClientMessage( playerid, -1, " " );
        SendClientMessage( playerid, -1, " " );
        SendClientMessage( playerid, -1, " " );
        SendClientMessage( playerid, -1, " " );
        SendClientMessage( playerid, -1, " " );
        SendClientMessage( playerid, COLOR_GREY, "This name is {FFFF00}BANNED {ACACAC}from this server!" );
        Kick( playerid );
       
        format( str2, sizeof( str2 ),"*** {FFFF00}%s (ID:%d) {ACACAC}was auto kicked. Reason: {33CCFF}Name banned from server!", PlayerName( playerid ), playerid );
        SendClientMessageToAll( COLOR_GREY, str2 );
        print( str2 );
        SaveToFile( "KickLog", str2 );
    }
    if ( ServerInfo[ NameKick ] == 1 )
    {
        for ( new s = 0; s < BadNameCount; s++ )
        {
            if ( !strcmp( BadNames[ s ], PlayerName( playerid ), true ) )
            {
                SendClientMessage( playerid, COLOR_GREY, "Your name is on our {FFFF00}black list, {ACACAC}you have been kicked." );
                format( string, sizeof( string ),"*** {FFFF00}%s (ID:%d) {ACACAC}was auto kicked. (Reason: {33CCFF}Forbidden name{ACACAC})",PlayerName( playerid ), playerid );
                SendClientMessageToAll( COLOR_GREY, string );
                print( string );
                SaveToFile( "KickLog", string );  Kick( playerid );
                return 1;
            }
        }
    }
    if ( ServerInfo[ PartNameKick ] == 1 )
    {
        for ( new s = 0; s < BadPartNameCount; s++ )
        {
            new pos;
            while ( ( pos = strfind( PlayerName( playerid ), BadPartNames[ s ], true ) ) != -1 ) for ( new i = pos, j = pos + strlen( BadPartNames[ s ] ); i < j; i++ )
            {
                SendClientMessage( playerid, COLOR_GREY, "Your name is not allowed on this server, you have been kicked." );
                format( string, sizeof( string ),"**** {FFFF00}%s (ID:%d) {ACACAC}was auto kicked. (Reason: {33CCFF}Forbidden name{ACACAC})",PlayerName( playerid ), playerid );
                SendClientMessageToAll( COLOR_GREY, string );  print( string );
                SaveToFile( "KickLog", string );  Kick( playerid );
                return 1;
            }
        }
    }
    if ( ServerInfo[ Locked ] == 1 )
    {
        PlayerInfo[ playerid ][ AllowedIn ] = false;
        SendClientMessage( playerid, COLOR_ULTRARED,"Server is Locked! You have {FFFF00}20 {E60000}seconds to enter the server password before you are kicked!" );
        SendClientMessage( playerid, COLOR_ULTRARED,"Type {FFFFFF}/password [password]" );
        LockKickTimer[ playerid ] = SetTimerEx( "AutoKick", 20000, 0, "i", playerid );
    }
    if ( strlen( dini_Get( "ladmin/config/aka.txt", tmp3 ) ) == 0 ) dini_Set( "ladmin/config/aka.txt", tmp3, PlayerName( playerid ) );
    else
    {
        if ( strfind( dini_Get("ladmin/config/aka.txt", tmp3 ), PlayerName( playerid ), true ) == -1 )
        {
            format( string, sizeof( string ),"%s,%s", dini_Get("ladmin/config/aka.txt", tmp3 ), PlayerName( playerid ) );
            dini_Set( "ladmin/config/aka.txt", tmp3, string );
        }
    }
   
    SendClientMessage( playerid, COLOR_WHITE,"Welcome to {0000BB}Romania {FFFF00}Apocalypse {E60000}Stunt {FFFFFF}for more please type {33CCFF}/help{FFFFFF}!" );
    SendClientMessage( playerid, COLOR_WHITE,"Use {E60000}/house {FFFFFF}to find information on our houses" );
    SendClientMessage( playerid, COLOR_WHITE,"Type {33CCFF}/cmds {FFFFFF}for all commands !" );
    SendClientMessage( playerid, COLOR_WHITE,"Use {E60000}/ro {FFFFFF}if you are român or {E60000}/eng {FFFFFF}if you are English." );
    SendClientMessage( playerid, COLOR_WHITE,"Type {33CCFF}/teles {FFFFFF}to see teleportation on the server." );
    SendClientMessage( playerid, COLOR_WHITE,"If you need a vehicle type {E60000}/V {FFFFFF}and if you want to tune cars write {E60000}/tune" );
   
    TextDrawShowForPlayer( playerid, Weilcome );
    TextDrawShowForPlayer( playerid, TO );
    TextDrawShowForPlayer( playerid, Steam1 );
    TextDrawShowForPlayer( playerid, Steam2 );
    TextDrawShowForPlayer( playerid, Steam3 );
    TextDrawShowForPlayer( playerid, HelpT );
    TextDrawShowForPlayer( playerid, RulesT );
    TextDrawShowForPlayer( playerid, CmdsT );
    TextDrawShowForPlayer( playerid, TelesT );
    TextDrawShowForPlayer( playerid, Steluta1 );
    TextDrawShowForPlayer( playerid, Steluta2 );
   
    if ( !udb_Exists( PlayerName2( playerid ) ) )
    {
        new rstr[ 256 ];
        format( rstr, sizeof( rstr ), "{FFFFFF}Welcome {FFFF00}%s {FFFFFF}on {0000BB}Romania {FFFF00}Apocalypse {E60000}Stunt\n\n{FFFFFF}Please register to save your stats!: {FF5500}Score, Money, Coins...\n{FF5500}Password:", PlayerName( playerid ) );
        ShowPlayerDialog( playerid, RegDialog, DIALOG_STYLE_INPUT, "{E60000}Register", rstr,"Register", "Let's Play" );
    }
    else
    {
        PlayerInfo[ playerid ][ Registered ] = 1;
       
        format( file, sizeof( file ),"/ladmin/users/%s.sav", udb_encode( PlayerName( playerid ) ) );
        new tmp2[ 256 ]; tmp2 = dini_Get( file,"ip" );
        if ( ( !strcmp( tmp3, tmp2, true ) ) && ( ServerInfo[ AutoLogin ] == 1 ) )
        {
            LoginPlayer( playerid );
            if ( PlayerInfo[ playerid ][ Level ] > 0 )
            {
                format( string, sizeof( string ),"\t\t{ACACAC}ACCOUNT:\n{FFFFFF}You have been automatically LoggedIn\n\n{FFFFFF}Admin Level: {00FF00}%d {FFFFFF}\n\n{FFFFFF}V.I.P Level: {00FF00}%d", PlayerInfo[ playerid ][ Level ], PlayerInfo[ playerid ][ pVip ] );
                ShowPlayerDialog( playerid, OnLogin, DIALOG_STYLE_MSGBOX, "{00FF00}Logged in", string, "Quit", "" );
            }
            else ShowPlayerDialog( playerid, OnLogin, DIALOG_STYLE_MSGBOX, "{00FF00}Logged in", "\t\t{ACACAC}ACCOUNT:\n{FFFFFF}You have been automatically LoggedIn\n\n{FFFFFF}Admin Level: {00FF00}0 {FFFFFF}\n\n{FFFFFF}V.I.P Level: {00FF00}0", "Quit", "" );
        }
        else SendClientMessage( playerid, COLOR_GREEN, "ACCOUNT: {FFFFFF}This nickname is registed, you can now login by typing {00FF00}/login [Password]" );
    }
    return 1;
}
pawn Код:
And Gives This Error:
[/quote] C:\Users\David\Desktop\RAS(1).pwn(186) : error 017: undefined symbol "ServerInfo"
C:\Users\David\Desktop\RAS(1).pwn(186) : error 017: undefined symbol "ConnectMessages"
C:\Users\David\Desktop\RAS(1).pwn(186) : error 029: invalid expression, assumed zero
C:\Users\David\Desktop\RAS(1).pwn(186) : fatal error 107: too many error messages on one line
Reply
#2

what's the 186 line of ServerInfo?
Reply
#3

pawn Код:
if ( ServerInfo[ ConnectMessages ] == 1 )
I think you need to add a ; to the end of that
Reply
#4

This is:
pawn Код:
186 if ( ServerInfo[ ConnectMessages ] == 1 )
Reply
#5

Quote:
Originally Posted by Pawnstar
Посмотреть сообщение
pawn Код:
if ( ServerInfo[ ConnectMessages ] == 1 )
I think you need to add a ; to the end of that
Don't work.
Reply
#6

Try change

pawn Код:
if ( PlayerInfo[ i ][ Level ] > 2 ) SendClientMessage( i, COLOR_GREY, str );
too

pawn Код:
if ( PlayerInfo[ 0 ][ Level ] > 2 ) SendClientMessage( i, COLOR_GREY, str );
Also maybe need to include <serverinfo>
and include <connectmessages>

im a new scripter so im not 100% but it may work make sure you back up first
Reply
#7

Where I can find serverinfo.inc and conectmessages.inc?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)