Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #if defined FILTERSCRIPT
- #undef MAX_PLAYERS
- #define 50
- #endif
- public OnRconLoginAttempt(ip[], password[], success)
- {
- new cip[16],playerid;
- for(new i=0; i<MAX_PLAYERS; i++){
- if(IsPlayerConnected(i)){
- GetPlayerIp(i,cip,16);
- if(!strcmp(ip, cip, true)){
- playerid=i;
- break;
- }}}
- if(!success){
- new msg[100];
- format(msg,100,"Falha no rcon login pelo ID: %d(IP: %s) usando a senha: '%s'",playerid,ip,password);
- AdminMSG(msg);
- }
- else{
- new msg[100];
- format(msg,100,"[ATENÃO] ID: %d(IP: %s) Logou Na RCON",playerid, ip);
- AdminMSG(msg);
- }
- return 1;
- }
- stock AdminMSG(string[]){
- for(new Adm=0; Adm<MAX_PLAYERS; Adm++)
- if(IsPlayerConnected(Adm))
- if(IsPlayerAdmin(Adm))
- SendClientMessage(Adm,0x5CAE51AA,string);
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement