Raised This Month: $ Target: $400
 0% 

Scripting Help : Random Cords and Take_damage


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
NightWish
Junior Member
Join Date: Apr 2006
Location: Denmark
Old 04-17-2006 , 10:11   Scripting Help : Random Cords and Take_damage
Reply With Quote #1

its for my Lightning plugin
got a native i need help in or just what .inc its in

1 : Take_damage ( how to use and what .inc )

and

Code:
#include <amxmodx> #include <fun> new smoke, lightning, gmsgShake, flaresprite public plugin_init() {     register_plugin("lightning", "1.0", "NightWish")     gmsgShake = get_user_msgid("ScreenShake")     register_clcmd("Light","lightning1") } public plugin_precache(){     lightning = precache_model("sprites/lgtning.spr")     smoke = precache_model("sprites/steam1.spr")     flaresprite = precache_model( "sprites/blueflare2.spr") } public lightning1(id){     new origin[3]     new vec1[3]     get_user_origin(id,origin,3)                vec1[0] = origin[0]     vec1[1] = origin[1]     vec1[2] = origin[2] + 800     message_begin( MSG_BROADCAST,SVC_TEMPENTITY)     write_byte( 0 )     write_coord(vec1[0])     write_coord(vec1[1])     write_coord(vec1[2])     write_coord(origin[0])     write_coord(origin[1])     write_coord(origin[2])     write_short( lightning )     write_byte( 1 )     write_byte( 5 )     write_byte( 2 )     write_byte( 50 )     write_byte( 20 )     write_byte( 200 )     write_byte( 200 )     write_byte( 200 )     write_byte( 200 )     write_byte( 200 )     message_end()     message_begin(MSG_BROADCAST, SVC_TEMPENTITY)            write_byte(27)     write_coord(origin[0])     write_coord(origin[1])     write_coord(origin[2])     write_byte(20)     write_byte(200)     write_byte(200)     write_byte(200)     write_byte(10)     write_byte(15)     message_end()     message_begin( MSG_BROADCAST, SVC_TEMPENTITY )      write_byte( 15 )     write_coord( origin[0])     write_coord( origin[1])     write_coord( origin[2])     write_coord( origin[0])     write_coord( origin[1])     write_coord( origin[2])     write_short( flaresprite )     write_byte( 10 )     write_byte( 1 )     write_byte( 2 )     write_byte( 100 )     write_byte( 50 )     message_end()     message_begin( MSG_BROADCAST,SVC_TEMPENTITY,origin)     write_byte( 5 )     write_coord(origin[0])     write_coord(origin[1])     write_coord(origin[2])     write_short( smoke )     write_byte( 10 )       write_byte( 10 )       message_end()     new players[32]                         new numberofplayers     get_players(players, numberofplayers)     new i     new targetid     new distancebetween     new targetorigin[3]     for (i = 0; i < numberofplayers; ++i){     targetid=players[i]     get_user_origin(targetid,targetorigin,0)     distancebetween=get_distance(origin,targetorigin)         if (distancebetween < 200){         message_begin(MSG_ONE,gmsgShake,{0,0,0},targetid)         write_short( 1<<14 )         write_short( 1<<13 )         write_short( 1<<14 )         message_end()      <b>   take_damage(users[i], 0, origin[i],10.0, DMG_SONIC, "lightning") </b>         } } }

how to spawn the Lightnings Random places ?
so they spawn in random places at random time to make a Lightning Weather plugin

PS : Just switched to AMXX so i suck at it
NightWish is offline
Send a message via MSN to NightWish
 



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 05:09.


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