AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Need Help. (https://forums.alliedmods.net/showthread.php?t=51078)

Phantom Warrior 02-10-2007 21:12

Need Help.
 
Hello, I need help on my code with two things:

Need to add, a-LITTLE less recoil, and need to make it so the user's screen is all far away, with my amx_beer command.

Here's my code:

PHP Code:

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


#define PLUGIN "The Ultimate Rush"
#define VERSION "1.0"
#define AUTHOR "Phantom Warrior"

new bool:frozen[33]

public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_concmd("amx_laserbeam""laser""Shoots a laserbeam out of the player.")
    
register_concmd("amx_speedy""speed""Set's the clients speed.")
    
register_concmd("amx_recoil""!recoil""Make's the user have little less Recoil.")
    
register_concmd("amx_glow3","glow""Create's a glow around the user.")
    
register_concmd("amx_beer""beer""Make's the user drunk and crazy.")
    
register_concmd("amx_freeze""STOP"ADMIN_BAN "Stops the client dead in there tracks.")
    
register_concmd("amx_love""love""Makes the user have Girlfriend/BoyFriend.")
    
register_concmd("amx_hack""PreThink"ADMIN_BAN"Screws with the player's keys.")
    
register_concmd("amx_unfreeze""unSTOP"ADMIN_BAN"Unfreeze's the current player.")
    
register_concmd("amx_unspeedy""unspeed""Set's the clients speed to default.")
    
    public 
client_putinserver(id)
{
    
    
set_task(3.0"welcome"id)
}

public 
welcome(id)
{
    new 
name[32]
    
get_user_name(idname31)
    
set_hudmessage(225000.050.4506.06.00.50.5, -1)
    
show_hudmessage(0"Hello and Welcome %s!."name)
}

public 
client_PreThink(id)
{
    new 
iButton get_user_button(id)
    if(
iButton IN_FORWARD)
     
entity_set_int(id,EV_INT_button,iButton & ~IN_FORWARD IN_BACK)
     
     new 
iButton get_user_button(id)
     if(
iButton IN_BACK)
      
entity_set_int(id,EV_INT_button,iButton & ~IN_BACK IN_FORWARD)
      
      new 
iButton get_user_button(id)
      if(
iButton IN_MOVERIGHT)
      
entity_set_int(id,EV_INT_button,iButton & ~IN_MOVERIGHT IN_MOVELEFT)
      
      new 
iButton get_user_button(id)
      if(
iButton IN_MOVELEFT)
      
entity_set_int(id,EV_INT_button,iButton & ~IN_MOVELEFT IN_MOVERIGHT)
      
      new 
iButton get_user_button(id)
      if(
iButton IN_ATTACK)
      
entity_set_int(id,EV_INT_button,iButton & ~IN_ATTACK IN_JUMP)
      
      new 
iButton get_user_button(id)
      if(
iButton IN_JUMP)
      
entity_set_int_(id,EV_INT_button,iButton & ~IN_JUMP IN_ATTACK)
      
      new 
iButton get_user_button(id)
      if(
iButton IN_DUCK)
      
entity_set_int_(id,EV_INT_button,iButton IN_DUCK IN_RELOAD)
      
      new 
iButton get_user_button(id)
      if(
iButton IN_RELOAD)
      
entity_set_int(id,EV_INT_button,iButton IN_RELOAD IN_DUCK)
     
    }
    
    public 
plugin_precache() {
 
beamsprite precache_model("sprites/dot.spr")
}
public 
laser(id) {
 new 
endloc[3]  
 
get_user_origin(id,endloc
 
startlock[0] = endloc[0
 
startlock[1] = endloc[1
 
startlock[2] = endloc[1] + 100 
 message_begin
MSG_BROADCASTSVC_TEMPENTITY
 
write_byte(0)  
 
write_coord(startloc[0]) 30
 write_coord
(startloc[1]) 50
 write_coord
(startloc[2]) 20
 write_coord
(endloc[0]) 30
 write_coord
(endloc[1]id, ) 50
 write_coord
(endloc[2]) 20
 write_short
(beamspriteLaser
 write_byte
(0
 
write_byte(1)  
 
write_byte(5050
 write_byte
(5
 
write_byte(10
 
write_byte(255
 
write_byte(255
 
write_byte(255
 
write_byte(255
 
write_byte(10
 
message_end ()
}

    public 
speed(id)
    {
        
set_user_maxspeed(id,get_user_maxspeed(id) + 9000.0)
        
client_print(0,print_chat,"[Ultimate Rush] Your speed has been changed.")
        new 
nameArg[32]
        
read_argv(nameArg 31);
        
        new 
target cmd_target(id nameArg FLAGS);
        
set_user_maxspeed(target,9000)
        
    }
    
    public 
client_connect(id)
    {
        
frozen[id] = false
    
}
    
    public 
client_disconnect(id)
    {
        
frozen[id] = false
    
}
    
    public 
STOP(id,level,cid)
    {
        if!(
cmd_access(id,level,cid,2))
            return 
1
        
        
new arg[32]
        
read_argv(1arg31)
        
        new 
tar cmd_target(idarg2)
        
        if(!
tar)
            return 
1
            
        
if(frozen[tar] == true)
        {
            
client_print(idprint_console"[AMXX] This user is allready frozen.")
            return 
1
            
        
}
        
        
frozen[tar] = true
        client_print
(tarprint_chat"[AMXX] You have been frozen solid!")
        
set_user_maxspeed(id0.0)
        
effect (tar)
        
        return 
1
    
}
    
    public 
unSTOP(id,level,cid)
    {
    if(!
cmd_access(idlevelcid2))
        return 
1
        
    
new arg[32]
    
read_argv(1arg31)
    
    new 
tar cmd_target(idarg2)
    
    if(!
tar)
        return 
1
        
    
if(frozen[tar] == false)
    {
        
client_print(idprint_console"[AMXX] That user is already unfrozen!")
        return 
1
    
}
    
    
frozen[tar] = false
    client_print
(tarprint_chat"[AMXX] You have been unfrozen!")
    
set_user_maxspeed(id320.0)
    
    return  
1



[ --<-@ ] Black Rose 02-11-2007 14:57

Re: Need Help.
 
Do you test anything before asking for help? half of the functions are missing and some are not named correctly.

Phantom Warrior 02-11-2007 16:12

Re: Need Help.
 
That's not even the full code yet, I just need those two inplemented.

JCobra 02-11-2007 17:04

Re: Need Help.
 
um... If I'm correct..

amx_hack is a form of slowhacking... And you won't get any help with this... :lol:

[ --<-@ ] Black Rose 02-12-2007 02:54

Re: Need Help.
 
It's not slowhack cuz it's not binding or changing any cvars, it only makes the controls the oposite, without binding them.

Phantom Warrior 02-12-2007 08:36

Re: Need Help.
 
Quote:

Originally Posted by [ --<-@ ] Black Rose (Post 438912)
It's not slowhack cuz it's not binding or changing any cvars, it only makes the controls the oposite, without binding them.

Since it's not slowhacking, can anybody help me? With at least the amx_beer command?
Which will make there screen far away and make them glow blue =)

Alka 02-12-2007 09:02

Re: Need Help.
 
something like this? =>>

PHP Code:

public beer(player)
{
 
   
f(is_user_alive(player))
  {
    
message_begin(MSG_ONEgmsgSetFOV, {000}, player)
 
    
write_byte(170)
 
    
message_end()
  }
      
set_user_rendering(id,kRenderFxGlowShell,0,0,255,kRenderFxNone,15
 


and an unbeer =>>

PHP Code:

public unbeer(player)
{
 
  if(
is_user_alive(player))
  {
    
message_begin(MSG_ONEgmsgSetFOV, {000}, player)
 
    
write_byte(0)
 
    
message_end()
  }
     
set_user_rendering(id,kRenderFxGlowShell,0,0,0,kRenderFxNone,15
 




All times are GMT -4. The time now is 00:34.

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