←  Pluginy

AMXX.pl: Support AMX Mod X i SourceMod

»

Modyfikacja
[ROZWIĄZANE] Dostanie He + Def po uplywie...

Zablokowany

BasurerO - zdjęcie BasurerO 14.01.2013

Witam. Wygenerowałem sobie VIP'a tylko że miał on być na serwer Paintball ale ten mod tak jak by kasuje to co dostaniesz na początku rundy i chodzi o to żeby do tego VIP'a dodać opcję ze gracz dostanie HE i Defa po uplywie 6 sek. od rozpoczęcia rundy. z góry dziękuje ;)

Załączone pliki

  • Załączony plik  vip.sma   901 bajtów   36 Ilość pobrań
Odpowiedz

GT Team - zdjęcie GT Team 14.01.2013

http://wklejto.pl/145645

nie testowane :D
Odpowiedz

Andrzej12345 - zdjęcie Andrzej12345 14.01.2013

/*
Nade giver 1.2 by Lulu the hero
This plugin automatically gives a every alive player grenades( amounts according to cvars )
Counter Strike required
Can be used with any plugin(the most fun is at deathmatch games)
Cvars:
  nadegive_he,nadegive_flash,nadegive_smoke - amount of grenades to give
  nadegive_delay - afterspawn delay of grenade giving

[1.2]Optimized code by: ConnorMcLeod - thanks!
[1.1]Changed event ResetHud(to detect spawn) to Ham_Spawn
[1.0]Main code created
*/
#include <amxmodx>
#include <cstrike>
#include <fun>
#include <hamsandwich>

#pragma semicolon 1

//defaults cvar values - DON'T EDIT THIS HERE, USE THE CONFIG FILE(amxx.cfg)!
#define d_delay "0.5"
#define d_givehe "0"
#define d_giveflash "1"
#define d_givesmoke "1"
#define flaga ADMIN_RESERVATION

//pcvars
new g_givedelay;    //delay from spawn in seconds

enum _:Nades {
    HeGrenade,
    FlashBang,
    SmokeGrenade
}

new g_pCvar[Nades];

public plugin_init()
{
    register_plugin("NadeGiver","1.2","Lulu the hero");
    
    //let's make cvars
    g_givedelay = register_cvar("nadegive_delay",d_delay);
    g_pCvar[HeGrenade] = register_cvar("nadegive_he",d_givehe);
    g_pCvar[FlashBang] = register_cvar("nadegive_flash",d_giveflash);
    g_pCvar[SmokeGrenade] = register_cvar("nadegive_smoke",d_givesmoke);
	    
    //hooking the spawning event
    RegisterHam(Ham_Spawn,"player","hamPlayerSpawned",1);
}

//someone spawned
public hamPlayerSpawned(id)
{
    if(is_user_alive(id) && get_user_flags(id) & flaga)
    
    //set the grenade giving a delay
    new Float:flDelay = get_pcvar_float(g_givedelay);
    remove_task(id);
    if( flDelay )
    {
	    set_task(flDelay,"GiveNades",id);
    }
    else
    {
	    GiveNades(id);
    }
}

//let's give some stuffs
public GiveNades( id )
{
    if(is_user_alive(id) && get_user_flags(id) & flaga)

    static const szNadesNames[Nades][] = {
	    "weapon_hegrenade",
	    "weapon_flashbang",
	    "weapon_smokegrenade"
    };
    static const iNadesId[Nades] = {
	    CSW_HEGRENADE,
	    CSW_FLASHBANG,
	    CSW_SMOKEGRENADE
    };

    new iBpAmmo, iNadeAmount, iId;
    for(new i; i<Nades; i++)
    {
	    iNadeAmount = get_pcvar_num(g_pCvar[i]);
	    if( iNadeAmount > 0 )
	    {
		    iId = iNadesId[i]; // value used twice, so cache it's value in a var
		    iBpAmmo = cs_get_user_bpammo(id, iId);
		    if( !iBpAmmo )
		    {
			    give_item(id, szNadesNames[i]);
		    }
		    cs_set_user_bpammo(id, iId, iNadeAmount);
	    }
    }
}  


flaga B
Odpowiedz

BasurerO - zdjęcie BasurerO 16.01.2013

Kod: 145645 WKLEJTO.PL Darmowa wklejka, na zawsze!

nie testowane :D


Dzięki wielkie, działa ;) " + "
Odpowiedz

  • +
  • -
sebul - zdjęcie sebul 16.01.2013

Wiadomość wygenerowana automatycznie


Ten temat został zamknięty przez moderatora.

Powód: Pomoc udzielona

Jeśli się z tym nie zgadzasz, Dołączona grafika raportuj ten post, a moderator lub administrator rozpatrzy go ponownie.


Z pozdrowieniami,
Zespół AMXX.PL
Odpowiedz
Zablokowany