Raised This Month: $ Target: $400
 0% 

Zombie Mod - Weapon Remove


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Ithron
Member
Join Date: Apr 2006
Old 05-16-2007 , 10:02   Zombie Mod - Weapon Remove
Reply With Quote #1

Hi..

i work on a zombie mod plugin by hawk552... now i want to remove the weapons of a zombie... like strip_user_weapons()..

but this bad, because in the next round you can't pick up weapons or use any weapons..


so i have asked in the german forum for help.. i became this hint:

Quote:
Originally Posted by mogel View Post
Code:
#define MAXWEAPONS 31
new weapon[MAXWEAPONS][] = {
    "",
    "p228",
    "",
    "scout",
    "hegrenade",
    "xm1014",
    "c4",
    "mac10",
    "aug",
    "smokegrenade",
    "elite",
    "fiveseven",
    "ump45",
    "sg550",
    "galil",
    "famas",
    "usp",
    "glock18",
    "awp",
    "mp5navy",
    "m249",
    "m3",
    "m4a1",
    "tmp",
    "g3sg1",
    "flashbang",
    "deagle",
    "sg552",
    "ak47",
    "knife",
    "p90"
}

public DropWeapon(player, weaponid) {
    new weaponname[20]
    format(weaponname, 19, "weapon_%s", weapon[weaponid])
    fm_strip_user_gun(player, weaponid, weaponname) // fakemeta_util.inc
}

public StripAllWeapons(player) {
    for(new i = 1; i < MAXWEAPONS; i++)
    {
        if ((i == CSW_C4) || (i == CSW_KNIFE)) continue
        if (user_has_weapon(player, i)) DropWeapon(player, i)
    }
}

public GiveWeapon(player, weaponid) {
    new weaponname[20]
    format(weaponname, 19, "weapon_%s", weapon[weaponid])
    give_item(player, weaponname)
    //cs_set_user_bpammo(player, weaponid, maxammo[weaponid] + spieler[player][PLY_DOUBLEAMMO] * maxammo[weaponid])
}
don't forget
Code:
#include "include/fakemeta_util.inc"

this doesn't work.. if i start a the game and the round start the game shut down without any errors... no logfiles or anythink...


here you can see the code:
www.ithron.srv4.hostingwerk.de/zombie_strike.sma


can you help me, pls? =)

cYa..


[€dit]
i already have downloaded the fakemeta_util.inc
that's not the problem...
__________________
mfg
Ithron


~ sry for my bad english ~
Ithron is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:42.


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