Raised This Month: $ Target: $400
 0% 

Need Help.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Phantom Warrior
BANNED
Join Date: Feb 2007
Location: hello, gaben
Old 02-10-2007 , 21:12   Need Help.
Reply With Quote #1

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


Last edited by Phantom Warrior; 02-10-2007 at 21:15.
Phantom Warrior is offline
 



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 00:34.


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