Back to L E V I N's profile
L E V I N

Posts by L E V I N

713 posts

  1. #341
    Reply in Plugins

    Este un plugin simplu, dar foarte eficient, care nu afectează cu nimic jucătorii reali, doar pe cei care încearcă să fure SteamID-ul cuiva de pe server, sau folosește SteamID Changer

     

    Spoiler
    
    #include <amxmodx>
    
    #if !defined MAX_PLAYERS
    const MAX_PLAYERS = 32;
    #endif
    
    #if !defined MAX_AUTHID_SIZE
    const MAX_AUTHID_SIZE = 64;
    #endif
    
    new g_lastPlayerUserId[MAX_PLAYERS + 1] = {-1, ...};
    
    public plugin_init() {
    	register_plugin("Check for duplicate AuthID", "1.0", "PRoSToC0der");
    }
    
    public client_authorized(playerEntIndex) {
    	static currentAuthID[MAX_AUTHID_SIZE];
    	currentAuthID = GetPlayerAuthID(playerEntIndex);
    	
    	if (!ContainDigits(currentAuthID)) {
    		return;
    	}
    	
    	new playerMaxCount = get_maxplayers();
    	for (new i = 1; i <= playerMaxCount; i++) {
    		if (!IsPlayerAuthorized(i)) {
    			continue;
    		}
    		if (equal(currentAuthID, GetPlayerAuthID(i))) {
    			server_cmd("kick #%d AuthID %s is already in use on this server", get_user_userid(playerEntIndex), currentAuthID);
    			return;
    		}
    	}
    	
    	g_lastPlayerUserId[playerEntIndex] = get_user_userid(playerEntIndex);
    }
    
    public client_disconnect(playerEntIndex) {
    	g_lastPlayerUserId[playerEntIndex] = -1;
    }
    
    IsPlayerAuthorized(playerEntIndex) {
    	return g_lastPlayerUserId[playerEntIndex] != -1 && g_lastPlayerUserId[playerEntIndex] == get_user_userid(playerEntIndex);
    }
    
    GetPlayerAuthID(playerEntIndex) {
    	static authID[MAX_AUTHID_SIZE];
    	get_user_authid(playerEntIndex, authID, charsmax(authID));
    	return authID;
    }
    
    ContainDigits(const str[]) {
    	for (new i = 0; str[i] != EOS; i++) {
    		if (isdigit(str[i])) {
    			return true;
    		}
    	}
    	
    	return false;
    }
  2. #342
  3. #343
  4. #344
  5. #345
  6. #346
  7. #347
    Cerere avatar steam CosmiN
    Reply in Requests Archive

    Acu fiind vorba între noi..nici eu nu înțeleg ce și cum vrei. Voiam să-ți fac eu, da...înțeleg tot. Dacă vrei ajutor, trebuie să vi direct pe „tavă”, și să explici EXACT ce vrei.

  8. #348
    Propunere - SmileQ
    Reply in Proposals & Suggestions

    Sunt curios cine „abuzează”. Aștept pm(-uri), cu dovezi. Oricum am mai „scăzut” like-urile & dislike-urile care se pot da într-un interval de 24h(1 zi)

  9. #349
  10. #350
  11. #351
  12. #352
  13. #353
  14. #354
  15. #355
  16. #356
  17. #357
  18. #358
  19. #359
  20. #360