AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   ESF and wanna add 1 extra Transformation or Powerup. (https://forums.alliedmods.net/showthread.php?t=13351)

Stephen 05-13-2005 13:01

ESF and wanna add 1 extra Transformation or Powerup.
 
MEh

Thxerino

LynX 05-14-2005 12:08

Code:
#include <amxmodx> #include <fakemeta> #include <engine> new powerLimit[33] new COOLDOWN = 15 // represents how many seconds must pass untill player can use powerup again public plugin_init() { register_plugin("Powerup","0.1","Lynx") register_clcmd("power","powerup") return PLUGIN_CONTINUE } public powerup(id) { if ( powerLimit[id] !=0 ) { return PLUGIN_HANDLED } else { if ( entity_get_int( id, EV_INT_playerclass, 3) { new powerlevel = get_pdata_int(id, 460) // gets powerlevel set_pdata_int(id, 460, powerlevel + 25000 ) // current powerlevel + new set_pdata_int(id, 461, powerlevel + 25000 ) // current powerlevel + new set_task(COOLDOWN, "powerup_can",id) // sets task so you can be able to use again powerup after a specific period of time powerLimit[id] = 1 // powerup is used, can'be used again untill its 0 } else { } return PLUGIN_HANDLED } return PLUGIN_HANDLED } public powerup_can(id) { powerLimit[id] = 0 // powerup now can be used return PLUGIN_HANDLED }

Btw, hi Stephen ^^

Stephen 05-14-2005 12:16

Meh
Fixed

Stephen 05-14-2005 12:36

New LynX Request ^-^

How would you add a NEW extra Transformation JUST for Gohan ?
Just an Single one, where also lets PL grow ?
Also with some Effects.
- It should get an Extra Model and an Extra Trans Sound.
Basicly what EVM does. JUST for Gohan.
Nothing Fancy.

LynX 05-14-2005 12:55

erm, I think you got EvolutionSSJ4 source from Encore, right? Well if you did, just create a new "avatar" above your current model, and use this stuff...

Use entity_get_int for getting teh player class, etc.

Yeah, no time hearing, yep ^^

Stephen 05-14-2005 13:11

Hmm.

So
Quote:

#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <fakemeta>
#include <engine>

new PLUGIN[]="Gohans'Power"
new AUTHOR[]="Stephen"
new VERSION[]="0.1"


public plugin_init()
{

register_plugin("PLUGIN","VERSION","AUTHOR")
register_clcmd("ascend","ascend")

return PLUGIN_CONTINUE

}

new avatars[33]]


public create_avatar(33)

{

avatars[id] = create_entity( "env_model" );
entity_set_int( avatars[id], EV_INT_movetype, MOVETYPE_FOLLOW );
entity_set_edict( avatars[id], EV_ENT_aiment, id );
entity_set_model( avatars[id], "modelpathhere.mdl" )

return PLUGIN_HANDLED
}

Is that to creat an new avatar ?

Just the Avatar stuff i mean, cause i just mixed that thing up right now >.<
I know its missing alot. But... You know :oops:

LynX 05-15-2005 05:42

Yes, that's how you create a avatar.
One more thing, DO NEVER, EVER register a "ascend" command, unless you know what you're doing. If you really want to register it, make something in plugin and see if its engaged. If its engaged, block it with PLUGIN_HANDLED and do stuff. If the "something" is NOT done, just continue normal thing with PLUGIN_CONTINUE

Stephen 05-15-2005 06:41

Ok when i change the COmmand to lets say "avatar" then when i type that in the console an Avatar should appear ?

When the Path to teh Model is player/ssj2gohan/ssj2gohan.mdl

I also need to prechache then ?

And ive readed somewhere that i have to set the Visibilty of the Current Player to 0 or what was taht about.

LynX 05-15-2005 07:34

Yes, put ur model path into the entity_set_model. You must precache it, yes.

No, to set visibility of player use set_user_rendering for players and set_rendering for avatar(s) & entites.


All times are GMT -4. The time now is 16:37.

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