Half-Life и Adrenaline Gamer форум

Всё об игре в Халф-Лайф и АГ
Текущее время: 28 мар 2024, 22:08

Часовой пояс: UTC + 5 часов [ Летнее время ]




Начать новую тему Ответить на тему  [ Сообщений: 34 ]  На страницу Пред.  1, 2, 3, 4  След.
Автор Сообщение
 Заголовок сообщения: Re: help ! in this cod
СообщениеДобавлено: 14 мар 2016, 23:45 
Не в сети
Аватара пользователя
Зарегистрирован:
22 окт 2014, 19:26
Последнее посещение:
20 мар 2024, 19:47
Сообщения: 1018
I understood little things because the translator is well understood


Код:
new const
m_pSpot = 45,
m_fSpotActive = 46


RegisterHam(Ham_Weapon_WeaponIdle,"weapon_rpg","fw_DotUpdateIdle")

public fw_DotUpdateIdle(ent, weapon){
   
   static id, Float:throw
   
   throw = hl_get_rpg_fuse(ent, weapon)
   ent = get_pdata_cbase(weapon, m_pSpot, 4);
   id = pev(ent,pev_owner)
   new team = hl_get_user_team(id)
   
   
      if(team == 1)
   {
      new model[64]
      pev(ent, pev_model, model, sizeof model - 1)
      if(equal(model, "sprites/laserdot.spr"))
         engfunc(EngFunc_SetModel,ent, "sprites/Dots/laserspot_blue.spr")
   }
   
   if(team == 2)
   {
      new model[64]
      pev(ent, pev_model, model, sizeof model - 1)
      if(equal(model, "sprites/laserdot.spr"))
         engfunc(EngFunc_SetModel,ent, "sprites/Dots/laserspot_red.spr")
   }
   

}

stock Float:hl_get_rpg_fuse(ent, weapon){
   return (get_pdata_int(weapon, m_fSpotActive, 4))
}

I find it difficult .
This figure does not work attachment Could you give me an example !
GordonFreeman
Or
Lev
Ples !

_________________
https://vk.com/kgbaghl


Вернуться к началу
 Профиль 
  
 Заголовок сообщения: Re: help ! in this cod
СообщениеДобавлено: 15 мар 2016, 06:09 
Не в сети
Site Admin
Зарегистрирован:
01 июн 2010, 01:27
Последнее посещение:
26 мар 2024, 21:42
Сообщения: 6864
You should get owner from the weapon_rgp entity itself. It is in m_pPlayer pdata.
Then determine team.
Also you got spot entity from the weapon_rpg entity. Use it to setup needed model.
Basically setting model at each item post frame should be considered not optimal, but optimizing require handling of drop/pickup events.


Вернуться к началу
 Профиль 
  
 Заголовок сообщения: Re: help ! in this cod
СообщениеДобавлено: 15 мар 2016, 11:51 
Не в сети
Аватара пользователя
Зарегистрирован:
22 окт 2014, 19:26
Последнее посещение:
20 мар 2024, 19:47
Сообщения: 1018
Цитата:
You should get owner from the weapon_rgp entity itself. It is in m_pPlayer pdata.
Then determine team.
 
Цитата:
Also you got spot entity from the weapon_rpg entity. Use it to setup needed model.
Basically setting model at each item post frame should be considered not optimal, but optimizing require handling of drop/pickup events.

I have no idea .... unfortunately translator difficult it

_________________
https://vk.com/kgbaghl


Вернуться к началу
 Профиль 
  
 Заголовок сообщения: Re: help ! in this cod
СообщениеДобавлено: 15 мар 2016, 18:29 
Не в сети
Site Admin
Зарегистрирован:
01 июн 2010, 01:27
Последнее посещение:
26 мар 2024, 21:42
Сообщения: 6864
In your last code add debug outputs of all variables and check what is working ok and where it fails.


Вернуться к началу
 Профиль 
  
 Заголовок сообщения: Re: help ! in this cod
СообщениеДобавлено: 15 мар 2016, 18:55 
Не в сети
Аватара пользователя
Зарегистрирован:
22 окт 2014, 19:26
Последнее посещение:
20 мар 2024, 19:47
Сообщения: 1018
Lev писал(а):
In your last code add debug outputs of all variables and check what is working ok and where it fails.

 

I do not get results?

==> I have a question?
Can I use sprite with and change the color (red/blue/...)!
using !
Код:
stock Create_TE_BEAMFOLLOW(entity, iSprite, life, width, red, green, blue, alpha){

    message_begin( MSG_BROADCAST, SVC_TEMPENTITY )
    write_byte( TE_BEAMFOLLOW )
    write_short( entity )            // entity
    write_short( iSprite )            // model
    write_byte( life )                // life
    write_byte( width )                // width
    write_byte( red )                // red
    write_byte( green )                // green
    write_byte( blue )                // blue
    write_byte( alpha )                // brightness
    message_end()
}

