Raised This Month: $ Target: $400
 0% 

need help with the basics


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ifurn0
Junior Member
Join Date: Jan 2009
Old 01-24-2009 , 00:57   need help with the basics
Reply With Quote #1

problem solved!

i figured out what it was, i had a rootkit mucking up the compiler, basically id make small changes that shouldt break and then when i go and test them random sections of the code would no longer work, commands wouldn't register properly, weird bugs would happen... values would be null that shouldnt be...
look at test_v ffs how that could break was beyond me and yet it did, many many times, then i recode the lot, then something else would break.... it has been a nightmare up hill battle all the while im trying to learn the language from scratch and me coding skill in the first place was pretty minimal

i should be fine from here on in so ill let this post fade into obscurity but ill keep it alive because i might need some help in the future when i get realy realy stuck...

now this be the rootkit \systemroot\system32\drivers\TDSSserv.sys (that should pull up sufficent infor on google) gmer to detect sdfix to remove...
i no longer have a sample becaue i was more focoused on removing it as fast as possible so then i could conect to the server and make sure that was ok to...
should i send it the admins or pawns way?
for that matter where does amx save its error report log i had one that might help allied mods prevent this happening in the future that is if it survived the install/uninstall i did to get the compiler back to working order



below is a general lab and outlay its pretty well much a mess but its a work in progress with plans ideas and random chunks of code thrown around everywhere
im rather more concerned with getting stuff done than finesse either way a lot more is going to go in and soon and its gonna be a lot bigger than just whats there and whats planned... when its done feel free to use but i offer absolute no guarantee of any kind for i don't relay have the skills to offer one as yet and may not have the time in the future, but be assured ive been putting it though the most gruling testing regimiens to shake out as many bugs as possible lets just see how it comes out at the end shall we...
i would reccomend atm letting me know before you try and ill tell you which biits are stable and whats not and whats almost there...

im just a sven admin on the top server ;)
i find what i like and making it to what i want...
advice input idea's to try or constructive criticism in will all be well received....

i just noticed swearing is frowned upon here so there for language warning must be applied, me code is me little lab im not going to bother thinking about whether or not it would be appropriate to say im going to put it down as i think it, while i rember it, im working to hard on it to do otherwise...

ill dump the stable code here occasionally as entertainment for the lurkers....

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

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

#define PLUGIN "nub help"
#define VERSION "0.34"
#define AUTHOR "ifurn0"

/*

    i love being evil!
    not that we be able to find an excuse to use this very often...
    i... still.... want... it!
    
    enjoy!
    ~ifurn0
*/



/*
special thanks
matt for giving me the inspiration of a help files (nice) for players
melissa for giving me the insight to evolve the flamethrower and other sick plugins
evil clown for helping with the flamthower 
and helping in those countless little ways that somone on the team does :)
everyone at hq for putting up with me.... :D
*/

/*
credits

amx_wog
athor: jsauce
homepage: http://www.chronic7.com/html/forum/index.php
plugin: http://forums.alliedmods.net/showthread.php?p=189137

this plugin is fucking awsome!!, its one of the verry best ive encounterd for amxx
even though its claimed by amxx to be cs only its not it works for sven as well :D
"This is just another way to slay an annoying user or two but much more fun. 
This plugin will cause the user to be bounced around like a pinball leaving blood wherever he touches,
until ultimately exploding into a bloody mess."



flamethrower
Original by Eric Lidman aka "Ludwig van" <[email protected]>
Homepage: http://lidmanmusic.com/cs/plugins.html
Upgraded to STEAM and ported to AMXx by: jtp10181 <[email protected]>
Homepage: http://www.jtpage.net
plugin: http://forums.alliedmods.net/showthread.php?p=19864

this one looked cool but it didnt wont do any damage in sven
but! looking at the code a huge amount of effort went into making it *applause*



more credits will be added when more code is sufficently intergrated 
ie compiling, stable and working :D
*/

/*
special mention
to the lurker whom is watching my progress and grabbing whats new thanks for the effort :D
i keep site more updated now :)
im picking apart the flametrower now, and tring to intergreate it with flame wall
*/



new victim 
//new victim_authid[50]
new victim_name[50]
new server_name[50]
new victim_name_local[50]
new fire
new burning
new smoke
new remote_name_hook[50]     //output of concmd
new admin_name[50]

