AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   ham help (https://forums.alliedmods.net/showthread.php?t=74248)

Doc-Holiday 07-14-2008 20:12

ham help
 
Ok
ham_give_weapon(id, "weapon_ak47");

if(user_has_weapon(id, CSW_M4A1))
{
ham_strip_weapon(id, "weapon_m4a1");
}

so can you do something like this

PHP Code:

/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <hamsandwich>

public plugin_init() {
 
register_plugin("Roast Beef Stripper""1.0""NcB Plugin team")
 
 
register_cvar("rbs_strip""1")
 
}
public 
rbs_strips(id)
{
 if(!
user_has_weapon(idCSW_KNIFE))
{
    
ham_strip_weapon(id"weapon_m4a1"); // Strip all weapons but knife.


The strip weapon event i wasnt sure how you would write that part so i left the original part in there.

Sn!ff3r 07-14-2008 22:47

Re: ham help
 
You must call rbs_strips(id) function.

While do you want to strip weapons?

Doc-Holiday 07-14-2008 22:51

Re: ham help
 
im just trying to figure out how to use it... i was thinking about makeing a plugin sorta like wc3 but


Using different people

Speed
Muscle
Tacticle
Geek

going by xp you chose your class and then each one on each lvl up to ten lvls you get special powers.

so on select class i wanted it to strip weapons and give the weapon for the class.


All times are GMT -4. The time now is 05:38.

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