Raised This Month: $12 Target: $400
 3% 

leave only the bomb


Post New Thread Reply   
 
Thread Tools Display Modes
jonny1990
Senior Member
Join Date: Apr 2020
Old 07-04-2020 , 11:35   Re: leave only the bomb
Reply With Quote #41

Quote:
Originally Posted by Celena Luna View Post
Like in the image I used?
all other types of weapons won't have illumination?
please make sure that all other weapons do not spin and lie on the ground as usual
jonny1990 is offline
Celena Luna
Veteran Member
Join Date: Aug 2013
Location: Nagazora
Old 07-04-2020 , 11:39   Re: leave only the bomb
Reply With Quote #42


Code:
/* *   _______     _      _  __          __ *  | _____/    | |    | | \ \   __   / / *  | |         | |    | |  | | /  \ | | *  | |         | |____| |  | |/ __ \| | *  | |   ___   | ______ |  |   /  \   | *  | |  |_  |  | |    | |  |  /    \  | *  | |    | |  | |    | |  | |      | | *  | |____| |  | |    | |  | |      | | *  |_______/   |_|    |_|  \_/      \_/ * * * *  Last Edited: 12-31-07 * *  ============ *   Changelog: *  ============ * *  v2.0 *    -Added color to floating weapons * *  v1.0 *    -Initial Release * */ #define VERSION "2.0.1" #include <amxmodx> #include <amxmisc> #include <engine> #include <fakemeta> #include <fun> new toggle_pcvar public plugin_init() {     register_plugin("UT Style Floating Weapons",VERSION,"GHW_Chronic")     toggle_pcvar = register_cvar("FW_enabled","1")     register_forward(FM_SetModel,"W_Model_Hook",1)     register_touch("weaponbox","worldspawn","touch") } public W_Model_Hook(ent,model[]) {     if(get_pcvar_num(toggle_pcvar) && pev_valid(ent))     {         static classname[32]         pev(ent,pev_classname,classname,31)         if(equali(classname,"weaponbox") && get_pdata_bool(ent, 420, 4))         {             set_pev(ent,pev_renderfx,kRenderFxGlowShell)             switch(random_num(1,4))             {                 case 1: set_pev(ent,pev_rendercolor,Float:{0.0,0.0,255.0})                 case 2: set_pev(ent,pev_rendercolor,Float:{0.0,255.0,0.0})                 case 3: set_pev(ent,pev_rendercolor,Float:{255.0,0.0,0.0})                 case 4: set_pev(ent,pev_rendercolor,Float:{255.0,255.0,255.0})             }             static Float:angles[3]             pev(ent,pev_angles,angles)             angles[0] -= 90.0             angles[1] += 45.0             set_pev(ent,pev_angles,angles)         }     } } public touch(weaponbox,worldspawn) {     if(get_pcvar_num(toggle_pcvar) && pev_valid(weaponbox) && get_pdata_bool(weaponbox, 420, 4))     {                 set_pev(weaponbox,pev_movetype,MOVETYPE_FLY)         static Float:origin[3]         pev(weaponbox,pev_origin,origin)         origin[2] += 30.0         set_pev(weaponbox,pev_origin,origin)     } }

There
__________________
My plugin:

Last edited by Celena Luna; 07-04-2020 at 11:40.
Celena Luna is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 07-04-2020 , 11:54   Re: leave only the bomb
Reply With Quote #43

Quote:
Originally Posted by Celena Luna View Post
Edit: The offset was 420, not 105.
420 and 105 are actually the same offset. The game uses full offsets(like 420), unlike plugins which usually use offsets divided by size(like the original pdata natives).
Therefore, if I recall correctly get_pdata_bool from amxx wants the full offset, but if you used Connor's stock for example you would have to pass 105.
420 / 4 = 105.
__________________

Last edited by HamletEagle; 07-04-2020 at 11:55.
HamletEagle is offline
jonny1990
Senior Member
Join Date: Apr 2020
Old 07-04-2020 , 11:55   Re: leave only the bomb
Reply With Quote #44

Quote:
Originally Posted by Celena Luna View Post

