Raised This Month: $ Target: $400
 0% 

Gravity


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Shibz
Junior Member
Join Date: Apr 2004
Old 06-01-2004 , 23:30   Gravity
Reply With Quote #1

I want to make a plugin so that when you bind a key, and when you hold that key down, whoever you set it to when you bound it flies into the air. I am having trouble getting this to work. Here is what I have...

Code:
#include <amxmodx> #include <amxmisc> #include <cstrike> #include <engine> #include <fun> public plugin_init(){     register_plugin("Rockets","0.0.1","Shibz")     register_clcmd("+amx_fly","cmdFly")     register_clcmd("-amx_fly","cmdunFly") } public cmdFly(id,level,cid) {     if (!(get_user_flags(id)&ADMIN_RCON)) {         client_print(id,print_console,"[AMXX] You have no access to that command")         return PLUGIN_HANDLED     }     new arg[32],arg2[3]     read_argv(1,arg,31)     new player = cmd_target(id,arg,5)     if (!player)         return PLUGIN_HANDLED     new sPlayer[2]     sPlayer[0] = player     new victim     set_user_gravity(victim,-1.50)     client_cmd(victim,"+jump;wait;wait;-jump")     return PLUGIN_CONTINUE     new playername[32]     get_user_name(player,playername,31)     return PLUGIN_HANDLED } public cmdunFly(id,level,cid) {     if (!(get_user_flags(id)&ADMIN_RCON)) {         client_print(id,print_console,"[AMXX] You have no access to that command")         return PLUGIN_HANDLED     }     new arg[32],arg2[3]     read_argv(1,arg,31)     new player = cmd_target(id,arg,5)     if (!player)         return PLUGIN_HANDLED     new sPlayer[2]     sPlayer[0] = player     new victim     set_user_gravity(victim,1.00)     client_cmd(victim,"+jump;wait;wait;-jump")     return PLUGIN_CONTINUE     new playername[32]     get_user_name(player,playername,31)     return PLUGIN_HANDLED }

I used Lud's jetpack mod as a reference, and I copied a little... this is only my second plugin.
Shibz 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 14:38.


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