Adaugare bomba la inceput de runda

Modificari necesare ale pluginurilor

Moderators: Moderatori ajutatori, Moderatori

User avatar
HecaTe
eXtream Mod
eXtream Mod
Posts: 3118
Joined: 16 Aug 2014, 07:53
Detinator Steam: Da
CS Status: Citesc forumul eXtreamCS.com...!
SteamID: hecate_2k
Reputatie: eXtream Mod
Fond eXtream: 0
Location: Medias/Alba Iulia
Has thanked: 42 times
Been thanked: 25 times
Contact:

20 Aug 2014, 12:07

Am un plugin de meniu arme,iar la inceput de runda nu imi da bomba(c4)
| Afiseaza codul
/* Plugin generated by AMXX-Studio */
 
/*
        Credits:
       
                The YONTU - Code Optimized
                scosmynnnn - Ideea pentru a trimite un task 0.1 la Spawn
*/
 
#include <amxmodx>
#include <cstrike>
#include <hamsandwich>
#include <fun>
 
new const PLUGIN[] = "Furien: Anti-Furien Weapons Menu";
new const VERSION[] = "1.2";
new const AUTHOR[] = "Adventx";
 
#pragma semicolon 1
 
new bool: HaveChoosenWeap[33];
 
public plugin_init()
{
        register_plugin(PLUGIN, VERSION, AUTHOR);
       
        register_clcmd("say /weapons","SayWeapons");
       
        RegisterHam(Ham_Spawn, "player", "hamPlayerSpawnPost", 1);
}
 
public hamPlayerSpawnPost(id)
{
        if(is_user_alive(id) && get_user_team(id) == 1)
        {      
                set_task(0.1, "FurienItem",id);
        }
       
        if(is_user_alive(id) && get_user_team(id) == 2)
        {
                ShowMenuWeap(id);
                set_task(0.1, "AntiFurienItem",id);    
        }
}
 
public FurienItem(id)
{
        strip_user_weapons(id);  
        give_item(id, "weapon_knife");
        give_item(id, "weapon_hegrenade");
        give_item(id, "weapon_flashbang");
        give_item(id, "weapon_flashbang");
}
 
public AntiFurienItem(id)
{
        strip_user_weapons(id);
        HaveChoosenWeap[id] = false;
        give_item(id, "weapon_knife");
        give_item(id, "weapon_deagle");
        give_item(id, "weapon_flashbang");
        give_item(id, "weapon_flashbang");
        cs_set_user_bpammo(id, CSW_DEAGLE,250);
}
 
public ShowMenuWeap(id)
{
        new szMenu = menu_create("rAnti Furien yWeapons","AntiFurienWeap");
       
        menu_additem(szMenu, "M4A1","1");
        menu_additem(szMenu, "AK47","2");
        menu_additem(szMenu, "M3","3");
        menu_additem(szMenu, "Aug","4");
        menu_additem(szMenu, "Famas","5");
        menu_additem(szMenu, "Mp5 Navy","6");
        menu_additem(szMenu, "XM1014","7");
       
        menu_setprop(szMenu, MPROP_EXIT, MEXIT_ALL);
        menu_display(id, szMenu, 0);
       
        return PLUGIN_HANDLED;
}
 
public AntiFurienWeap(id, szMenu, item)
{
        if(item == MENU_EXIT)
                return PLUGIN_HANDLED;
       
        if(get_user_team(id) != 2)
                return PLUGIN_HANDLED;
       
        new data [6], szName [64];
        new access, callback;
        menu_item_getinfo (szMenu, item, access, data,charsmax (data), szName,charsmax (szName), callback);
        new key = str_to_num (data);
       
        switch (key)
        {
                case 1:
                {
                        HaveChoosenWeap[id] = true;
                        give_item(id, "weapon_m4a1");
                        cs_set_user_bpammo(id, CSW_M4A1,250);
                }
               
                case 2:
                {
                        HaveChoosenWeap[id] = true;
                        give_item(id, "weapon_ak47");
                        cs_set_user_bpammo(id, CSW_AK47,250);
                }
               
                case 3:
                {
                        HaveChoosenWeap[id] = true;
                        give_item(id, "weapon_m3");
                        cs_set_user_bpammo(id, CSW_M3,250);
                }
                case 4:
                {
                        HaveChoosenWeap[id] = true;
                        give_item(id, "weapon_aug");
                        cs_set_user_bpammo(id, CSW_AUG,250);
                }
               
                case 5:
                {
                        HaveChoosenWeap[id] = true;
                        give_item(id, "weapon_famas");
                        cs_set_user_bpammo(id, CSW_FAMAS,250);
                }
               
                case 6:
                {
                        HaveChoosenWeap[id] = true;
                        give_item(id, "weapon_mp5navy");
                        cs_set_user_bpammo(id, CSW_MP5NAVY,250);
                }
               
                case 7:
                {
                        HaveChoosenWeap[id] = true;
                        give_item(id, "weapon_xm1014");
                        cs_set_user_bpammo(id, CSW_XM1014,250);
                }
               
        }
       
        menu_destroy(szMenu);
        return PLUGIN_HANDLED;
}
 
public SayWeapons(id)
{
        if(get_user_team(id) == 2)
        {
                if(!is_user_alive(id))
                {
                        ChatColor(id, "!g[AntiFurien Weapons] !nYou can't select your weapons when you're dead!");
                        return;
                }
               
                if(HaveChoosenWeap[id]==true)
                {
                        ChatColor(id, "!g[AntiFurien Weapons] !nYou select your weapons in this round");
                        return;
                }
               
                else
                {
                        ShowMenuWeap(id);
                }
        }
}
 
stock ChatColor(const id, const input[], any:...)
{
        new count = 1, players[32];
        static msg[191];
        vformat(msg, 190, input, 3);
       
        replace_all(msg, 190, "!g", "^4"); // Green Color
        replace_all(msg, 190, "!n", "^1"); // Default Color
        replace_all(msg, 190, "!t", "^3"); // Team Color
        replace_all(msg, 190, "!t2", "^0"); // Team2 Color
       
        if (id) players[0] = id; else get_players(players, count, "ch"); {
                for (new i = 0; i < count; i++) {
                        if (is_user_connected(players)) {
                                message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players);
                                write_byte(players);
                                write_string(msg);
                                message_end();
                        }
                }
        }
}
 
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\ rtf1\ ansi\ deff0{\ fonttbl{\ f0\ fnil Tahoma;}}n\ viewkind4\ uc1\ pard\ lang1033\ f0\ fs16 n\ par }
*/

Daca puteti sa faceti sa imi dea random c4 la un furien as fi foarte recunoscator !
Thx anticipat ^:)^
Image
Image
Mai nou si internet banking are liber de 1 decembrie :kappa: :kappa:
Image
IG-BOOST.org - Instagram Followers Best, Cheap, Reliable
Cosmin
Fost moderator
Fost moderator
Posts: 9526
Joined: 06 Jul 2013, 21:08
Detinator Steam: Da
Detinator server CS: Nu
Reputatie: Fost eXtream Mod
Fost Scripter eXtreamCS
Nume anterior: scosmynnnn
Has thanked: 568 times
Been thanked: 587 times

20 Aug 2014, 14:46

| Afiseaza codul
/*
        Credits:
       
                The YONTU - Code Optimized
                scosmynnnn - Ideea pentru a trimite un task 0.1 la Spawn
*/
 
#include <amxmodx>
#include <cstrike>
#include <hamsandwich>
#include <fun>
 
new const PLUGIN[] = "Furien: Anti-Furien Weapons Menu";
new const VERSION[] = "1.2";
new const AUTHOR[] = "Adventx";

#pragma tabsize 0
 
new bool: HaveChoosenWeap[33];
 
public plugin_init()
{
        register_plugin(PLUGIN, VERSION, AUTHOR);
       
        register_clcmd("say /weapons","SayWeapons");
       
	    register_logevent("round_start",2,"1=Round_Start")
        RegisterHam(Ham_Spawn, "player", "hamPlayerSpawnPost", 1);
}
public round_start(){
	new iPlayers[32],iNum
	get_players(iPlayers,iNum,"TERRORIST","ch")
	new player = iPlayers[random_num(0,iNum -1)];
	if(!is_user_alive(player))
		round_start()
	else
	{
		give_item(player,"weapon_c4")
	}
}
	
		
public hamPlayerSpawnPost(id)
{
        if(is_user_alive(id) && get_user_team(id) == 1)
        {      
                set_task(0.1, "FurienItem",id);
        }
       
        if(is_user_alive(id) && get_user_team(id) == 2)
        {
                ShowMenuWeap(id);
                set_task(0.1, "AntiFurienItem",id);    
        }
}
 
public FurienItem(id)
{
        strip_user_weapons(id);  
        give_item(id, "weapon_knife");
        give_item(id, "weapon_hegrenade");
        give_item(id, "weapon_flashbang");
        give_item(id, "weapon_flashbang");
}
 
public AntiFurienItem(id)
{
        strip_user_weapons(id);
        HaveChoosenWeap[id] = false;
        give_item(id, "weapon_knife");
        give_item(id, "weapon_deagle");
        give_item(id, "weapon_flashbang");
        give_item(id, "weapon_flashbang");
        cs_set_user_bpammo(id, CSW_DEAGLE,250);
}
 
public ShowMenuWeap(id)
{
        new szMenu = menu_create("rAnti Furien yWeapons","AntiFurienWeap");
       
        menu_additem(szMenu, "M4A1","1");
        menu_additem(szMenu, "AK47","2");
        menu_additem(szMenu, "M3","3");
        menu_additem(szMenu, "Aug","4");
        menu_additem(szMenu, "Famas","5");
        menu_additem(szMenu, "Mp5 Navy","6");
        menu_additem(szMenu, "XM1014","7");
       
        menu_setprop(szMenu, MPROP_EXIT, MEXIT_ALL);
        menu_display(id, szMenu, 0);
       
        return PLUGIN_HANDLED;
}
 
public AntiFurienWeap(id, szMenu, item)
{
        if(item == MENU_EXIT)
                return PLUGIN_HANDLED;
       
        if(get_user_team(id) != 2)
                return PLUGIN_HANDLED;
       
        new data [6], szName [64];
        new access, callback;
        menu_item_getinfo (szMenu, item, access, data,charsmax (data), szName,charsmax (szName), callback);
        new key = str_to_num (data);
       
        switch (key)
        {
                case 1:
                {
                        HaveChoosenWeap[id] = true;
                        give_item(id, "weapon_m4a1");
                        cs_set_user_bpammo(id, CSW_M4A1,250);
                }
               
                case 2:
                {
                        HaveChoosenWeap[id] = true;
                        give_item(id, "weapon_ak47");
                        cs_set_user_bpammo(id, CSW_AK47,250);
                }
               
                case 3:
                {
                        HaveChoosenWeap[id] = true;
                        give_item(id, "weapon_m3");
                        cs_set_user_bpammo(id, CSW_M3,250);
                }
                case 4:
                {
                        HaveChoosenWeap[id] = true;
                        give_item(id, "weapon_aug");
                        cs_set_user_bpammo(id, CSW_AUG,250);
                }
               
                case 5:
                {
                        HaveChoosenWeap[id] = true;
                        give_item(id, "weapon_famas");
                        cs_set_user_bpammo(id, CSW_FAMAS,250);
                }
               
                case 6:
                {
                        HaveChoosenWeap[id] = true;
                        give_item(id, "weapon_mp5navy");
                        cs_set_user_bpammo(id, CSW_MP5NAVY,250);
                }
               
                case 7:
                {
                        HaveChoosenWeap[id] = true;
                        give_item(id, "weapon_xm1014");
                        cs_set_user_bpammo(id, CSW_XM1014,250);
                }
               
        }
       
        menu_destroy(szMenu);
        return PLUGIN_HANDLED;
}
 
public SayWeapons(id)
{
        if(get_user_team(id) == 2)
        {
                if(!is_user_alive(id))
                {
                        ChatColor(id, "!g[AntiFurien Weapons] !nYou can't select your weapons when you're dead!");
                        return;
                }
               
                if(HaveChoosenWeap[id]==true)
                {
                        ChatColor(id, "!g[AntiFurien Weapons] !nYou select your weapons in this round");
                        return;
                }
               
                else
                {
                        ShowMenuWeap(id);
                }
        }
}
 
