Raised This Month: $170 Target: $400
 42% 

Plugin Error.


Post New Thread Reply   
 
Thread Tools Display Modes
maqi
Senior Member
Join Date: Apr 2017
Location: Serbia
Old 07-20-2018 , 07:53   Re: Plugin Error.
Reply With Quote #31

This should fix it, but I have no idea honestly

PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <hamsandwich>

#define PLUGIN "Retry Transfer"
#define VERSION "1.0"
#define AUTHOR "Eos"

#define MAX_IP 25
#define RECONNECT_TIME 60.0
#define ADMIN_FLAG ADMIN_BAN

new memory[MAX_IP][32];

public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
}
public 
client_disconnect(id) {
    new 
ip[32];
    
get_user_ip(idip311);
    new 
slot find_empty_memory_slot();
    
formatex(memory[slot],31,"%s",ip);
    
set_task(RECONNECT_TIME"delete_slot",1071 slot);
}
public 
client_putinserver(id) {
    new 
ip[32];
    
get_user_ip(idip311)
    for(new 
ii<MAX_IP;i++) {
        if(
equal(ipmemory[i])) {
            
set_task(5.0,"show_message",1881+id)
            
            
set_task(7.0,"transfer",1923+id)
            
set_task(0.1,"delete_slot"1071 );
            
            break;
        }
    }
}
public 
transfer(id) {
    
id -= 1923;
    if(
is_user_connected(id)) {
        
set_hudmessage(2552552550.050.7205.010.02.00.153)
        
show_hudmessage(id"Bu Serverda Retry Cekmek Yasak ! Uyarı Terorist Takimina Transfer Edildiniz !");
        
cs_set_user_team(idCS_TEAM_T)
        
ExecuteHamB(Ham_CS_RoundRespawn,id)
    }
}
public 
show_message(id) {
    
    
id -= 1881;
    if(
is_user_connected(id)) {
        new 
name[32]
        
get_user_name(id,name,31);
        new 
players[32],inum;
        
get_players(players,inum)
        for(new 
i;i<inum;i++) {
            if(
access(players[i],ADMIN_FLAG)) {
                
client_print(players[i],print_chat,"[RETRY DETECTED] %s Adli Oyuncu Retry Cekti. Simdi Terorist Takimina Transfer Ediliyor...",name);
            }
        }
    }
}
public 
delete_slot(slotid) {
    
slotid -= 1071;
    
memory[slotid][0] = 0;
}
find_empty_memory_slot() {
    for(new 
ii<MAX_IP;i++) {
        if(!
memory[i][0]) return i;
    }
    
log_amx("[MEMORY ERROR] Reconnect ip hafiza birimi doldu ! Lutfen MAX_IP degerini yukseltin.");
    return 
MAX_IP;

__________________
stuff
maqi is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 16:03.


Powered by vBulletin®
Copyright ©2000 - 2018, vBulletin Solutions, Inc.
Theme made by Freecode