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

want to learn scripting


Post New Thread Reply   
 
Thread Tools Display Modes
Albanian Zombie
Senior Member
Join Date: May 2013
Location: void
Old 11-13-2013 , 12:57   Re: want to learn scripting
Reply With Quote #41

Quote:
Originally Posted by joshknifer View Post
Then why did you ask him for it?
I didnt ask!
someone maked it and he sayed me that if u can find someone I can sell this so thats why I sayed this kid I want the money it wasnt mine!
Albanian Zombie is offline
rulez_3
BANNED
Join Date: Sep 2013
Old 11-13-2013 , 13:33   Re: want to learn scripting
Reply With Quote #42

Quote:
Originally Posted by ConnorMcLeod View Post
te_Beament and Te_Beampoints don't exist.
You mean TE_BEAMENTPOINT.

I already gave you a working code with that message, are you gonna create 100 threads for this ?

Anyway in the code i gave you :

Spoiler


PHP Code:
    Util_TE_BEAMENTPOINT_f(ididg_vecHookOrigin[id], m_spriteTexture01110random_num(10,15), random(0x100), random(0x100), random(0x100), random(0x100), 1); 
Here change random_num(10,15) some something higher so you obtain a bigger noise and something close to what you are searching for, like random_num(70,150)
bro this is not lighnting can any one help me making beam lighnting
rulez_3 is offline
joshknifer
Veteran Member
Join Date: Jun 2011
Location: Denver, CO
Old 11-13-2013 , 13:38   Re: want to learn scripting
Reply With Quote #43

Quote:
Originally Posted by Kia View Post
Stop discussing now, it's annoying to see the messages when I open Tapatalk on my phone..
Lazy shits these days...

PHP Code:
/* Plugin generated by AMXX-Studio */

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

#define PLUGIN "Firework Hook"
#define VERSION "1.0.0"
#define AUTHOR "Kia"

// ===============================================================================
//     Editing begins here
// ===============================================================================

// Flag required for using the Firework Hook
#define HOOK_FLAG ADMIN_ALL

// ===============================================================================
//     and stops here. DO NOT MODIFY BELOW UNLESS YOU KNOW WHAT YOU'RE DOING
// ===============================================================================

// ===============================================================================
//     Variables
// ===============================================================================

/* Defines */

#define TASK_ID_HOOK 1821
#define DUMMY_VAR 1787569

#define message_begin_f(%1,%2,%3) ( engfunc ( EngFunc_MessageBegin, %1, %2, %3 ) )
#define write_coord_f(%1)         ( engfunc ( EngFunc_WriteCoord, %1 ) )

/* Booleans */

new bool:g_bIsHooking[33]

/* Integer */

new g_iDestOrigin[33][3]

/* Consts */

const NULL_ENT               0;

/* Ressources */

new szSprite
new szFlare3szFlare6szBlueFlareszRedFlare

// ===============================================================================
//     plugin_precache
// ===============================================================================

public plugin_precache()
{
    
szSprite precache_model("sprites/laserbeam.spr")

    
szFlare3 precache_model("sprites/flare3.spr")
    
szFlare6 precache_model("sprites/flare6.spr")
    
    
szBlueFlare precache_model("sprites/fwh/bflare.spr")
    
szRedFlare precache_model("sprites/fwh/rflare.spr")
    
    
precache_sound("weapons/xbow_hit2.wav")
}

// ===============================================================================
//     plugin_init
// ===============================================================================

public plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
/* Concmds */
    
    
register_concmd("+hook","ConCMD_HookOn"ADMIN_BAN," - Usage : +hook")
    
register_concmd("-hook","ConCMD_HookOff")
}

// ===============================================================================
//     ConCMD_HookOn - Called when someone presses +hook
// ===============================================================================

public ConCMD_HookOn(idlevelcid)
{
    
// If user has no access, abort
    
if(!cmd_access(idlevelcid1) || g_bIsHooking[id])
        return 
PLUGIN_HANDLED
    
    
// Removing Gravity so player can fly
    
set_user_gravity(id0.0)
    
    
// Creating Task for the Hook making the Person moving to the aimed direction
    
set_task(0.1,"Env_HookThink"id TASK_ID_HOOK""0"b")
    
    
// Telling the plugin that the player is using the hook right now
    
g_bIsHooking[id]=true
    g_iDestOrigin
[id][0] = DUMMY_VAR
    
    
// Starting the Function
    
Env_HookThink(id TASK_ID_HOOK)
    
    
// Playing the hook Sound
    
emit_sound(id,CHAN_VOICE"weapons/xbow_hit2.wav"1.0ATTN_NORM0PITCH_NORM)
    
    return 
PLUGIN_HANDLED
}

// ===============================================================================
//     Env_HookThink - Brain for Hook
// ===============================================================================