stock ChatColor(const id, const input[], any:...)
{
        new count = 1, players[32];
        static msg[191];
        vformat(msg, 190, input, 3);
       
        replace_all(msg, 190, "!g", "^4"); // Green Color
        replace_all(msg, 190, "!n", "^1"); // Default Color
        replace_all(msg, 190, "!t", "^3"); // Team Color
        replace_all(msg, 190, "!t2", "^0"); // Team2 Color
       
        if (id) players[0] = id; else get_players(players, count, "ch"); {
                for (new i = 0; i < count; i++) {
                        if (is_user_connected(players)) {
                                message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players);
                                write_byte(players);
                                write_string(msg);
                                message_end();
                        }
                }
        }
}
User avatar
HecaTe
eXtream Mod
eXtream Mod
Posts: 3118
Joined: 16 Aug 2014, 07:53
Detinator Steam: Da
CS Status: Citesc forumul eXtreamCS.com...!
SteamID: hecate_2k
Reputatie: eXtream Mod
Fond eXtream: 0
Location: Medias/Alba Iulia
Has thanked: 42 times
Been thanked: 25 times
Contact:

20 Aug 2014, 15:07

Acum nu imi mai da nik la inceput...nu imi arata nici meniul..nici la ct nici la t numi da nik,nici macar cutitul
Image
Image
Mai nou si internet banking are liber de 1 decembrie :kappa: :kappa:
Image
Cosmin
Fost moderator
Fost moderator
Posts: 9526
Joined: 06 Jul 2013, 21:08
Detinator Steam: Da
Detinator server CS: Nu
Reputatie: Fost eXtream Mod
Fost Scripter eXtreamCS
Nume anterior: scosmynnnn
Has thanked: 568 times
Been thanked: 587 times

20 Aug 2014, 15:41

Code: Select all

#include <amxmodx>
#include <fun>

static const
	PLUGIN[] = "Random Player",
	VERSION[] = "1.0",
	AUTHOR[] = "C0sm1N";

public plugin_init()
{
	register_plugin(PLUGIN,VERSION,AUTHOR);
       
	register_logevent("round_start",2,"1=Round_Start")
}
public round_start(){
	new iPlayers[32],iNum
	get_players(iPlayers,iNum,"TERRORIST","ch")
	new player = iPlayers[random_num(0,iNum -1)];
	if(!is_user_alive(player))
		round_start()
	else
	{
		give_item(player,"weapon_c4")
	}
}
incearcal pe asta separat,adica il folosesti pe ala nemodificat al lu' adventx si pe asta separat.
User avatar
HecaTe
eXtream Mod
eXtream Mod
Posts: 3118
Joined: 16 Aug 2014, 07:53
Detinator Steam: Da
CS Status: Citesc forumul eXtreamCS.com...!
SteamID: hecate_2k
Reputatie: eXtream Mod
Fond eXtream: 0
Location: Medias/Alba Iulia
Has thanked: 42 times
Been thanked: 25 times
Contact:

20 Aug 2014, 16:27

Nu merge.... cred ca pluginul de arme a lui adventx blocheaza c4...
Dupa ce am pus pluginul care mi l-ai dat tu imi iasa cand sunt terorist...
P.S:imi poti zice si cvarurile cu care pot seta banii primiti pe runda si pe kill?(doar daca vrei i le stii)
Sorry daca iti dau batai de cap [-o< ^:)^
Image
Image
Mai nou si internet banking are liber de 1 decembrie :kappa: :kappa:
Image
Cosmin
Fost moderator
Fost moderator
Posts: 9526
Joined: 06 Jul 2013, 21:08
Detinator Steam: Da
Detinator server CS: Nu
Reputatie: Fost eXtream Mod
Fost Scripter eXtreamCS
Nume anterior: scosmynnnn
Has thanked: 568 times
Been thanked: 587 times

20 Aug 2014, 17:13

pluginul care ti l-am dat eu este perfect functional,ai alt plugin care il blocheaza
rumini_uebki
Membru, skill 0
Membru, skill 0
Posts: 49
Joined: 21 Jul 2014, 23:21
Detinator Steam: Da
Fond eXtream: 0
Has thanked: 3 times
Been thanked: 8 times
Contact:

20 Aug 2014, 17:23

Are strip_user_weapons(id) la spawn
:meme
Cosmin
Fost moderator
Fost moderator
Posts: 9526
Joined: 06 Jul 2013, 21:08
Detinator Steam: Da
Detinator server CS: Nu
Reputatie: Fost eXtream Mod
Fost Scripter eXtreamCS
Nume anterior: scosmynnnn
Has thanked: 568 times
Been thanked: 587 times

