Half-Life и Adrenaline Gamer форум
http://aghl.ru/forum/

[SOLVED] Give wpnmod Weapons per console command to Players?
http://aghl.ru/forum/viewtopic.php?f=12&t=2027
Страница 1 из 1

Автор:  NuLL [ 25 дек 2014, 18:49 ]
Заголовок сообщения:  [SOLVED] Give wpnmod Weapons per console command to Players?

Hello, dear community! :D

I need some help with Weaponmod, and i hope you can help me accomplish my goal! :)

I am making a dubstep-gun (lol),
but i'd like to give it to players with a "get_dubstepgun" command.
I've already tried it like this:

Код:
register_clcmd("get_dubstepgun","dub_Deploy");

But nothing happened.
I will be very thankful if you could help me.

greetz and merry xmas

-NuLL

Автор:  KORD_12.7 [ 26 дек 2014, 16:36 ]
Заголовок сообщения:  Re: Give Weaponmod Weapons per console command to Players?

Try this stock:
Код:
stock wpnmod_give_item(const iPlayer, const szItem[])
{
     new Float: vecOrigin[3];
     pev(iPlayer, pev_origin, vecOrigin);
     
     new iItem = wpnmod_create_item(szItem, vecOrigin);
     
     if (pev_valid(iItem))
     {
          set_pev(iItem, pev_spawnflags, pev(iItem, pev_spawnflags) | SF_NORESPAWN);
          dllfunc(DLLFunc_Touch, iItem, iPlayer);
         
          return iItem;
     }
     
     return -1;
}

Автор:  NuLL [ 26 дек 2014, 18:02 ]
Заголовок сообщения:  Re: Give Weaponmod Weapons per console command to Players?

Thanks for the Response!

Страница 1 из 1 Часовой пояс: UTC + 5 часов [ Летнее время ]
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/