//new admin_id
//new blood
//new bloodspray
//new smoke
//new white
//fuck local variabales i want them global, this is just how i work

//******flame code variables****
new flame_args[8]
new dist
new speed1 = 160
new speed2 = 350
//new radius = 105
new vec[3]
new aimvec[3]
new velocityvec[3]
new length
new speed = 10
new command[60]
new variable[6]
new name[33]
new authid[35]
new num
// end fame cod varibles

public plugin_init() 
{
    register_plugin("nub help" , "v0.34" , "ifurn0" )
    register_clcmd("say test_v","test_v",ADMIN_ALL,"tells what version of hqhelp plugin is loaded")
    
    register_clcmd("say hqhelp","help_player",ADMIN_ALL,"shows you a few tips and tricks (say/teamsay/console)") //say
    register_clcmd("say_team hqhelp","help_player",ADMIN_ALL,"shows you a few tips and tricks (say/teamsay/console)") //say
    register_concmd("hqhelp","help_player",ADMIN_ALL,"shows you a few tips and tricks (say/teamsay/console)") //console
    
    register_concmd("say test_wog","test_wog_prethink",ADMIN_ALL ,"beta dont fuck with it")
    register_clcmd("help_all","help_everyone",ADMIN_ADMIN,"pops up hqhelp on everyones screen")
    register_clcmd("rule_all","rule_everyone",ADMIN_ADMIN,"pops up rules on everyones screen")
    
    register_concmd("rules","rule_player",ADMIN_ALL,"shows you the rules, shows you the rules, (say/teamsay/console)")
    register_clcmd("say rules","rule_player",ADMIN_ALL,"shows you the rules, (say/teamsay/console)") 
    register_clcmd("say_team rules","rule_player",ADMIN_ALL,"shows you the rules, (say/teamsay/console)")
    
    
    register_concmd("nicehelp","nice_help",ADMIN_ADMIN,"nicehelp *playername* (say/teamsay/console)")
    register_clcmd("say nicehelp","nice_help",ADMIN_ADMIN,"nicehelp *playername* (say/teamsay/console)")
    register_clcmd("team_say nicehelp","nice_help",ADMIN_ADMIN,"nicehelp *playername* (say/teamsay/console)")
    
    register_concmd("nicerules","nice_rules",ADMIN_ADMIN,"nicerules *playername* (say/teamsay/console)")
    register_clcmd("say nicerules","nice_rules",ADMIN_ADMIN,"nicerules *playername* (say/teamsay/console)")
    register_clcmd("team_say nicerules","nice_rules",ADMIN_ADMIN,"nicerules *playername* (say/teamsay/console)")
    
    register_concmd("fire","flame_loader",ADMIN_ALL,"bind to a key for flamethower :D")
    register_concmd("boot","lets_be_subttle",ADMIN_ADMIN,"boot *playername* forces the player to quit sven...")
    register_concmd("dropgun","drop_gun",ADMIN_ADMIN,"dropgun *playername* makes them drop ther gun")
    
    
    
    // cant get the say/teamsay/console working propperly (but id like to) is it even possible?
/*    
    register_clcmd("say musichelp", "music_help" , ADMIN_ALL)
    register_clcmd("say_team musichelp", "music_help" , ADMIN_ALL) //say
    register_concmd("musichelp", "music_help" , ADMIN_ALL) //console
    
    //focusing on more productive things for now cbf fixing motd...
*/    

    
    
    //map name help (once we finish cleaning up the cycle)
                
    //thinking about picking apart advanced vote (havent seen code yet) but...
    //was thinging of giving players acess to gibslay and spank2 via vote like amx_vote
    //not that anoying default vote shit that takes control of your mouse rather..
    //peress one (crobar) for yes or 2 (pistol) for no...
    // also thinking of giving players acces to slap. spank2. wog. gibslay ect... via vote
    
    //also of thinkig having an admin help, now amx_help is fucking annoying for the
    //bloody amx_help 121 amx_help 131 ect... so have a help admin_*^
    //* being admin acess flags ^ being which page 
    //and show up a motd with the commands they need from amx_help
    //as many as can fit with the 1600 character limit then create next page as it were
    //also have an admin_help_* update that will read info like the amx help does and 
    //export to file but within the char limit, then puts the rest in sucessive pages
    
    // fat barstard (gravity 10000)
    // stuck (mac speed or shove them in the floor and ithergrate auto unstucking with an eception list)
    

    //also one the amx_help idea, posibly having it the same is having it in the console 
    //and getting rid of the page limit (if the engine can haldle it) or as much as possible
    //whithin the limitaions of halflife 1/sven

    
//super chicken
//mini appachie and add the camera to the appachie
//jetpack
// fat barstard (gravity = 100000)
// make em stuck plugin  (shove em in the floor)
//noob cage!
// flare shotgun!
// mounted caingun!
// turbo mode (friction)



//    register_concmd("pyro" , "pyro", ADMIN_ADMIN) //keybind
//    register_concmd("pyro_wall", "pyro_wall" ADMIN_ADMIN) //keybind
//    register_concmd("pyro_wall_hurt" "pyro_wall_hurt"ADMIN_ADMIN) //keybind
//    register_concmd("ice" "ice_gun" ADMIN_ADMIN)

//     mabe add a cobination of the fireworks for the admins to play with as another toy
//     but set it up all as console commands so it can be bound to a key instead of menu or both    

//    might get that cool firework (the one u steer by the mouse)
//    possibly give it keybord control as well and turn ito a player killsr for admins :D    

//    might intergrate auto weapnos for admins to give to players
//    admin spin me looks like an intresting variation of wog mabe that has collison detection
//    ban disconected player looks usefull
//    i think flaming barriers is the one i want to intergrate with flamethower and for kicks pope lighnings randomness
//    lol site advertising http://forums.alliedmods.net/showthread.php?p=162695

//    oh yeah... admin portal is a must
//    new toy! laser guns http://forums.alliedmods.net/showthread.php?p=19247
//    

// plus much much much much much much much much moar! 
// so many i cant be boterd listing, rather ill just add the code ;)

/*
    register_concmd("givehelp", "help_force" , ADMIN_ADMIN "<target>")     //console
    register_concmd("fuckingnoob", "you_shalt_suffer_my_wrath" , ADMIN_ADMIN , "<target>") //console
    register_concmd("nub", "you_shalt_be_spared" , ADMIN_ADMIN , "<target>") //console
    register_concmd("say im sorry!", "you_shalt_be_spared" , ADMIN_ALL)    //say
    register_concmd("you_shalt_suffer_my_wrath", "you_shalt_suffer_my_wrath" , ADMIN_ADMIN "<target>")     //console
        //register_concmd("say ohhhhhhhhh fuck....", "to_be_decided" , ADMIN_ALL) //say
*/    
    

}

public plugin_precache()
{
    //blood = precache_model("sprites/blood.spr")
    //bloodspray = precache_model("sprites/bloodspray.spr")
    //smoke = precache_model("sprites/steam1.spr")
    //white = precache_model("sprites/white.spr")
    precache_sound("weapons/explode3.wav")
    //precache_sound("misc/bevr.wav")
    //return PLUGIN_CONTINUE
    
    //****flame code precashe***
    fire = precache_model("sprites/explode1.spr")
    smoke = precache_model("sprites/steam1.spr")
    burning = precache_model("sprites/xfire.spr")
    precache_sound("ambience/burning1.wav")
    precache_sound("ambience/flameburst1.wav")
    precache_sound("scientist/c1a0_sci_catscream.wav")
    precache_sound("vox/_period.wav")
    //end flamme code
}


public test_v(id,level,cid)
{
client_print(0,print_chat,"v55")
}

public help_player(id,level,cid)   //dunno why or how "id, level cid" works but it does
{
    get_user_name(id,victim_name_local,49) //need to change thease over to plugin int
    get_user_name(0,server_name,49)
    client_print(0,print_chat,"%s: noproblemo %s loading now... ",server_name,victim_name_local)
    show_motd(id,"\addons\amxmodx\ifurn0\nicehelp.txt")
}

public rule_player(id,level,cid)
{
    get_user_name(id,victim_name_local,49)
    get_user_name(0,server_name,49)
    client_print(0,print_chat,"%s: noproblemo %s loading now... ",server_name,victim_name_local)
    show_motd(id,"\addons\amxmodx\ifurn0\nicerules.txt")
}
/*
public music_help (id,level,cid)
{
    get_user_name(id,victim_name_local,49)
    get_user_name(0,server_name,49)
    client_print(0,print_chat,"%s: noproblemo %s loading now... ",server_name,victim_name_local)
    show_motd(id,"\addons\amxmodx\ifurn0\musichelp.txt")
}
*/


public help_everyone(id,level,cid)  
{
    if (!cmd_access(id,level,cid,1))
    {    
        get_user_name(id,victim_name_local,49)
        get_user_name(0,server_name,49)
        console_print(id,"..!.. (- -) ..!.. ACCESS_DENIED ..!.. (- -) ..!..") 
        client_print(0,print_chat,"%s: DONT TOUCH THE ADMIN'S TOYS! %s",server_name,victim_name_local)
        server_cmd("amx_spank2 %s",victim_name_local)
    }
    else    
    {
        get_user_name(id,admin_name,49)
        get_user_name(0,server_name,49)
        client_print(0,print_chat,"%s: feeling lazy today are we %s?",server_name,admin_name)
        show_motd(0,"\addons\amxmodx\ifurn0\nicehelp.txt")

    }
}
public rule_everyone(id,level,cid)   
{
    if (!cmd_access(id,level,cid,1))
    {    
        get_user_name(id,victim_name_local,49)
        get_user_name(0,server_name,49)
        console_print(id,"..!.. (- -) ..!.. ACCESS_DENIED ..!.. (- -) ..!..") 
        client_print(0,print_chat,"%s: DONT TOUCH THE ADMIN'S TOYS! %s",server_name,victim_name_local)
        server_cmd("amx_spank2 %s",victim_name_local)
    }
    else
    {
        get_user_name(id,admin_name,49)
        get_user_name(0,server_name,49)
        client_print(0,print_chat,"%s: opressing the minions today are we %s",server_name,admin_name)
        show_motd(0,"\addons\amxmodx\ifurn0\nicerules.txt")
        
    }
}

public lets_be_subttle(id,level,cid)
{
    if (!cmd_access(id,level,cid,1))
    {    
        get_user_name(id,victim_name_local,49)
        get_user_name(0,server_name,49)
        console_print(id,"..!.. (- -) ..!.. ACCESS_DENIED ..!.. (- -) ..!..") 
        client_print(0,print_chat,"%s: DONT TOUCH THE ADMIN'S TOYS! %s",server_name,victim_name_local)
        server_cmd("amx_spank2 %s",victim_name_local)
    }
    else
    {
        read_argv(1,remote_name_hook,49)
        remove_quotes(remote_name_hook) //anti admin retardedness 
        victim = cmd_target(id,remote_name_hook,1)
        get_user_name(id,admin_name,49)
        if (victim == 0)
        {
            console_print(id,"nope, they have drifted off into existence....")
        }
        else 
        {
            client_cmd(victim,"quit")
        }
    }
}


public drop_gun(id,level,cid)
{
    if (!cmd_access(id,level,cid,1))
    {    
        get_user_name(id,victim_name_local,49)
        get_user_name(0,server_name,49)
        console_print(id,"..!.. (- -) ..!.. ACCESS_DENIED ..!.. (- -) ..!..") 
        client_print(0,print_chat,"%s: DONT TOUCH THE ADMIN'S TOYS! %s",server_name,victim_name_local)
        server_cmd("amx_spank2 %s",victim_name_local)
    }
    else
    {
        read_argv(1,remote_name_hook,49)
        remove_quotes(remote_name_hook) //anti admin retardedness 
        victim = cmd_target(id,remote_name_hook,1)
        get_user_name(id,admin_name,49)
        if (victim == 0)
        {
            console_print(id,"nope, they have drifted off into existence....")
        }
        else 
        {
            client_cmd(victim,"drop")
        }
    }
}

public nice_help(id,level,cid)
{
    if (!cmd_access(id,level,cid,1))
    {    
        get_user_name(id,victim_name_local,49)
        get_user_name(0,server_name,49)
        console_print(id,"..!.. (- -) ..!.. ACCESS_DENIED ..!.. (- -) ..!..") 
        client_print(0,print_chat,"%s: DONT TOUCH THE ADMIN'S TOYS! %s",server_name,victim_name_local)
        server_cmd("amx_spank2 %s",victim_name_local)
    }
    else
    {
        read_argv(1,remote_name_hook,49)
        remove_quotes(remote_name_hook) //anti admin retardedness
        victim = cmd_target(id,remote_name_hook,1)
        get_user_name(victim,victim_name,49)
        get_user_name(id,admin_name, 49)
        get_user_name(0,server_name, 49)
        if (victim == 0)
        {
            console_print(id,"nope, they have drifted off into existence....")
        }
        else 
        {
            client_print(0,print_chat,"%s admin %s thought you could use a few pointers hope it helps!",server_name,admin_name)
            show_motd(victim,"\addons\amxmodx\ifurn0\nicehelp.txt")    
        }
        
    
    }
}

public nice_rules(id,level,cid)
{
    if (!cmd_access(id,level,cid,1))
    {    
        get_user_name(id,victim_name_local,49)
        get_user_name(0,server_name,49)
        console_print(id,"..!.. (- -) ..!.. ACCESS_DENIED ..!.. (- -) ..!..") 
        client_print(0,print_chat,"%s: DONT TOUCH THE ADMIN'S TOYS! %s",server_name,victim_name_local)
        server_cmd("amx_spank2 %s",victim_name_local)
    }
    else
    {
        read_argv(1,remote_name_hook,49)
        remove_quotes(remote_name_hook) //anti admin retardedness
        victim = cmd_target(id,remote_name_hook,1)
    
        get_user_name(victim,victim_name,49)
        get_user_name(id,admin_name, 49)
        get_user_name(0,server_name, 49)
        if (victim == 0)
        {
            console_print(id,"nope, they have drifted off into existence....")
        }
        else 
        {
            client_print(0,print_chat,"%s admin %s thought you could use a few pointers hope it helps!",server_name,admin_name)
            show_motd(victim,"\addons\amxmodx\ifurn0\nicerules.txt")
        }
    
    }
}
 /*
public you_shalt_suffer_my_wrath()
    {
    //get victim
    show_motd(victim,"/svencoop/ifurn0/nastyhelp.txt)
    client_cmd(victim,"say ohhhhhhhhh fuck....")
    
        
    //make it humiliating and insulting as possible reserved for those whom realy try our 
    //patience yet as cool for the witnesess as possible
    
    client_print(0,print_chat, "%s something humiliating",victim)
    client_cmd(victim,"name something nasty")
    client_cmd(0,"spk misc/bendover")        //(make it realy twisted)
    client_cmd(victim,"say glow pink")
    client_cmd(victim,"say trail pink")    

    //loop or do while 
    //set victim god mode and diable kill in wog
    
    
    //load wog                    (allways fun to watch)
    //make them fly around and bounce off walls realy fast
    //have it so it dont kill them, no imunity no team single selection
    //single use per victim
    
    //load gibslay_nk looping amount medmum        (gore! glorious gore!)
    //increase victims blood splatter/loss       (gore! glorious gore!)
    //will force blood and gibs will fly out whith each collison
    
    
    //load popelighning                (add a bit of style)
    //will have ligtning folowing them round the map striking around them
    //but not hurting them and no spam mesage
    
    //load pope stick 
    //lots of lightning from random directions hitting them
    //no spam msg
    
    //load zapper
    //like pope stick but in reverse lightnig fires out of player in random directions
    
    
    //load flamethrower                (even more style)
    //flings streamers of fire! around the map while they are being flung around
    //harmless
    
    //load auto respawn
    //if player tries to escape by killing them selves repeat...
    
    //was thinging of having an even nastier version that will export their
    //name / ip / steam id, to a file and put in a check that wil check if they connect, 
    //if they do then a nasty help will pop up telling them the rules agin and telling them
    //that they wont escape that easily, that they have to say im sorry! before it will stop..
    //then sets off you_shalt_suffer_my_wrath () again :D
    
    //enter punishment into special log
    //give admins ability to add entry in log (via console) for reason set off ie volenteer
    //or what they were doing wrong so we know who has had the serious warning
    
    //possibly have the ability to set it off on the player in the admins crosshairs
    //code in gibslay for that one
    
    //end loop or do while
}
    
public you_shalt_be_spared()
{
    //disables punishments...
    //gives them their name back
    //removes player from the connect log punishment loader
    //make player explode into a masive abount of blood and gibs splatering everywhere
    //shows a hund message, victim has been spared
    //writes entry into the log
}

public pyro ()
{
    //loads the flamethower
    //make it a player killer
    //make it bindable (ie if admin holds down fire it does repetadley) (easy)
}
public pyro_wall ()
{
    //same as flamethower
    //make it a player killer
    //but fires are spawned where it hits
    //these fires will kill players, so act as a barrier for where we dont want them to go
    //make it bindable (ie if admin holds down fire it does repetadley) (easy)
}
public pyro_nk ()
{
    //same as flamethower
    //make it so the flames shooting to the barrier non leathal but barrier is leathal
    //but fires are spawned where it hits
    //these fires will kill players, so act as a barrier for where we dont want them to go
    //make it bindable (ie if admin holds down fire it does repetadley) (easy)
}
public fireworks ()
{
    //combine the best parts of both fireworks 
    //make it admin ony (easy)
    //make it bindable (easy)
}

public ice_gun ()
{
       //well basically it disables the flame walls but fun could be had and coded for a later date ;)
}
*/

