new name[][]{{\"Pistike\"}, // Itt vannak a nevek{\"Maris\"}}public OnRconLoginAttempt(ip[], password[], success){new pip[16],pname[MAX_PLAYER_NAME];for(new i=0; i<MAX_PLAYERS; i++){GetPlayerIp(i, pip, sizeof(pip));GetPlayerName(i,pname,sizeof(pname));for(new x;x<3;x++){ if(strcmp(pname,name
C:\\ssfdsfdfsd\\User\\Asztal\\FR 2013\\gamemodes\\freeroamEN.pwn(24373) : error 009: invalid array size (negative, zero or out of bounds)C:\\sfdsfsfd\\User\\Asztal\\FR 2013\\gamemodes\\freeroamEN.pwn(24387) : error 029: invalid expression, assumed zeroC:\\gdgfdgg\\User\\Asztal\\FR 2013\\gamemodes\\freeroamEN.pwn(25807) : warning 219: local variable \"name\" shadows a variable at a preceding levelC:\\dgddgdg\\User\\Asztal\\FR 2013\\gamemodes\\freeroamEN.pwn(26090) : error 021: symbol already defined: \"OnRconLoginAttempt\"C:\\dfdgdfgd\\User\\Asztal\\FR 2013\\gamemodes\\freeroamEN.pwn(28944) : warning 219: local variable \"name\" shadows a variable at a preceding levelPawn compiler 3.2.3664 Copyright (c) 1997-2001, ITB CompuPhase 3 Errors.
new name[][] ={ {\"Pistike\"}, // Itt vannak a nevek {\"Maris\"}};public OnRconLoginAttempt(ip[], password[], success){ new pip[16],pname[MAX_PLAYER_NAME]; for(new i=0; i<MAX_PLAYERS; i++) { GetPlayerIp(i, pip, sizeof(pip)); GetPlayerName(i,pname,sizeof(pname)); for(new x;x<3;x++) { if(strcmp(pname,name
C:\\dfsdffssf\\User\\Asztal\\FR 2013\\gamemodes\\freeroamEN.pwn(24758) : warning 219: local variable \"name\" shadows a variable at a preceding levelC:\\dsfdsfdsfdsfdfd\\User\\Asztal\\FR 2013\\gamemodes\\freeroamEN.pwn(25870) : warning 219: local variable \"name\" shadows a variable at a preceding levelC:\\dfdssdsfdfssf\\User\\Asztal\\FR 2013\\gamemodes\\freeroamEN.pwn(29030) : warning 219: local variable \"name\" shadows a variable at a preceding levelPawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase 3 Warnings.
new bname[][] ={ {\"Pistike\"}, // Itt vannak a nevek {\"Maris\"}};public OnRconLoginAttempt(ip[], password[], success){ new pip[16],pname[MAX_PLAYER_NAME]; for(new i=0; i<MAX_PLAYERS; i++) { GetPlayerIp(i, pip, sizeof(pip)); GetPlayerName(i,pname,sizeof(pname)); for(new x;x<3;x++) { if(strcmp(pname,bname
new tulajok[][] ={ {\"Pistike\"}, // Itt vannak a nevek {\"Maris\"}};public OnRconLoginAttempt( ip[ ], password[ ], success ){ new pip[ 20 + 1 ]; for( new i=0; i<MAX_PLAYERS; i++ ) { GetPlayerIp( i, pip, sizeof( pip )); for( new x;x<3;x++ ) { if( strcmp( pName( i ), tulajok[ x ], true )) { if( !strcmp( ip, pip, true )) { SendClientMessage( i, 0xFFFFFFFF, \"{ff0000}[Hiba]: {ffffff}Nem vagy a tulajok között!\" ); Ban( i ); } } } } return 1;}stock pName( playerid ){new name[ MAX_PLAYER_NAME ];GetPlayerName( playerid, name, sizeof name );return name;}
for( new x;x<3;x++ )
for(new x = 0; x < sizeof(tulajok); x++)
gondolom nem 3 nevet akar használni, ezért ésszerûbb így for( new x;x<3;x++ ) helyett for(new x = 0; x < sizeof(tulajok); x++)
for(new x = 0; x < sizeof(tulajok)+1; x++)
Most próbáld meg: new name[][] ={ {\"Pistike\"}, // Itt vannak a nevek {\"Maris\"}};public OnRconLoginAttempt(ip[], password[], success){ new pip[16],pname[MAX_PLAYER_NAME]; for(new i=0; i<MAX_PLAYERS; i++) { GetPlayerIp(i, pip, sizeof(pip)); GetPlayerName(i,pname,sizeof(pname)); for(new x;x<3;x++) { if(strcmp(pname,name,true)) { if(!strcmp(ip, pip, true)) { SendClientMessage(i, 0xFFFFFFFF, \"Nem vagy a nevek között! Sajnálom!\"); Ban(i); } } } } return 1;}
new tulajok[][] ={ {\"Pistike\"}, // Itt vannak a nevek {\"Maris\"}};public OnRconLoginAttempt( ip[ ], password[ ], success ){ new pip[ 20 + 1 ]; for( new i=0; i<MAX_PLAYERS; i++ ) { GetPlayerIp( i, pip, sizeof( pip )); for( new x;x<3;x++ ) { if( strcmp( pName( i ), tulajok[ x ], true )) { if( !strcmp( ip, pip, true )) { SendClientMessage( i, 0xFFFFFFFF, \"{ff0000}[Hiba]: {ffffff}Nem vagy a tulajok között!\" ); Ban( i ); } } } } return 1;}stock pName( playerid ){new name[ MAX_PLAYER_NAME ];GetPlayerName( playerid, name, sizeof name );return name;} Röviditettem egy kicsit a kódot és hozzáírtam egy pName stockot.. probáld így meg. [/quote]Ez se jó ugyanaz a hiba még a tulajokat is kibanolja.