20 Aug 2014, 17:29

| Afiseaza codul
#include <amxmodx>
#include <fun>

static const
	PLUGIN[] = "Random Player",
	VERSION[] = "1.0",
	AUTHOR[] = "C0sm1N";

public plugin_init()
{
	register_plugin(PLUGIN,VERSION,AUTHOR);
	
	register_logevent("round_start",2,"1=Round_Start")
}
public round_start(){
	new iPlayers[32],iNum
	get_players(iPlayers,iNum,"TERRORIST","ch")
	new player = iPlayers[random_num(0,iNum -1)];
	if(!is_user_alive(player))
		round_start()
	else
	{
		set_task(1.0,"c4",player)
	}
}
public c4(id) {
	if(!is_user_alive(id))
		round_start()
	else
		give_item(player,"weapon_c4")
}
bine ca mi-ai zis ca nu vazusem (nu prea m-am uitat in pluginul lui adventx)
User avatar
HecaTe
eXtream Mod
eXtream Mod
Posts: 3118
Joined: 16 Aug 2014, 07:53
Detinator Steam: Da
CS Status: Citesc forumul eXtreamCS.com...!
SteamID: hecate_2k
Reputatie: eXtream Mod
Fond eXtream: 0
Location: Medias/Alba Iulia
Has thanked: 42 times
Been thanked: 25 times
Contact:

20 Aug 2014, 17:55

Nu merge compilat :gusta
Image
Image
Mai nou si internet banking are liber de 1 decembrie :kappa: :kappa:
Image
Cosmin
Fost moderator
Fost moderator
Posts: 9526
Joined: 06 Jul 2013, 21:08
Detinator Steam: Da
Detinator server CS: Nu
Reputatie: Fost eXtream Mod
Fost Scripter eXtreamCS
Nume anterior: scosmynnnn
Has thanked: 568 times
Been thanked: 587 times

20 Aug 2014, 17:57

| Afiseaza codul
#include <amxmodx>
#include <fun>

static const
	PLUGIN[] = "Random Player",
	VERSION[] = "1.0",
	AUTHOR[] = "C0sm1N";

public plugin_init()
{
	register_plugin(PLUGIN,VERSION,AUTHOR);
	
	register_logevent("round_start",2,"1=Round_Start")
}
public round_start(){
	new iPlayers[32],iNum
	get_players(iPlayers,iNum,"TERRORIST","ch")
	new player = iPlayers[random_num(0,iNum -1)];
	if(!is_user_alive(player))
		round_start()
	else
	{
		set_task(1.0,"c4",player)
	}
}
public c4(id) {
	if(!is_user_alive(id))
		round_start()
	else
		give_item(id,"weapon_c4")
}
User avatar
HecaTe
eXtream Mod
eXtream Mod
Posts: 3118
Joined: 16 Aug 2014, 07:53
Detinator Steam: Da
CS Status: Citesc forumul eXtreamCS.com...!
SteamID: hecate_2k
Reputatie: eXtream Mod
Fond eXtream: 0
Location: Medias/Alba Iulia
Has thanked: 42 times
Been thanked: 25 times
Contact:

20 Aug 2014, 18:12

Tot nu merge...nu pluginu tau e in neregula...cel de meniu arme
Image
Image
Mai nou si internet banking are liber de 1 decembrie :kappa: :kappa:
Image
User avatar
Doctor whO? <3
Membru, skill +2
Membru, skill +2
Posts: 926
Joined: 21 Jun 2013, 11:40
Detinator Steam: Da
CS Status: Citesc forumul eXtreamCS.com...!
Reputatie: Fost Membru Club eXtreamCS (doua luni)
Has thanked: 92 times
Been thanked: 16 times
Contact:

20 Aug 2014, 19:28

Intra in cstrike/addons/amxmodx/config/furien/furien.ini si cauta linia urmatoare:

Code: Select all

// Bomb Plant
// 0 NOBODY
// 1 FURIENS CAN PLANT
// 2 ANTIFURIENS CAN PLANT
// 3 EVERY PLAYER CAN PLANT

Code: Select all

BOMB_PLANT 3
(setezi cu 3)
Post Reply

Return to “Modificari pluginuri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 5 guests