Raised This Month: $ Target: $400
 0% 

2 features help!!!! (useful for many ppl i think)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
haimmaik
Senior Member
Join Date: Jul 2005
Old 11-01-2005 , 23:04  
Reply With Quote #1

there are some errors on ur sma file

[edit]
ok i fixed the errors but its still doing the same.. it doesnt shoot anything just blow me up...

can u please try to make it work?
Attached Files
File Type: sma Get Plugin or Get Source (plasma.sma - 84 views - 2.1 KB)
File Type: sma Get Plugin or Get Source (plasma.sma - 378 views - 2.1 KB)
haimmaik is offline
Batman/Gorlag
Senior Member
Join Date: Aug 2005
Old 11-01-2005 , 23:14  
Reply With Quote #2

Here's a pointer:

Code:
new velocity[3] //Should be new Float:velocity[3] //This.

Instead of
Code:
fOrigin[3] + 10

Replace it with:
Code:
new Float:posAdjust[3] //Used for adjusting the starting position velocity_by_aim(id, 50, posAdjust)  //You can replace 50 with whatever fOrigin[0] += posAdjust[0] fOrigin[1] += posAdjust[1] fOrigin[2] += posAdjust[2] entity_set_vector(ePlasmaBall, EV_VEC_origin, fOrigin)

There might be more, only took a brief look.

EDIT: BTW you don't need to do this twice: precache_model("sprites/suicideexplode.spr) just delete one of them.
__________________
GRR If only the amxmod programming were in Java.....
Java and C used to be two different languages, now Java is turning into another C. My logevent plugin
Batman/Gorlag is offline
haimmaik
Senior Member
Join Date: Jul 2005
Old 11-01-2005 , 23:24  
Reply With Quote #3

it still doesnt do anything but blowing me up and killing me
haimmaik is offline
Batman/Gorlag
Senior Member
Join Date: Aug 2005
Old 11-01-2005 , 23:30  
Reply With Quote #4

Okay play around with the second parameter of the velocity_by_aim function I gave from your post above. I recommend changing 50 to 100. Tell me what happens after that.
__________________
GRR If only the amxmod programming were in Java.....
Java and C used to be two different languages, now Java is turning into another C. My logevent plugin
Batman/Gorlag is offline
haimmaik
Senior Member
Join Date: Jul 2005
Old 11-01-2005 , 23:35  
Reply With Quote #5

same....

can u please try it urself? :\
haimmaik is offline
Batman/Gorlag
Senior Member
Join Date: Aug 2005
Old 11-01-2005 , 23:39  
Reply With Quote #6

Nope I can't for the time being, doing homework but I recommend you to do this:

Make the maxs, and mins smaller, maybe at least half their size....that could be your problem, that the entity is big.
__________________
GRR If only the amxmod programming were in Java.....
Java and C used to be two different languages, now Java is turning into another C. My logevent plugin
Batman/Gorlag is offline
Zenith77
Veteran Member
Join Date: Aug 2005
Old 11-01-2005 , 23:46  
Reply With Quote #7

Sorry i couldnt get back to ya, the entity is to big :/ just decrease the size (maintain proportions ) until you like the size...
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
haimmaik
Senior Member
Join Date: Jul 2005
Old 11-02-2005 , 08:57  
Reply With Quote #8

ok i worked everything out.
Code:
#include <amxmodx>  #include <amxmisc>  #include <fun>  #include <cstrike>  #include <engine>  new gExplosionModel  public plugin_precache()  {     precache_model("models/player/predator2/predator2.mdl")     precache_model("sprites/plasma.spr")     gExplosionModel = precache_model("sprites/suicideexplode.spr")     precache_sound("misc/doh7.wav")     return PLUGIN_CONTINUE  }  public plugin_init()  {     register_plugin("Plasmatest","1.00","Haim")     register_clcmd("shoot","myfunc")     register_touch("PlasmaBall","*","plasma_interact")  }  public myfunc(id)  {     new origin[3], Float:fOrigin[3]     new Float:velocity[3]     get_user_origin(id,origin,1)     IVecFVec(origin, fOrigin)     new ePlasmaBall = create_entity("info_target")     entity_set_string(ePlasmaBall, EV_SZ_classname, "PlasmaBall")     new Float:posAdjust[3] //Used for adjusting the starting position     velocity_by_aim(id, 100, posAdjust)  //You can replace 50 with whatever     fOrigin[0] += posAdjust[0]     fOrigin[1] += posAdjust[1]     fOrigin[2] += posAdjust[2]     entity_set_vector(ePlasmaBall, EV_VEC_origin, fOrigin)     entity_set_vector(ePlasmaBall, EV_VEC_origin,fOrigin)     new Float:maxs[3] = {1.0,1.0,1.5}     new Float:mins[3] = {-1.0,-1.0,-1.5}     entity_set_size(ePlasmaBall,mins,maxs)     entity_set_int(ePlasmaBall,EV_INT_solid, SOLID_BBOX)     entity_set_int(ePlasmaBall,EV_INT_movetype,MOVETYPE_FLYMISSILE)     entity_set_float(ePlasmaBall,EV_FL_framerate,5.0)     set_rendering(ePlasmaBall, kRenderFxNoDissipation, 0, 100, 255, kRenderGlow, 255)     entity_set_model(ePlasmaBall, "sprites/plasma.spr")     emit_sound(ePlasmaBall, CHAN_STATIC, "misc/doh7.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)     VelocityByAim(id,800,velocity)     entity_set_vector(ePlasmaBall,EV_VEC_velocity,velocity)  }  public plasma_interact(ePlasmaBall,other) {     if(other == 0) {         new Float:fOrigin[3]         new iOrigin[3]         entity_get_vector(ePlasmaBall, EV_VEC_origin, fOrigin)         FVecIVec(fOrigin, iOrigin)         message_begin(MSG_BROADCAST, SVC_TEMPENTITY)         write_byte(3) // TE_EXPLOSION         write_coord(iOrigin[0])         write_coord(iOrigin[1])         write_coord(iOrigin[2]+50)         write_short(gExplosionModel)         write_byte(100)         write_byte(0)         write_byte(0)         message_end()         RadiusDamage(fOrigin, 15,  60)         remove_entity(ePlasmaBall)     }     else if(is_user_connected(other)) {         user_kill(other, 0)     }  }

i even changed the movetype from toss to flymissle... so now i really shoot plasma balls...
but how do i change the speed of the shooting??
haimmaik is offline
haimmaik
Senior Member
Join Date: Jul 2005
Old 11-02-2005 , 09:55  
Reply With Quote #9

and the explotion comes too soon... the entity doesnt really touch the wall...
haimmaik is offline
Zenith77
Veteran Member
Join Date: Aug 2005
Old 11-02-2005 , 09:55  
Reply With Quote #10

Code:
VelocityByAim(id,800,velocity)


Change the 800 to higher or lower number....


p.s. Can you post all the sprites and stuff ^^ I want to try it out
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
Reply



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 23:50.


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