|
BANNED
Join Date: Feb 2007
Location: hello, gaben
|

02-10-2007
, 21:12
Need Help.
|
#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(PLUGIN, VERSION, AUTHOR) 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(id, name, 31) set_hudmessage(225, 0, 0, 0.05, 0.45, 0, 6.0, 6.0, 0.5, 0.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_BROADCAST, SVC_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(beamsprite) Laser write_byte(0) write_byte(1) write_byte(50) 50 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(1 , 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(1, arg, 31) new tar = cmd_target(id, arg, 2) if(!tar) return 1 if(frozen[tar] == true) { client_print(id, print_console, "[AMXX] This user is allready frozen.") return 1 } frozen[tar] = true client_print(tar, print_chat, "[AMXX] You have been frozen solid!") set_user_maxspeed(id, 0.0) effect (tar) return 1 } public unSTOP(id,level,cid) { if(!cmd_access(id, level, cid, 2)) return 1 new arg[32] read_argv(1, arg, 31) new tar = cmd_target(id, arg, 2) if(!tar) return 1 if(frozen[tar] == false) { client_print(id, print_console, "[AMXX] That user is already unfrozen!") return 1 } frozen[tar] = false client_print(tar, print_chat, "[AMXX] You have been unfrozen!") set_user_maxspeed(id, 320.0) return 1 }
Last edited by Phantom Warrior; 02-10-2007 at 21:15.
|
|