code help

New Member
Joined
Aug 22, 2005
Messages
105
Best answers
0
Hello guys,

i'm trying to make a little plugin that gives a glow to some player that says the magical words.

- i know how to make it work with the words, but how you look if the character is actually one of the 2 (goku - vegeta) ?

- can anyone tell me how to add a glow ?

- also how do you delay stuff like it may only happen when sound is played?


ssj2goku
 
Lost in space
Banned
💻 Oldtimer
Joined
Dec 1, 2002
Messages
2,725
Best answers
0
It'll be different depending on what serverside mod you're making it for. I think all of them use SMALL, but they have different implementations.

If you're using AMX Mod X (what most people seem to use) read their scripting tutorial, then check out their function reference. This is the function you'd use to apply/remove a glowshell.

You're basically going to make a function that intercepts the "say" command, check to see if they say what you want them to, and render a glowshell on them if they do.
 
Active Member
★ Black Lounger ★
✔️ HL Verified
💻 Oldtimer
Joined
Jul 14, 2002
Messages
8,229
Best answers
0
Location
December
I'm not sure if this is what you're looking for but if you know about the Sleep command you can always do Sleep(2000) or Whatever the command is, it's something like that D:
 
Active Member
✔️ HL Verified
💻 Oldtimer
Joined
Jul 13, 2004
Messages
1,232
Best answers
0
Location
Germany | Bayern
I believe that the is no sleep command in amxx.

YOu have to make it with Task functions
set_task(0.1, "function", id, "b")
0.1 starts then in 0.1 seconds once the cmd is used. "function"
starts the function where is connected, "b" is single playing i think

so its
public THINGY(id)
{
set_task(0.1, "function", id, "b");

return PLUGIN_HANDLED;
}
public function(id)
{
do thinggy you want here

return PLUGIN_HANDLED
}
 
New Member
Joined
Aug 22, 2005
Messages
105
Best answers
0
ty for the help, but how you make an if construction which checks if the persons character is goku or vegeta only, so that if hes buu the plugin wont work?

Code:
if (player_class == character_vegeta){ 

}
else if (player_class == character_goku){


}
like this :confused:




also for the glowing part, is this a good code :confused:

Code:
set_task(0.1,set_user_rendering(index,kRenderFxGlowShell,128,128,256,kRenderNormal,25))  (little supa saiyan glow  :) )

set_task(2.0,set_user_rendering(index,kRenderFxGlowShell,0,0,0,kRenderNormal,25))
i read this will do the function only once

-- servermod => amxmodx
 
Project Manager
🌠 Staff
✔️ HL Verified
💻 Oldtimer
Joined
Nov 25, 2001
Messages
1,729
Best answers
0
Code:
public myfunction(id)
{

new playermodel[64];

get_user_info(id, "model", playermodel, 63);

if ( equali(playermodel, "goku") != -1 )
{
 // Goku Action
}

else if ( equali(playermodel, "vegeta") != -1 )
{
// Vegeta Action
}

return 1;
}
Have Fun, further questions ?
 
New Member
Joined
Aug 22, 2005
Messages
105
Best answers
0
ty ty ty

yup i got some more :)

i think you wont like to answer on these one :)

- how to make such effects like when you become a supersaiyan ?
I know its with sprites and models, but how you make that big explosion that appears on goku when he goes ssj for first time?

- set_task(0.1,turbo,id) => will that activate the turbo aura on a person ?
- set_task(0.1,+powerup,id) => " " the powerup sprite " "

- how you make a person not move while hes transforming ?
is it with max_speed? but i guess not, cause with max_speed u can still turn around


for now i dont kno any questions anymore :)

if you could answer on these ones i would be really happy, its the first time i code heh


thanks in advance

ssj2Goku
 
Project Manager
🌠 Staff
✔️ HL Verified
💻 Oldtimer
Joined
Nov 25, 2001
Messages
1,729
Best answers
0
Code:
message_begin(MSG_ALL,get_user_msgid("TransformFX"));
write_byte(id);
write_byte( integer );
write_byte(0);
message_end();
use this...

