Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ////////////////////////////////////////////////////////////////////////////////
- ////////////////////////////////////////////////////////////////////////////////
- ///// //////
- ///// Proteger RCON Por Nick //////
- ///// www.ips-team.blogspot.com //////
- ///// //////
- ///// //////
- ///// Por DraKiNs //////
- ////////////////////////////////////////////////////////////////////////////////
- ////////////////////////////////////////////////////////////////////////////////
- #include <a_samp>
- #define iMaxPlayers (500)
- new
- iPlayers[iMaxPlayers],
- iCount = -1,
- sName[iMaxPlayers][24],
- sAndress[iMaxPlayers][20],
- bool:bCaraProibido = true;
- new sNicksRcon[][] =
- {
- "DraKiNsGostoso",
- "DraKiNsTesao",
- "DraKiNsLindo",
- "DraKiNsMacho",
- "DraKiNsHomem",
- "DraKiNsTeste"
- };
- public OnRconLoginAttempt(ip[], password[], success)
- {
- for(new i = 0,i__c; i__c != iCount; i = iPlayers[i__c], ++i__c) {
- if(!strcmp(sAndress[i],ip,true)) {
- for(new a; a != sizeof sNicksRcon; ++a) {
- if(!strcmp(sName[i],sNicksRcon[a],true)) {
- bCaraProibido = false;
- }
- }
- if(bCaraProibido) {
- SendClientMessage( i, 0x9C9C9CFF, "[Info] Seu Nick não é permitido na RCON (Kick) ");
- return Kick(i);
- }
- }
- }
- return true;
- }
- ////////////////////////////////////////////////////////////////////////////////
- // FoReX Players Beta (adptado para este filterscript)
- //
- // Is a Version Beta of FoReX to Players (no generic arrays ..)
- //
- // By [iPs]DraKiNs
- // Thanks Toribio
- //
- ////////////////////////////////////////////////////////////////////////////////
- public OnPlayerConnect(playerid) return __OnPlayerConnect(playerid);
- public OnPlayerDisconnect(playerid,reason) return __OnPlayerDisconnect(playerid);
- stock __OnPlayerConnect(playerid)
- {
- GetPlayerName(playerid,sName[playerid], 23);
- GetPlayerIp(playerid,sAndress[playerid], 20);
- return iPlayers[++iCount] = playerid;
- }
- stock __OnPlayerDisconnect(playerid)
- {
- for(new i; i != sizeof iPlayers; i++) {
- if(i && !iPlayers[i]) {
- iCount = i;
- break;
- }
- if(iPlayers[i] == playerid) iPlayers[i] = 0;
- }
- BubbleSort(iPlayers,sizeof iPlayers);
- sAndress[playerid][0] = EOS;
- return sName[playerid][0] = EOS;
- }
- BubbleSort(Array[],iSize)
- {
- new
- iLoop = 0x0,
- iCircuito = 0x0,
- iTemp = 0x0;
- while(++iLoop < iSize) {
- iCircuito = (0x-1);
- while(++iCircuito < iLoop)
- iTemp =
- ((Array[iLoop] > Array[iCircuito] ) ? ( iTemp = Array[iLoop], Array[iLoop] = Array[iCircuito], Array[iCircuito] = iTemp) : (0x0));
- }
- return Array;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement