AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Ammo helping. (https://forums.alliedmods.net/showthread.php?t=82801)

ianglowz 12-30-2008 06:31

Ammo helping.
 
SORRY!!double thread..internet slow!!Very sorry

xbatista 12-30-2008 06:33

Re: Ammo helping.
 
fm_give_item(id, "ammo_xxx");
This is like you type in your xp mod give_item,but it better.
Also look here: http://wiki.alliedmods.net/CS_Weapons_Information
What ammo of the weapon.

This is a stock.
PHP Code:

//from fakemeta utility STOCK
stock fm_give_item(index, const item[])
{
    if (!
equal(item"weapon_"7) && !equal(item"ammo_"5) && !equal(item"item_"5) && !equal(item"tf_weapon_"10))
        return 
0

    
new ent engfunc(EngFunc_CreateNamedEntityengfunc(EngFunc_AllocStringitem))
    if (!
pev_valid(ent))
        return 
0

    
new Float:origin[3]
    
pev(indexpev_originorigin)
    
set_pev(entpev_originorigin)
    
set_pev(entpev_spawnflagspev(entpev_spawnflags) | SF_NORESPAWN)
    
dllfunc(DLLFunc_Spawnent)

    new 
save pev(entpev_solid)
    
dllfunc(DLLFunc_Touchentindex)
    if (
pev(entpev_solid) != save)
        return 
ent

    engfunc
(EngFunc_RemoveEntityent)

    return -
1



ianglowz 12-30-2008 06:36

Re: Ammo helping.
 
Sorry double thread.My internet slow!Hope can forgive me.

xbatista 12-30-2008 06:37

Re: Ammo helping.
 
OK I posted here.Copy description from other thread to this :)
So you fixed your problem? ^^

ianglowz 12-30-2008 07:48

Re: Ammo helping.
 
Yes.Thx to you.


All times are GMT -4. The time now is 09:12.

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