Code:
/* *   _______     _      _  __          __ *  | _____/    | |    | | \ \   __   / / *  | |         | |    | |  | | /  \ | | *  | |         | |____| |  | |/ __ \| | *  | |   ___   | ______ |  |   /  \   | *  | |  |_  |  | |    | |  |  /    \  | *  | |    | |  | |    | |  | |      | | *  | |____| |  | |    | |  | |      | | *  |_______/   |_|    |_|  \_/      \_/ * * * *  Last Edited: 12-31-07 * *  ============ *   Changelog: *  ============ * *  v2.0 *    -Added color to floating weapons * *  v1.0 *    -Initial Release * */ #define VERSION "2.0.1" #include <amxmodx> #include <amxmisc> #include <engine> #include <fakemeta> #include <fun> new toggle_pcvar public plugin_init() {     register_plugin("UT Style Floating Weapons",VERSION,"GHW_Chronic")     toggle_pcvar = register_cvar("FW_enabled","1")     register_forward(FM_SetModel,"W_Model_Hook",1)     register_touch("weaponbox","worldspawn","touch") } public W_Model_Hook(ent,model[]) {     if(get_pcvar_num(toggle_pcvar) && pev_valid(ent))     {         static classname[32]         pev(ent,pev_classname,classname,31)         if(equali(classname,"weaponbox") && get_pdata_bool(ent, 420, 4))         {             set_pev(ent,pev_renderfx,kRenderFxGlowShell)             switch(random_num(1,4))             {                 case 1: set_pev(ent,pev_rendercolor,Float:{0.0,0.0,255.0})                 case 2: set_pev(ent,pev_rendercolor,Float:{0.0,255.0,0.0})                 case 3: set_pev(ent,pev_rendercolor,Float:{255.0,0.0,0.0})                 case 4: set_pev(ent,pev_rendercolor,Float:{255.0,255.0,255.0})             }             static Float:angles[3]             pev(ent,pev_angles,angles)             angles[0] -= 90.0             angles[1] += 45.0             set_pev(ent,pev_angles,angles)         }     } } public touch(weaponbox,worldspawn) {     if(get_pcvar_num(toggle_pcvar) && pev_valid(weaponbox) && get_pdata_bool(weaponbox, 420, 4))     {                 set_pev(weaponbox,pev_movetype,MOVETYPE_FLY)         static Float:origin[3]         pev(weaponbox,pev_origin,origin)         origin[2] += 30.0         set_pev(weaponbox,pev_origin,origin)     } }

There
thank you very much for your help
jonny1990 is offline
jonny1990
Senior Member
Join Date: Apr 2020
Old 07-04-2020 , 12:00   Re: leave only the bomb
Reply With Quote #45

only the model has stopped spinning
jonny1990 is offline
Celena Luna
Veteran Member
Join Date: Aug 2013
Location: Nagazora
Old 07-04-2020 , 12:14   Re: leave only the bomb
Reply With Quote #46

Quote:
Originally Posted by HamletEagle View Post
420 and 105 are actually the same offset. The game uses full offsets(like 420), unlike plugins which usually use offsets divided by size(like the original pdata natives).
Therefore, if I recall correctly get_pdata_bool from amxx wants the full offset, but if you used Connor's stock for example you would have to pass 105.
420 / 4 = 105.
I tried 105, it didn't work.

Quote:
Originally Posted by jonny1990 View Post
only the model has stopped spinning
Spoiler
__________________
My plugin:

Last edited by Celena Luna; 07-04-2020 at 12:17.
Celena Luna is offline
Old 07-04-2020, 12:27
HamletEagle
This message has been deleted by HamletEagle.
jonny1990
Senior Member
Join Date: Apr 2020
Old 07-04-2020 , 12:34   Re: leave only the bomb
Reply With Quote #47

Quote:
Originally Posted by Celena Luna View Post
I tried 105, it didn't work.


Spoiler
works thank you) the only thing when it turns is as if there are friezes at the rotation, as if it twitches during rotation, you can not make a smooth rotation?
jonny1990 is offline
Celena Luna
Veteran Member
Join Date: Aug 2013
Location: Nagazora
Old 07-04-2020 , 13:45   Re: leave only the bomb
Reply With Quote #48

There is pev_avelocity which make model spin naturally but for some reason, when it touch ground, the weapon will stop spinning so this is the best it can do.
__________________
My plugin:

Last edited by Celena Luna; 07-04-2020 at 13:46.
Celena Luna is offline
jonny1990
Senior Member
Join Date: Apr 2020
Old 07-04-2020 , 13:48   Re: leave only the bomb
Reply With Quote #49

Quote:
Originally Posted by Celena Luna View Post
There is pev_avelocity which make model spin naturally but for some reason, when it touch ground, the weapon will stop spinning so this is the best it can do.
well, thank you)
jonny1990 is offline
Reply


Thread Tools
Display Modes

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 01:15.


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