Raised This Month: $ Target: $400
 0% 

set/get_user_origin problem


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 02-25-2006 , 11:20   set/get_user_origin problem
Reply With Quote #1

ok guys... need help with this script...
it suppose to move slowly forward ( the same way as the player is aiming ) but it teleports you over the hole map in one second :S
and its not any problem with set task is to fast... its the set/get_user_origin() and/or origin[1]++ i think

heres the scripts
Code:
#include <amxmodx> #include <fun> #define PLUGIN "CageCMD" #define VERSION "1.0" #define AUTHOR "[ --<-@ ]" public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)         register_clcmd("+cagecmd", "start_cmd")     register_clcmd("-cagecmd", "stop_cmd")         cmd_ad() } public start_cmd(id) {         new mapname[32]     get_mapname( mapname, 31 )     if ( ! equali( mapname, "surf_ski") ) {         return PLUGIN_HANDLED     }     set_task( 0.1, "move_forward", id, _, _, "b")         return PLUGIN_CONTINUE } public stop_cmd(id) {         remove_task(id)     } public move_forward(id) {         new origin[3]         get_user_origin(id, origin, 3)         origin[1]++         set_user_origin(id, origin)     } public cmd_ad() {         new mapname[32]     get_mapname( mapname, 31 )     if ( ! equali( mapname, "surf_ski") ) {         return PLUGIN_HANDLED     }         client_print( 0, print_chat, "to get out of jail use +cagecmd")     client_print( 0, print_chat, "please bind it using: bind key ^"+cagecmd^"")         set_task( 60.0, "cmd_ad", 0 )         return PLUGIN_CONTINUE }
[ --<-@ ] Black Rose is offline
 


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 20:24.


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