... believe me you feel allot better if you find those things out yourself, kinda makes you proud and you dont feel like someone who's just got everything cuz he's asking all the time :) :yes:
 
New Member
Joined
Aug 22, 2005
Messages
105
Best answers
0
problem is i dont kno anything about coding heh :rolleyes:
it would have taken my years to find it

ty :)

so what does it do that FX thingy :)
the stuff i typed before ?

ow yea one more thingy,

how do you change the color of the transformation turbo ?
 
Project Manager
🌠 Staff
✔️ HL Verified
💻 Oldtimer
Joined
Nov 25, 2001
Messages
1,729
Best answers
0
the transformation turbo ? pls define what you mean by that.
 
New Member
Joined
Aug 22, 2005
Messages
105
Best answers
0
- when you press t => thats binded to turbo
thats the normal turbo

can you change the color of the normal turbo ?


- but in transformation you see a lot of strange pikes turning around you, those pikes
can you change the color of them ?
 
Project Manager
🌠 Staff
✔️ HL Verified
💻 Oldtimer
Joined
Nov 25, 2001
Messages
1,729
Best answers
0
you can change the normal turbo color, by e.g. looking for the entity, using a specific characteristica of the entity and then change its skin. You will surely know how to do it since you studied the amxx include files right ;)
 
New Member
Joined
Aug 22, 2005
Messages
105
Best answers
0
the includes are really good to read, only bit hard in finding the stuff back you actually need

ow yea raven:

your code for the effects doesn't do a thingy ?
it immediately skips that part without doing a thing :confused:

or does it need another part on it also ?

ssj2goku
 
Project Manager
🌠 Staff
✔️ HL Verified
💻 Oldtimer
Joined
Nov 25, 2001
Messages
1,729
Best answers
0
u dont have the slightest idea what u are doing have u o_O
... what I posted were some single lines of code and not a plugin, u surely have to implent them into a plugin which you, of course already wrote, since u know what you're doing right.

Anyway, post your code or send me a pm and I'll tell you whats wrong with it :yes:
 
New Member
Joined
Aug 22, 2005
Messages
105
Best answers
0
core | Raven said:
u dont have the slightest idea what u are doing have u o_O
... what I posted were some single lines of code and not a plugin, u surely have to implent them into a plugin which you, of course already wrote, since u know what you're doing right.

Anyway, post your code or send me a pm and I'll tell you whats wrong with it :yes:
lol raven, the other guy and I are working together on it, he also saw it didnt worked
anyway i just deleted them and got a fully working beta version

what i did was adding those lines in a public sub where already code was
somehow it skipped that whole part
i had to make a "new integer" before it let me compile the whole plugin with your piece in it, since then no errors and no warnings but also no effects

so i used the turbo and +powerup now for a bit of effects :)

PS: ill send you my version with the lines this evening, cause i dont have it here at my work

(yo ssj evolution x sup?)
 
New Member
✔️ HL Verified
Joined
Apr 23, 2005
Messages
416
Best answers
0
lollage 0o
...
nja?

Well, I don't see mistake with Raven't thingy. 0o

For turbo color changing, you need to find the entity of aura ( env_model ), and then its classname ( I beleive that is ''Aura'' ), and then set its EV_INT_skin.
I don't know for sure since I'm using another way of changing turbo color ( search for model, not for classname ).

So all put together would be:

Code:
new aura = find_ent_by_class(-1, ''Aura'' )
entity_set_int(aura, EV_INT_skin, numberofskinhere )
Btw, watch out for mine '' because its just two '
 
New Member
Joined
Aug 22, 2005
Messages
105
Best answers
0
Code:
new aura = find_ent_by_class(-1, ''Aura'' )
entity_set_int(aura, EV_INT_skin, numberofskinhere )
Btw, watch out for mine '' because its just two '[/quote]

------

o ty for helping meh, (i didnt saw this post yet untill now)

only prob is that i keep on getting this error:
Invalid character constant & unknown symbol Aura

EDIT: i guess that ' ' Aura ' ' needs to be "Aura", because then it compiled
EDIT 2: ok that doesnt do a thing "Aura"
 

Users who are viewing this thread

Top Bottom