AlliedModders

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

ish12321 04-05-2017 04:57

Awp india weaponswar
 
Maps like awp india which give weapons on spawn
there when i hook spawn post and remove all weapons and give a specific weapon
the map removes that weapon and the player at end got no weapon but just knife
how to solve this ?

OciXCrom 04-05-2017 10:19

Re: Awp india weaponswar
 
Give him a knife. :bee:
Here's a plugin that removes weapons on such maps.

ish12321 04-06-2017 01:18

Re: Awp india weaponswar
 
Weapons war is just for single round.
Like if i give him knife war i remove all others
But then as map does it after my plugin it removes the knife and thus the player has nothing....

yas17sin 04-06-2017 06:03

Re: Awp india weaponswar
 
maybe something like this, could work :
PHP Code:

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

#define PLUGIN "Spawn Player With knife"
#define VERSION "0.1"
#define AUTHOR "author"

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
RegisterHam(Ham_Spawn"player""fw_PlayerSpawn_Post"1)
}

public 
fw_PlayerSpawn_Post(id)
{
    
set_task(3.0"give_knife"id)
}
public 
give_knife(id)
{
    
strip_user_weapons(id)
    
give_item(id"weapon_knife")



ish12321 04-06-2017 21:48

Re: Awp india weaponswar
 
You mean a delay in action?

edon1337 04-07-2017 06:48

Re: Awp india weaponswar
 
Try setting a 1 second delay on Ham_Spawn and give him weapons.

yas17sin 04-07-2017 07:16

Re: Awp india weaponswar
 
yeah like the code i gived you.

Natsheh 04-08-2017 13:48

Re: Awp india weaponswar
 
You could remove the player equipments entity

ish12321 04-11-2017 17:47

Re: Awp india weaponswar
 
https://github.com/s1lentq/reapi/issues/66

What about this ?

sirerick 04-11-2017 19:03

Re: Awp india weaponswar
 
test

PHP Code:

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

public plugin_init()
{
    
RegisterHam(Ham_Spawn"player""fw_PlayerSpawn_Post"1)
}
public 
fw_PlayerSpawn_Post(id)
{
    if (!
is_user_alive(id))
        return
        
    
strip_user_weapons(id)
    
give_item(id"weapon_knife")
    
}    
public 
pfn_spawn(ent)
{
    if(!
is_valid_ent(ent))
        return 
PLUGIN_CONTINUE
        
    
static szClassname[33]
    
entity_get_string(entEV_SZ_classnameszClassnamecharsmax(szClassname))
    
    if(
equal(szClassname"armoury_entity"))
    
remove_entity(ent)
        
    return 
PLUGIN_CONTINUE




All times are GMT -4. The time now is 17:53.

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