public Env_HookThink(id)
{
    
// Since we've used id + TASK_ID_HOOK, we need to remove TASK_ID_HOOK to get the id
    
id -= TASK_ID_HOOK
    
    
// If the playier isn't hooking or if he isn't alive, abort
    
if(!g_bIsHooking[id] || !is_user_alive(id))
    {
        
remove_task(id TASK_ID_HOOK)
        return 
PLUGIN_HANDLED
    
}
    
    
// Getting players Position
    
new iOrigin[3]
    
get_user_origin(idiOrigin)
    
    
// If he just started to use the hook, get the position where he wants to go
    
if(g_iDestOrigin[id][0] == DUMMY_VAR)
    {
        new 
iOrigin2[3]
        
get_user_origin(idiOrigin2,3)
        
        
g_iDestOrigin[id][0] = iOrigin2[0]
        
g_iDestOrigin[id][1] = iOrigin2[1]
        
g_iDestOrigin[id][2] = iOrigin2[2]
    }
    
    
// Making a random number for the effects
    
new iDirection[3]
    
iDirection[0] = random_num(0255)
    
iDirection[1] = random_num(0255)
    
iDirection[2] = random_num(0255)
    
    
// Effects
    
_fx_TE_BEAMENTPOINT(idg_iDestOrigin[id][0], g_iDestOrigin[id][1], g_iDestOrigin[id][2], szSprite020110010random_num(0255),random_num(0255),random_num(0255), 100255)
    
_fx_TE_STREAK_SPLASH(g_iDestOrigin[id], iDirectionrandom_num(0255), 1555)
    
_fx_TE_PARTICLEBURST(g_iDestOrigin[id], 500random_num(0255), 150)

    
// Making random number for choosing random sprite for the effects
    
new iSprite
    
new iChooser random_num(0,3

    switch(
iChooser)
    {
        case 
0iSprite szFlare3
        
case 1iSprite szBlueFlare
        
case 2iSprite szFlare6
        
case 3iSprite szRedFlare    
    
}

    
// Creating Sprite Trail
    
_fx_TE_SPRITETRAIL(g_iDestOrigin[id], g_iDestOrigin[id], iSprite25101510010)
    
    
// Calculating Velocity
    
new Float:flVelocity[3]
    
    
flVelocity[0] = (float(g_iDestOrigin[id][0]) - float(iOrigin[0])) * 3.0
    flVelocity
[1] = (float(g_iDestOrigin[id][1]) - float(iOrigin[1])) * 3.0
    flVelocity
[2] = (float(g_iDestOrigin[id][2]) - float(iOrigin[2])) * 3.0
    
    
new Float:y
    y 
flVelocity[0] * flVelocity[0] + flVelocity[1] * flVelocity[1] + flVelocity [2] * flVelocity[2]
    
    new 
Float:x
    x 
= (600 floatsqroot(y))
    
    
flVelocity[0] *= x
    flVelocity
[1] *= x
    flVelocity
[2] *= x
    
    
// Setting new Velocity
    
set_pev(idpev_velocityflVelocity)
    
    return 
PLUGIN_CONTINUE
}



// ===============================================================================
//     ConCMD_HookOff - Called when someone presses -hook
// ===============================================================================

public ConCMD_HookOff(id)
{
    
// If the player stopped using the Hook, reset his gravity to normal
    
    
if(is_user_alive(id)) 
        
set_user_gravity(id)
    
    
// Tell the plugin that the player isn't using the hook now
    
g_bIsHooking[id] = false
    
return PLUGIN_HANDLED
}

// ===============================================================================
//     Stocks
// ===============================================================================

public _fx_TE_STREAK_SPLASH ( const Origin[3], const Direction[3], const Color, const Count, const Speed, const VelocityRange )
{
    
message_begin(MSG_BROADCASTSVC_TEMPENTITY)
    
    
write_byteTE_STREAK_SPLASH )
    
    
write_coordOrigin] )
    
write_coordOrigin] )
    
write_coordOrigin] )
    
write_coordDirection] )
    
write_coordDirection] )
    
write_coordDirection] )
    
    
write_byteminColor255 ) )
    
write_shortCount )
    
write_shortSpeed )
    
write_shortVelocityRange )
    
    
message_end();
}


// ===============================================================================
//     _fx_TE_BEAMENTPOINT
// ===============================================================================