//*******************************************wog**********************************************
public test_wog_prethink(id,level,cid)
//works, no kill, need to add god but, and make it loop / bounce code needs to be salvaged from 
//original and cleaned up but got confused last time 
//goes after flamethrower
//mabe an ifloop of if get_user_velocity is less than x repreat (engine)

{
    if (!cmd_access(id,level,cid,1))
    {    
        get_user_name(id,victim_name, 49)
        get_user_name(0,server_name,49)
        console_print(id,"..!.. (- -) ..!.. ACCESS_DENIED ..!.. (- -) ..!..") 
        client_print(0,print_chat, "%s: DONT TOUCH THE ADMIN'S TOYS! %s",server_name,victim_name)
        server_cmd("amx_spank2 %s",victim_name)
    }
    
    if (!is_user_alive(id))
    {
    console_print(id,"they be allready slain.... get in line... XD")   
    //  return PLUGIN_HANDLED
    }
      
    if(entity_get_int(id, EV_INT_flags) & FL_ONGROUND)
    if (id) //was woguser[id] //want as a mainstay victim = person being attacked
    {
    {    
        new origin[3]
        get_user_origin(id,origin)
        // bloody_fun(origin,25)
        //wogbounce[id]++
    }
    }
    if (id) //woguser[id]
    {
        wog_effect(id)
    }
   //return PLUGIN_CONTINUE
}
public wog_effect(id)
{
  //think is part of the kill code but not entirley... (chunks missing see original source)
  //what im trying to figure out if there is collision detetection and if so how it works
  //if not trying to figure out how to add (if at all possible)
  //so instead of having a simple loop, if colide then repeat ;)
  //need to change over value names to unique ones mabe just incase of cross plugin interferance
  //not sure if i have to watch out for that or not...
  
 /* if (wogbounce[id] >= 100)  
   {
      wogbounce[id] = 0
      woguser[id] = false
      wogdeath(id)
    }
   */
   if(entity_get_int(id, EV_INT_flags) & FL_ONGROUND)
   {
      new Float:Velocity[3]
      entity_get_vector(id, EV_VEC_velocity, Velocity)
      
      Velocity[0] = random_float(7500.0, 12500.0)
      Velocity[1] = random_float(7500.0, 12500.0)
      Velocity[2] = random_float(7500.0, 12500.0)
      
      entity_set_vector(id, EV_VEC_velocity, Velocity)
   }
   entity_set_float(id, EV_FL_friction, 0.1)
   entity_set_float(id, EV_FL_gravity, 0.1)
}

public client_disconnect(id)
{
   if (id) //woguser[id]
   {
      id = false //woguser[id]
   }
}

/*
public endround()
{
   new players[32], inum   
   get_players(players,inum)   
   for(new a = 0; a < inum; a++)
   { 
      
      if (woguser[players[a]])
      {
         woguser[players[a]] = false
         wogdeath(players[a])
      }
   }
}    
*/
//*************************************************flame*********************************
// ok this one ive done a fair bit of cleaning out, i basically wanted just the flame to fire 
// with the sounds and sprites and velocites ect... now ive got a bit of cleaning to go but its
// getting there... this one if for you_shalt_suffer_my_wrath () 
// needs looping

//then once i got that fuigured out, would be how to make it (if possible in sven) is for it to 
//hurt everyone,  and intergrate it with flame wall


//then next type hurt only enemies (not players). i want to pass that one on to the players to use
// but that will need some hard thinking (how much fuel vs how much damage ect)
// but then what team is players in sven/halflife? 
//from memory the map makers can pick any random team number
// hmmmm or! i could detct what out team is! *moment of revalation*
//possible RadiusDamage as answer
// fakedamage

//the original code wont hurt anything in sven not players bots or breakable obgects
// so it needs fixing up...

//so for now its stable and close enough, to my needs that i can move on to the next thing


public flame_loader(id)
{
//just trying to make it fucking well register the command properly...
//was having issues with it killing other components of the code
//will remove once fixed
set_the_fardin_thing_off(id)
}

set_the_fardin_thing_off(id)
{
    dist = get_distance(vec,aimvec)
    get_user_authid(id,authid,34)
    get_user_name(id,name,32)
    read_argv(0,command,59)
    read_argv(1,variable,5)
    emit_sound(id, CHAN_WEAPON, "ambience/flameburst1.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
    get_user_origin(id,vec)
    get_user_origin(id,aimvec,2)

    if(dist < 50)
    {
//        radius = 0
        speed = 5
    }
    else if(dist < 150)
    {
        speed1 = speed2 = 1
        speed = 5
//        radius = 50
    }
    else if(dist < 200)
    {
        speed1 = speed2 = 1
        speed = 5
//        radius = 90
    }
    else if(dist < 250)
    {
        speed1 = speed2 = 90
        speed = 6
//        radius = 90
    }
    else if(dist < 300)
    {
        speed1 = speed2 = 140
        speed = 7
    }
    else if(dist < 350)
    {
        speed1 = speed2 = 190
        speed = 7
    }
    else if(dist < 400)
    {
        speed1 = 150
        speed2 = 240
        speed = 8
    }
    else if(dist < 450)
    {
        speed1 = 150
        speed2 = 290
        speed = 8
    }
        else if(dist < 500)
    {
    speed1 = 180
    speed2 = 340
    speed = 9
    }

    velocityvec[0]=aimvec[0]-vec[0]
    velocityvec[1]=aimvec[1]-vec[1]
    velocityvec[2]=aimvec[2]-vec[2]
    length=sqrt(velocityvec[0]*velocityvec[0]+velocityvec[1]*velocityvec[1]+velocityvec[2]*velocityvec[2])
    velocityvec[0]=velocityvec[0]*speed/length
    velocityvec[1]=velocityvec[1]*speed/length
    velocityvec[2]=velocityvec[2]*speed/length

    
    flame_args[0] = vec[0]
    flame_args[1] = vec[1]
    flame_args[2] = vec[2]
    flame_args[3] = velocityvec[0]
    flame_args[4] = velocityvec[1]
    flame_args[5] = velocityvec[2]
    set_task(0.1,"te_spray",0,flame_args,8,"a",2)
    check_burnzone(id,vec,aimvec,speed1,speed2)
}

public te_spray(flame_args[])
{

    //TE_SPRAY
    message_begin(MSG_BROADCAST,SVC_TEMPENTITY)
    write_byte (120) // Throws a shower of sprites or models
    write_coord(flame_args[0]) // start pos
    write_coord(flame_args[1])
    write_coord(flame_args[2])
    write_coord(flame_args[3]) // velocity
    write_coord(flame_args[4])
    write_coord(flame_args[5])
    write_short (fire) // spr
    write_byte (8) // count
    write_byte (70) // speed
    write_byte (100) //(noise)
    write_byte (5) // (rendermode)
    message_end()

    sqrt(num)
}


public sqrt(num) 
{
    new div = num
    new result = 1
    while (div > result) 
    { // end when div == result, or just below
        div = (div + result) / 2 // take mean value as new divisor
        result = num / div
    }
    return div
}

check_burnzone(id,vec[],aimvec[],speed1,speed2)
{
    //new i
    //new maxplayers = get_maxplayers()+1
    new tid, tbody
    get_user_aiming(id,tid,tbody,550)


    new burnvec1[3],burnvec2[3],length1

    burnvec1[0]=aimvec[0]-vec[0]
    burnvec1[1]=aimvec[1]-vec[1]
    burnvec1[2]=aimvec[2]-vec[2]

    length1=sqrt(burnvec1[0]*burnvec1[0]+burnvec1[1]*burnvec1[1]+burnvec1[2]*burnvec1[2])
    burnvec2[0]=burnvec1[0]*speed2/length1
    burnvec2[1]=burnvec1[1]*speed2/length1
    burnvec2[2]=burnvec1[2]*speed2/length1
    burnvec1[0]=burnvec1[0]*speed1/length1
    burnvec1[1]=burnvec1[1]*speed1/length1
    burnvec1[2]=burnvec1[2]*speed1/length1
    burnvec1[0] += vec[0]
    burnvec1[1] += vec[1]
    burnvec1[2] += vec[2]
    burnvec2[0] += vec[0]
    burnvec2[1] += vec[1]
    burnvec2[2] += vec[2]

    //new origin[3]
//    for (new i=1; i<=maxplayers; i++) 
//    {

//            if((is_user_alive(i) == 1) && (i != id))
//            {
        //get_user_origin(i,origin)
        //get_distance(origin,burnvec1) //< radius //removerd if

//            }

    //}
    on_fire(id)
}

public on_fire(id)
{


    new rx
    new ry
    new rz
    new forigin[3]


    rx = random_num(-30,30)
    ry = random_num(-30,30)
    rz = random_num(-30,30)
    get_user_origin(id,forigin)

    //TE_SPRITE - additive sprite, plays 1 cycle
    message_begin( MSG_BROADCAST,SVC_TEMPENTITY)
    write_byte( 17 )
    write_coord(forigin[0]+rx) // coord, coord, coord (position)
    write_coord(forigin[1]+ry)
    write_coord(forigin[2]+10+rz)
    write_short( burning ) // short (sprite index)
    write_byte( 30 ) // byte (scale in 0.1's)
    write_byte( 200 ) // byte (brightness)
    message_end()

    //Smoke
    message_begin( MSG_BROADCAST,SVC_TEMPENTITY)
    write_byte( 5 )
    write_coord(forigin[0]+(rx*2)) // coord, coord, coord (position)
    write_coord(forigin[1]+(ry*2))
    write_coord(forigin[2]+100+(rz*2))
    write_short( smoke )// short (sprite index)
    write_byte( 60 ) // byte (scale in 0.1's)
    write_byte( 15 ) // byte (framerate)
    message_end()


    stop_firesound()
}
/* ..annoying... disabed scream
public fire_scream()
{
    emit_sound(flame_args[0], CHAN_AUTO, "scientist/c1a0_sci_catscream.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
    stop_firesound()
}
*/
public stop_firesound()
{
//    isburning[args[0]] = 0
    emit_sound(flame_args[0], CHAN_ITEM, "vox/_period.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
    //return PLUGIN_CONTINUE i fucking hate plugin_continue because it fucks with scalability
    //have to remobe them soon

}

//********************************fireworks :D***************************************************
//ya ok this one is cool unfortunaltey most of the players spam the fuck out of it
// so for now untill the admins descide what they are going to do with it im gonna try and get
//the rv one working with the keybord (seekign aprropriate commands)
// and make it admin only.... (it would be nice if peoples woud vote...)

/*
some pointers for the modified rv (hiding in engine)
get_user_button
get_user_velocity
VelocityByAim
set_user_velocity
RadiusDamage
*/




//**************************************tadaaaa... da end!*************************************

//kinda ambitious progect for a nub coder huh?
//lets... just see where we come out at the end
// but is gonna be sick!
// sure we are the top server by a long shot
// but this will keep us there permanatley!


//http://forums.alliedmods.net/showthread.php?p=93597
//bad map reporrtin

//http://forums.alliedmods.net/showthread.php?p=416937
//annother version of map reporting but newer

Last edited by ifurn0; 02-14-2009 at 07:07. Reason: code update....
ifurn0 is offline
Old 01-26-2009, 02:14
ifurn0
This message has been deleted by Exolent[jNr]. Reason: Don't bump until 2 weeks have passed since last post.
ifurn0
Junior Member
Join Date: Jan 2009
Old 02-09-2009 , 07:18   Re: need help with the basics
Reply With Quote #3

nvm problem solved

Last edited by ifurn0; 02-11-2009 at 16:05. Reason: killing post...
ifurn0 is offline
Reply


Thread Tools
Display Modes

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 01:48.


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