Results 1 to 4 of 4

Thread: SuperSlay [v3]

  1. #1
    Major
    Join Date
    Dec 2013
    Age
    30
    Posts
    561
    Karma
    27

    SuperSlay [v3]

    SuperSlay v3

    Odlucio sam da izbacim novu verziju, one stare su kodirane pre 2-3god i lose su napisane, ovo je dosta bolje i bez bagova(ja nisam otkrio nikakve bagove). Otvorio sam novu temu jer je prosla pretrpana spamom. Za sada ne radi za IP, ali cu odraditi ovih dana da podrzava i na IP. U koliko zelite da neko ima vecni slay, unesite njegov steam id u configs/super_slays.ini fajl, jer komande koje se kucaju u konzoli vaze samo dok se ne promeni mapa!!
    amx_sslay nick - daje veciti slay koji traje samo jednu mapu.
    amx_unsslay nick - skida vecity slay koji traje samo jednu mapu(ako je nekom upisan steamid u configs/super_slays.ini, kada se mapa promeni on ce i dalje imati veciti slay)

    SMA:
    Code:
    #include <amxmodx>
    #include <amxmisc>
    #include <hamsandwich>
    
    new user_steamid[33][33];
    new Trie:sslays;
    
    public plugin_init() {
    	register_plugin("SuperSlay", "3.0", "DecaK")
    	register_concmd("amx_sslay", "cmd_Sslay", ADMIN_BAN, "<nick> - Daje SuperSlay.")
    	register_concmd("amx_unsslay", "cmd_UnSslay", ADMIN_BAN, "<nick> - Daje SuperSlay.")
    	RegisterHam(Ham_Spawn, "player", "on_spawn", 1)
    	sslays = TrieCreate();
    	ucitajpodatke();
    }
    
    public cmd_Sslay(id,level,cid) {
    	if(!cmd_access(id, level, cid, 2))
    		return PLUGIN_HANDLED
    	new arg[32]
    	read_argv(1, arg, charsmax(arg))
    	new igrac = cmd_target(id, arg, CMDTARGET_OBEY_IMMUNITY | CMDTARGET_ALLOW_SELF)
    	if(!is_user_connected(igrac))
    		return PLUGIN_HANDLED;
    	user_kill(igrac)	
    	TrieSetCell(sslays, user_steamid[igrac], 1)
    	return PLUGIN_CONTINUE;
    }
    
    public cmd_UnSslay(id,level,cid) {
    	if(!cmd_access(id, level, cid, 2))
    		return PLUGIN_HANDLED
    	new arg[32]
    	read_argv(1, arg, charsmax(arg))
    	new igrac = cmd_target(id, arg, CMDTARGET_OBEY_IMMUNITY | CMDTARGET_ALLOW_SELF)
    	if(!is_user_connected(igrac))
    		return PLUGIN_HANDLED;
    	if(TrieKeyExists(sslays, user_steamid[igrac]))
    		TrieDeleteKey(sslays, user_steamid[igrac]);
    	return PLUGIN_CONTINUE;
    }
    
    public on_spawn(id)
    	if(is_user_alive(id) && TrieKeyExists(sslays, user_steamid[id]))
    		user_kill(id);
    
    public client_putinserver(id)
    	get_user_authid(id, user_steamid[id], 33)
    
    ucitajpodatke() {
    	new linija[101];
    	get_configsdir(linija, charsmax(linija))
    	formatex(linija, charsmax(linija), "%s/super_slays.ini", linija)
    	new f = fopen(linija, "rt");
    	if(!f) {
    		write_file(linija, "")
    		return PLUGIN_HANDLED;
    }
    	while(!feof(f)) {
    		fgets(f, linija, charsmax(linija));
    		TrieSetCell(sslays, linija, 1)
    }
    	fclose(f);
    }

  2. #2
    Mladen98
    Guest

    Re: SuperSlay [v3]

    Lepo

  3. #3
    Administrator Airbrate023's Avatar
    Join Date
    Nov 2011
    Location
    Serbia, Zrenjanin
    Age
    31
    Posts
    25,474
    Karma
    154

    Re: SuperSlay [v3]

    Lepo, lepo.
    Ovo je za cheatere odlicno
    - Antonio
    - KGB Hosting Chief Operating Officer

  4. #4
    Major
    Join Date
    Dec 2013
    Age
    30
    Posts
    561
    Karma
    27

    Re: SuperSlay [v3]

    Hvala

    @air Moze i za to, mada vise je za one smarace, da olade malo

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •