Sle|D Posted May 16, 2014 Posted May 16, 2014 Nick: Sle|dProblema: Nu merge, nu cred ca am asezat bineErori / 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]
Sle|D Posted May 16, 2014 Author Posted May 16, 2014 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 zeroC:\Users\*****\Desktop\ServerulBETA\gamemodes\GMBETA.pwn(3719) : fatal error 107: too many error messages on one line
Administrator WopsS Posted May 16, 2014 Administrator Posted May 16, 2014 [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.
Sle|D Posted May 16, 2014 Author Posted May 16, 2014 [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.inie bine?tot i-mi da eroareC:\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 zeroC:\Users\*******\Desktop\ServerulBETA\gamemodes\GMBETA.pwn(2839) : fatal error 107: too many error messages on one lineStiam si eu crebuie aia dar nu stiu cum:|
Administrator WopsS Posted May 17, 2014 Administrator Posted May 17, 2014 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]...
CrystyXSR Posted May 17, 2014 Posted May 17, 2014 pui la inceput[pawn] new stringchat[128], Player;[/pawn] 93.119.26.23:7777
Sle|D Posted May 18, 2014 Author Posted May 18, 2014 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 levelwarning 219: local variable "Player" shadows a variable at a preceding levelwarning 219: local variable "Player" shadows a variable at a preceding levelwarning 219: local variable "Player" shadows a variable at a preceding levelwarning 219: local variable "Player" shadows a variable at a preceding levelwarning 219: local variable "Player" shadows a variable at a preceding levelwarning 219: local variable "Player" shadows a variable at a preceding levelwarning 219: local variable "Player" shadows a variable at a preceding levelwarning 219: local variable "Player" shadows a variable at a preceding levelwarning 219: local variable "Player" shadows a variable at a preceding levelwarning 219: local variable "Player" shadows a variable at a preceding levelwarning 219: local variable "Player" shadows a variable at a preceding levelwarning 219: local variable "Player" shadows a variable at a preceding levelwarning 219: local variable "Player" shadows a variable at a preceding levelwarning 219: local variable "Player" shadows a variable at a preceding levelwarning 219: local variable "Player" shadows a variable at a preceding levelwarning 219: local variable "Player" shadows a variable at a preceding levelwarning 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 CompuPhase6 Errors.pui la inceput[pawn] new stringchat[128], Player;[/pawn]tot nu merge..
andy47 Posted May 18, 2014 Posted May 18, 2014 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; }
Sle|D Posted May 19, 2014 Author Posted May 19, 2014 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 CompuPhase2 Errors.
CrystyXSR Posted May 19, 2014 Posted May 19, 2014 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
Sle|D Posted May 19, 2014 Author Posted May 19, 2014 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 prototypeC:\Users\*****\Desktop\servermeu\gamemodes\gmbeta.pwn(2839) : error 017: undefined symbol "text"Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase2 Errors.Ma scuzati dar am spus sunt incepator nu stiu sa fac mare lucru...
andy47 Posted May 19, 2014 Posted May 19, 2014 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 );
Sle|D Posted May 19, 2014 Author Posted May 19, 2014 CE AM PUS EU IN GM:[pawn]//blabla stergpublic 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 serverApare 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?
andy47 Posted May 19, 2014 Posted May 19, 2014 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 .
Sle|D Posted May 20, 2014 Author Posted May 20, 2014 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
Sle|D Posted May 20, 2014 Author Posted May 20, 2014 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]
andy47 Posted May 20, 2014 Posted May 20, 2014 Pai nah inloc de Co-Owner si Owner scri Admin si acuma cand esti logat ca rcon iti arata Owner .
Ph0eniX Posted May 23, 2014 Posted May 23, 2014 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; }
Question
Sle|D
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