Список форумов http://forum.quake2.com.ru http://forum.quake2.com.ru
forum of russian quake2 portal
 
 FAQFAQ   ПоискПоиск   ПользователиПользователи   ГруппыГруппы   РегистрацияРегистрация 
 ПрофильПрофиль   Войти и проверить личные сообщенияВойти и проверить личные сообщения   ВходВход 

Can someone help a little?:)

 
Начать новую тему   Ответить на тему    Список форумов http://forum.quake2.com.ru -> q2pro
Предыдущая тема :: Следующая тема  
Автор Сообщение
upp3r
newbie \ n00b

   

Зарегистрирован: 15.09.2005
Сообщения: 16

СообщениеДобавлено: Чт Сен 15, 2005 7:48 pm    Заголовок сообщения: Can someone help a little?:) Ответить с цитатой

ok, now, i want to make in my q2protr client that it would draw how many bullets, and weapons i have:) (need for drop, which weapon and like that)
this just dwars pics, but not values:
set pic1x 30
set pic1y 30

scrdef s pic11 "xl" $pic1x "yt" $pic1y "picn a_bullets"
cvar_inc pic1y 30
scrdef s pic12 "xl" $pic1x "yt" $pic1y "picn a_shells"
cvar_inc pic1y 30
scrdef s pic13 "xl" $pic1x "yt" $pic1y "picn a_grenades"
cvar_inc pic1y 30
scrdef s pic14 "xl" $pic1x "yt" $pic1y "picn a_rockets"
cvar_inc pic1y 30
scrdef s pic15 "xl" $pic1x "yt" $pic1y "picn a_cells"
cvar_inc pic1y 30
scrdef s pic16 "xl" $pic1x "yt" $pic1y "picn a_slugs"
cvar_inc pic1y 30

please someone help me:)
thanx
Вернуться к началу
upp3r is offline Посмотреть профиль Отправить личное сообщение
[MiR]-RPG
АЦЦКИЙ ДЕД!!!

   

Зарегистрирован: 03.11.2003
Сообщения: 2334
Откуда: Yarcity

СообщениеДобавлено: Чт Сен 15, 2005 11:37 pm    Заголовок сообщения: Ответить с цитатой

try it for example
scrdef s c "ifne $nammo xv 0 yv 40 string [@=$nammo$]"
scrdef s d "num $curweap xr -100 yb -160 string [W=$curweap$]"

_________________

Кому пельмешку? =)
Вернуться к началу
[MiR]-RPG is offline Посмотреть профиль Отправить личное сообщение
upp3r
newbie \ n00b

   

Зарегистрирован: 15.09.2005
Сообщения: 16

СообщениеДобавлено: Пт Сен 16, 2005 12:30 am    Заголовок сообщения: Ответить с цитатой

[MiR]-RPG писал(а):
try it for example
scrdef s c "ifne $nammo xv 0 yv 40 string [@=$nammo$]"
scrdef s d "num $curweap xr -100 yb -160 string [W=$curweap$]"

thank you, ill try
Вернуться к началу
upp3r is offline Посмотреть профиль Отправить личное сообщение
upp3r
newbie \ n00b

   

Зарегистрирован: 15.09.2005
Сообщения: 16

СообщениеДобавлено: Пт Сен 16, 2005 12:54 am    Заголовок сообщения: Ответить с цитатой

hmz, is there something like $nbullets or somethin' that would display number of bullets that i poses, when a railgun (any other weapon is drawn,)
maybe it has to do something with entdef?
and is there variable for how many weapons u have?
Вернуться к началу
upp3r is offline Посмотреть профиль Отправить личное сообщение
upp3r
newbie \ n00b

   

Зарегистрирован: 15.09.2005
Сообщения: 16

СообщениеДобавлено: Сб Сен 17, 2005 2:23 pm    Заголовок сообщения: Ответить с цитатой

plz, someone help me!Smile
Вернуться к началу
upp3r is offline Посмотреть профиль Отправить личное сообщение
[MiR]Esoptron
chain master

   

Зарегистрирован: 17.10.2003
Сообщения: 92
Откуда: Sydney, Oz

СообщениеДобавлено: Пн Сен 19, 2005 3:21 pm    Заголовок сообщения: Ответить с цитатой

upp3r,

First thing you do not output anything but icons in your script.

Unfortunately in q2protr ver1 there is no such internal variables that would normally tell you the ammount of your ammo for all weapons you have (and also which weapons you do have). Moreover there are no such variables inside client - these values are kept on server side only.
It is possible, however, to output number of ammo for current weapon as suggested by RPG:
scrdef s c "ifne $nammo xv 0 yv 40 string [@=$nammo$]"

You may want to create your own script that would calculate the ammount for any weapon using the following idea:
On respawn set counters to 0. Create a take trigger that will fire on taking bullets/whatever that will increase an appropriate counter by the ammount of ammo taken (e.g. bulets +50, rockets +5). On any drop command decrease the counter respectively. On switching to that weapon update the counter any time you fire. Clear all counters on death trigger.
The only thing is this would not work for dropped items: if you drop slugs and you have only 1 slug then only 1 slug will be dropped and you get 10 of them by this algorithm :/

In version 2 that I have locally take triggers are much more stable and this approach would give you approximate numbers.
Вернуться к началу
[MiR]Esoptron is offline Посмотреть профиль Отправить личное сообщение
upp3r
newbie \ n00b

   

Зарегистрирован: 15.09.2005
Сообщения: 16

СообщениеДобавлено: Пт Сен 23, 2005 6:02 pm    Заголовок сообщения: Ответить с цитатой

thanks for info, ill try to du that:)
Вернуться к началу
upp3r is offline Посмотреть профиль Отправить личное сообщение
upp3r
newbie \ n00b

   

Зарегистрирован: 15.09.2005
Сообщения: 16

СообщениеДобавлено: Сб Сен 24, 2005 1:30 pm    Заголовок сообщения: Ответить с цитатой

ok, i was doing with the idead of clinet side counting how much you ammo carrie, but then i got an idea, when you shoot -1 ammo right? rocket launcher, rail gun, shotgun, ssg -2 and so on, but what about chaingun? 8 bullets per second, how to count that? - $had_ammo-$nammo$ ?Smile)
and, is thete some counter in q2? or somethin' like that to make?
like if you take yellow armor, and trigger the counter that starts
[Yellow ammo in arena back in - XXs.]
?Smile i use sounds for that, but it isint that efficient:/
Вернуться к началу
upp3r is offline Посмотреть профиль Отправить личное сообщение
Показать сообщения:   
Начать новую тему   Ответить на тему    Список форумов http://forum.quake2.com.ru -> q2pro Часовой пояс: GMT + 7
Страница 1 из 1

 
Перейти:  
Вы не можете начинать темы
Вы не можете отвечать на сообщения
Вы не можете редактировать свои сообщения
Вы не можете удалять свои сообщения
Вы не можете голосовать в опросах
Вы не можете вкладывать файлы
Вы не можете скачивать файлы


Powered by phpBB © 2001, 2005 phpBB Group

File Attachment © by Meik Sievertsen

Anti Bot Question MOD - phpBB MOD against Spam Bots
Заблокировано регистраций / сообщений: 15717 / 0