public _fx_TE_BEAMENTPOINT(iEntity, const iEndX, const iEndY, const iEndZ,  const iSpriteIndex, const iStartFrame, const iFrameRate, const iLifeTime, const iTrailWidth, const iAmplitude, const iColorR, const iColorG, const iColorB, const iBrightness, const iScrollSpeed)
{
    
message_begin(MSG_BROADCASTSVC_TEMPENTITY)
    
    
write_byte(TE_BEAMENTPOINT)
    
    
write_short(iEntity)    // start entity
    
    
write_coord(iEndX)    // end position
    
write_coord(iEndY)
    
write_coord(iEndZ)
    
    
write_short(iSpriteIndex)    // sprite index
    
    
write_byte(iStartFrame)    // starting frame
    
write_byte(iFrameRate)    // frame rate in 0.1's
    
write_byte(iLifeTime)    // life in 0.1's
    
write_byte(iTrailWidth)    // line width in 0.1's
    
write_byte(iAmplitude)    // noise amplitude in 0.01's
    
write_byte(iColorR)    // Red
    
write_byte(iColorG)    // Green
    
write_byte(iColorB)    // Blue
    
write_byte(iBrightness)    // brightness
    
write_byte(iScrollSpeed)    // scroll speed in 0.1's
    
    
message_end()
}

// ===============================================================================
//     _fx_TE_PARTICLEBURST
// ===============================================================================

public _fx_TE_PARTICLEBURST(const iOrigin[3], const iRadius, const iColor, const iDuration)
{
    
message_begin(MSG_BROADCASTSVC_TEMPENTITY)
    
    
write_byte(TE_PARTICLEBURST)
    
    
write_coord(iOrigin[0])
    
write_coord(iOrigin[1])
    
write_coord(iOrigin[2])
    
    
write_short(iRadius)
    
    
write_byte(iColor)
    
write_byte(iDuration)
    
    
message_end()
}

// ===============================================================================
//     _fx_TE_SPRITETRAIL
// ===============================================================================

public _fx_TE_SPRITETRAIL(const iOrigin[3], const iDest[3], const iSpriteIndex, const iCount, const iLife, const iScale, const iVelocity, const iRandomFactor)
{
    
message_begin(MSG_BROADCAST,SVC_TEMPENTITY)
    
    
write_byte(TE_SPRITETRAIL)    // line of moving glow sprites with gravity, fadeout, and collisions
    
    
write_coord(iOrigin[0])            // coord, coord, coord (start)
    
write_coord(iOrigin[1])
    
write_coord(iOrigin[2])
    
    
write_coord(iDest[0])            // coord, coord, coord (start)
    
write_coord(iDest[1])
    
write_coord(iDest[2] - 80)
    
    
write_short(iSpriteIndex// (sprite index)
    
    
write_byte(50 iCount// (count)
    
write_byte(iLife// (life in 0.1's) 
    
write_byte(iScale// byte (scale in 0.1's) 
    
write_byte(iVelocity// (velocity along vector in 10's)
    
write_byte(iRandomFactor// (randomness of velocity in 10's)
    
    
message_end()
    

__________________
joshknifer is offline
Send a message via Skype™ to joshknifer
rulez_3
BANNED
Join Date: Sep 2013
Old 11-13-2013 , 13:58   Re: want to learn scripting
Reply With Quote #44

bro the beam is not like spark like this
rulez_3 is offline
Kia
AlliedModders Donor
Join Date: Apr 2010
Location: In a world of madness
Old 11-13-2013 , 14:00   Re: want to learn scripting
Reply With Quote #45

Then. edit. it. for. fucks. sake.
__________________
Kia is offline
rulez_3
BANNED
Join Date: Sep 2013
Old 11-13-2013 , 14:09   Re: want to learn scripting
Reply With Quote #46

i dont have codes
rulez_3 is offline
Kia
AlliedModders Donor
Join Date: Apr 2010
Location: In a world of madness
Old 11-13-2013 , 14:11   Re: want to learn scripting
Reply With Quote #47

...
__________________

Last edited by Kia; 11-13-2013 at 14:11.
Kia is offline
rulez_3
BANNED
Join Date: Sep 2013
Old 11-13-2013 , 15:08   Re: want to learn scripting
Reply With Quote #48

broooooo this is not fucking lightning look

it should look like

i hope now you will understand
rulez_3 is offline
Kia
AlliedModders Donor
Join Date: Apr 2010
Location: In a world of madness
Old 11-13-2013 , 15:47   Re: want to learn scripting
Reply With Quote #49

1. Don't call me "bro", I'm not your "bro".
2. If you're not intelligent enough to use the search function or to lookup the funcwiki, please consider donating your computer and organs to someone who can need it.
I'm sick and tired of people who are not able to use the search function.

If you can't handle my code, don't use it!
__________________

Last edited by Kia; 11-13-2013 at 15:47.
Kia is offline
rulez_3
BANNED
Join Date: Sep 2013
Old 11-13-2013 , 16:37  
Reply With Quote #50

bro i have research alot thats why i want thats why pls help ,e

guys no need help i got the trick thanks all for help

Last edited by YamiKaitou; 11-13-2013 at 17:04.
rulez_3 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 15:53.


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