AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Awp only (https://forums.alliedmods.net/showthread.php?t=95227)

SoYti 06-21-2009 12:01

Awp only
 
Hello,
How kann I make that everyone starts with awp and can buy anything else
a plugin or a link , like a Deathmatch 2.0 but without respawn
your man erik

minimiller 06-21-2009 12:28

Re: Awp only
 
PHP Code:

#include <amxmodx>
#include <hamsandwich>
#include <fun>

public plugin_init()
{
    
register_plugin("give_awp""1.0""Stewie!");
    
RegisterHam(Ham_Spawn"player""player_spawn"1);
}

public 
player_spawn(id)
{
    if(
is_user_alive(id))
    {
        
give_item(id"weapon_awp");
    }



SoYti 06-21-2009 12:36

Re: Awp only
 
and primar?
and how i close the buy menu

padilha007 06-21-2009 12:40

Re: Awp only
 
PHP Code:

#include <amxmodx>
#include <hamsandwich>
#include <fun>

new const g_sBlank[] = "";

public 
plugin_init()
{
    
register_plugin("give_awp""1.0""Stewie!");
    
RegisterHam(Ham_Spawn"player""player_spawn"1);

    new 
sBuyHandle[] = "cmdBuy";
    
register_clcmd("buy"sBuyHandle, -1g_sBlank);
    
register_clcmd("buyammo1"sBuyHandle, -1g_sBlank);
    
register_clcmd("buyammo2"sBuyHandle, -1g_sBlank);
    
register_clcmd("buyequip"sBuyHandle, -1g_sBlank);
    
register_clcmd("cl_autobuy"sBuyHandle, -1g_sBlank);
    
register_clcmd("cl_rebuy"sBuyHandle, -1g_sBlank);
    
register_clcmd("cl_setautobuy"sBuyHandle, -1g_sBlank);
    
register_clcmd("cl_setrebuy"sBuyHandle, -1g_sBlank);
}

public 
player_spawn(id)
{
    if(
is_user_alive(id))
    {
        
give_item(id"weapon_awp");
    }
}

public 
cmdBuy(plr)
{
    return 
PLUGIN_HANDLED;



minimiller 06-21-2009 12:42

Re: Awp only
 
Quote:

Originally Posted by padilha007 (Post 853539)
PHP Code:

#include <amxmodx>
#include <hamsandwich>
#include <fun>

new const g_sBlank[] = "";

public 
plugin_init()
{
    
register_plugin("give_awp""1.0""Stewie!");
    
RegisterHam(Ham_Spawn"player""player_spawn"1);

    new 
sBuyHandle[] = "cmdBuy";
    
register_clcmd("buy"sBuyHandle, -1g_sBlank);
    
register_clcmd("buyammo1"sBuyHandle, -1g_sBlank);
    
register_clcmd("buyammo2"sBuyHandle, -1g_sBlank);
    
register_clcmd("buyequip"sBuyHandle, -1g_sBlank);
    
register_clcmd("cl_autobuy"sBuyHandle, -1g_sBlank);
    
register_clcmd("cl_rebuy"sBuyHandle, -1g_sBlank);
    
register_clcmd("cl_setautobuy"sBuyHandle, -1g_sBlank);
    
register_clcmd("cl_setrebuy"sBuyHandle, -1g_sBlank);
}

public 
player_spawn(id)
{
    if(
is_user_alive(id))
    {
        
give_item(id"weapon_awp");
    }
}

public 
cmdBuy(plr)
{
    return 
PLUGIN_HANDLED;



Quote:

Originally Posted by SoYti (Post 853516)
Hello,
How kann I make that everyone starts with awp and can buy anything else
a plugin or a link , like a Deathmatch 2.0 but without respawn
your man erik

my bad
i thought u wanted to let them buy other stuffz

SoYti 06-21-2009 12:46

Re: Awp only
 
HEy
I become only 10 shots for the awp more not :(
and the shop menu is worked



i want to close the buy menu for all items
and when i respawn awp with full ammuntion
+ deagle with full ammnuition
+kevlar + helmet
+ give item defusial kit
and the old second weapoint must be droped


I want close the buy menu
and not only the primar shots

znovit 06-21-2009 17:00

Re: Awp only
 
Something like this

PHP Code:

#include <amxmodx>
#include <hamsandwich>
#include <fun>
#include <cstrike>

new const g_sBlank[] = "";

public 
plugin_init()
{
    
register_plugin("give_awp,deagle and vesthelm""1.0""Stewie!");
    
RegisterHam(Ham_Spawn"player""player_spawn"1);

    new 
sBuyHandle[] = "cmdBuy";
    
register_clcmd("buy"sBuyHandle, -1g_sBlank);
    
register_clcmd("buyammo1"sBuyHandle, -1g_sBlank);
    
register_clcmd("buyammo2"sBuyHandle, -1g_sBlank);
    
register_clcmd("buyequip"sBuyHandle, -1g_sBlank);
    
register_clcmd("cl_autobuy"sBuyHandle, -1g_sBlank);
    
register_clcmd("cl_rebuy"sBuyHandle, -1g_sBlank);
    
register_clcmd("cl_setautobuy"sBuyHandle, -1g_sBlank);
    
register_clcmd("cl_setrebuy"sBuyHandle, -1g_sBlank);
}

public 
player_spawn(id)
{
    if(
is_user_alive(id))
    {
        
strip_user_weapons(id)
    
give_item(id"weapon_knife");
    
give_item(id"weapon_awp");
    
give_item(id"weapon_deagle");
    
cs_set_user_bpammo(idCSW_AWP30);
    
cs_set_user_bpammo(idCSW_DEAGLE33);
    
    }
}

public 
cmdBuy(plr)
{
    return 
PLUGIN_HANDLED;



DarkGod 06-21-2009 18:41

Re: Awp only
 
Code:
#include <amxmodx> #include <hamsandwich> #include <fun> #include <cstrike> new const g_sBlank[] = ""; public plugin_init() {     register_plugin("give_awp,deagle and vesthelm", "1.0", "Stewie!");     RegisterHam(Ham_Spawn, "player", "player_spawn", 1);     new sBuyHandle[] = "cmdBuy";     register_clcmd("buy", sBuyHandle, -1, g_sBlank);     register_clcmd("buyammo1", sBuyHandle, -1, g_sBlank);     register_clcmd("buyammo2", sBuyHandle, -1, g_sBlank);     register_clcmd("buyequip", sBuyHandle, -1, g_sBlank);     register_clcmd("cl_autobuy", sBuyHandle, -1, g_sBlank);     register_clcmd("cl_rebuy", sBuyHandle, -1, g_sBlank);     register_clcmd("cl_setautobuy", sBuyHandle, -1, g_sBlank);     register_clcmd("cl_setrebuy", sBuyHandle, -1, g_sBlank); } public player_spawn(id) {     if(is_user_alive(id))     {     strip_user_weapons(id)     give_item(id, "weapon_knife");     give_item(id, "weapon_awp");     give_item(id, "weapon_deagle");     cs_set_user_bpammo(id, CSW_AWP, 30);     cs_set_user_bpammo(id, CSW_DEAGLE, 35);     cs_set_user_armor (id, 100, 2 )           } } public cmdBuy(plr) {     return PLUGIN_HANDLED; }

Exolent[jNr] 06-21-2009 18:52

Re: Awp only
 
Code:
#include <amxmodx> #include <amxmisc> #include <cstrike> #include <fun> #include <engine> #include <fakemeta> #include <hamsandwich> public plugin_precache() {     new iEntity = create_entity("info_map_parameters");     if( is_valid_ent(iEntity) )     {         set_kvd(0, KV_ClassName, "info_map_parameters");         set_kvd(0, KV_KeyName, "buying");         set_kvd(0, KV_Value, "3");         set_kvd(0, KV_fHandled, 0);                 dllfunc(DLLFunc_KeyValue, iEntity, 0);         dllfunc(DLLFunc_Spawn, iEntity);     } } public plugin_init() {     register_plugin("Disable Buying", "0.1", "Exolent");         RegisterHam(Ham_Spawn, "player", "FwdPlayerSpawn", 1); } public FwdPlayerSpawn(iPlayer) {     if( is_user_alive(iPlayer) )     {         remove_task(iPlayer);         set_task(0.3, "TaskGiveWeapons", iPlayer);     } } public TaskGiveWeapons(iPlayer) {     if( is_user_alive(iPlayer) )     {         strip_user_weapons(iPlayer);                 give_item(iPlayer, "weapon_awp");         cs_set_user_bpammo(iPlayer, CSW_AWP, 30);                 give_item(iPlayer, "weapon_deagle");         cs_set_user_bpammo(iPlayer, CSW_DEAGLE, 35);                 cs_set_user_armor(iPlayer, 100, CS_ARMOR_VESTHELM);     } }

SoYti 06-21-2009 19:12

Re: Awp only
 
Hey,
Thx
but i can buy things
i want close the buymenu all weapons and granats allowed to use now is only second and primary bulls off..
+ give item defusial kit
and i want every round kevlar+helmet


All times are GMT -4. The time now is 11:06.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.