stock Create_TE_BEAMPOINTS(start[3], end[3], iSprite, startFrame, frameRate, life, width, noise, red, green, blue, alpha, speed){

    message_begin( MSG_BROADCAST, SVC_TEMPENTITY )
    write_byte( TE_BEAMPOINTS )
    write_coord( start[0] )
    write_coord( start[1] )
    write_coord( start[2] )
    write_coord( end[0] )
    write_coord( end[1] )
    write_coord( end[2] )
    write_short( iSprite )            // model
    write_byte( startFrame )        // start frame
    write_byte( frameRate )            // framerate
    write_byte( life )                // life
    write_byte( width )                // width
    write_byte( noise )                // noise
    write_byte( red)                // red
    write_byte( green )                // green
    write_byte( blue )                // blue
    write_byte( alpha )                // brightness
    write_byte( speed )                // speed
    message_end()
}

stock Create_TE_BEAMENTS(startEntity, endEntity, iSprite, startFrame, frameRate, life, width, noise, red, green, blue, alpha, speed){

    message_begin( MSG_BROADCAST, SVC_TEMPENTITY )
    write_byte( TE_BEAMENTS )
    write_short( startEntity )        // start entity
    write_short( endEntity )        // end entity
    write_short( iSprite )            // model
    write_byte( startFrame )        // starting frame
    write_byte( frameRate )            // frame rate
    write_byte( life )                // life
    write_byte( width )                // line width
    write_byte( noise )                // noise amplitude
    write_byte( red )                // red
    write_byte( green )                // green
    write_byte( blue )                // blue
    write_byte( alpha )                // brightness
    write_byte( speed )                // scroll speed
    message_end()
}

_________________
https://vk.com/kgbaghl


Вернуться к началу
 Профиль 
  
 Заголовок сообщения: Re: help ! in this cod
СообщениеДобавлено: 16 мар 2016, 01:15 
Не в сети
Site Admin
Зарегистрирован:
01 июн 2010, 01:27
Последнее посещение:
26 мар 2024, 21:42
Сообщения: 6864
abdobiskra писал(а):
red, green, blue, alpha
These are for the color and transparency.

abdobiskra писал(а):
I do not get results?
Then add more debug output. Particularly you should check if your handler (function) actually gets called.


Вернуться к началу
 Профиль 
  
 Заголовок сообщения: Re: help ! in this code: rpg laser dot
СообщениеДобавлено: 16 мар 2016, 17:40 
Не в сети
Аватара пользователя
Зарегистрирован:
22 окт 2014, 19:26
Последнее посещение:
20 мар 2024, 19:47
Сообщения: 1018
Цитата:
These are for the color and transparency.
Yes, i can apply them to laserdot.spr ?

Цитата:
Then add more debug output.

Is it possible to know Like what?

Цитата:
Particularly you should check if your handler (function) actually gets called

do you mean that !

Код:
RegisterHam(Ham_Weapon_WeaponIdle, "weapon_rpg", "fw_Updatedot", 1) 
..........
public fw_Updatedot(weapon)
{

and
Here
What is the difference between the value of 5 and 4
Код:
extraoffset_linux = 4

_________________
https://vk.com/kgbaghl


Вернуться к началу
 Профиль 
  
 Заголовок сообщения: Re: help ! in this code: rpg laser dot
СообщениеДобавлено: 16 мар 2016, 19:23 
Не в сети
Site Admin
Зарегистрирован:
01 июн 2010, 01:27
Последнее посещение:
26 мар 2024, 21:42
Сообщения: 6864
abdobiskra писал(а):
Yes, i can apply them to laserdot.spr ?
Basically you can, but this is not what you want. RPG spot is not a temporary entity.

abdobiskra писал(а):
What is the difference between the value of 5 and 4
5 is used for the Players and 4 for other entities.

abdobiskra писал(а):
do you mean that !
Код:
public fw_Updatedot(weapon)
{
server_print("I am called with weapon: %i", weapon);


Вернуться к началу
 Профиль 
  
 Заголовок сообщения: Re: help ! in this code: rpg laser dot
СообщениеДобавлено: 19 мар 2016, 14:40 
Не в сети
Аватара пользователя
Зарегистрирован:
22 окт 2014, 19:26
Последнее посещение:
20 мар 2024, 19:47
Сообщения: 1018
I did not get the results Are there other ways?

_________________
https://vk.com/kgbaghl


Вернуться к началу
 Профиль 
  
 Заголовок сообщения: Re: help ! in this code: rpg laser dot
СообщениеДобавлено: 19 мар 2016, 22:45 
Не в сети
Site Admin
Зарегистрирован:
01 июн 2010, 01:27
Последнее посещение:
26 мар 2024, 21:42
Сообщения: 6864
Download HLSDK, change there and compile.


Вернуться к началу
 Профиль 
  
Показать сообщения за:  Поле сортировки  
Начать новую тему Ответить на тему  [ Сообщений: 34 ]  На страницу Пред.  1, 2, 3, 4  След.

Часовой пояс: UTC + 5 часов [ Летнее время ]


Кто сейчас на конференции

Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 5


Вы не можете начинать темы
Вы не можете отвечать на сообщения
Вы не можете редактировать свои сообщения
Вы не можете удалять свои сообщения
Вы не можете добавлять вложения

Найти:
Перейти:  
cron
Создано на основе phpBB® Forum Software © phpBB Group
Русская поддержка phpBB