Raised This Month: $12 Target: $400
 3% 

-attack


Post New Thread Reply   
 
Thread Tools Display Modes
Freecode
Never Fall Asleep
Join Date: Jan 2004
Old 01-26-2005 , 18:00  
Reply With Quote #11

client_prethink is basicly called every 0.1 seconds or maybe even faster on a player.
so thats where u have to change the sequence. and it will stay then.
Freecode is offline
eyeball
Junior Member
Join Date: Jan 2005
Location: Latvia
Old 01-27-2005 , 09:53  
Reply With Quote #12

Do you mean like this?

if (client_prethink(id)) {
Entvars_Set_Int(id, EV_INT_sequence, 1)
}
__________________
I was here
eyeball is offline
eyeball
Junior Member
Join Date: Jan 2005
Location: Latvia
Old 01-27-2005 , 12:18  
Reply With Quote #13

oh now i get it! I found it in windwalker`s code.

thnx dudes
__________________
I was here
eyeball is offline
Freecode
Never Fall Asleep
Join Date: Jan 2004
Old 01-27-2005 , 13:34  
Reply With Quote #14

client prethink is a forward so it be like this
Code:
public Client_PreThink(id) {      //junk of code here }
Freecode is offline
eyeball
Junior Member
Join Date: Jan 2005
Location: Latvia
Old 01-28-2005 , 09:27  
Reply With Quote #15

yeah but it still doesn`t work...
__________________
I was here
eyeball is offline
Freecode
Never Fall Asleep
Join Date: Jan 2004
Old 01-28-2005 , 15:04  
Reply With Quote #16

this in fact is a cool idea. maybe ill make it and give you the source for the hero. i want to make a plugin out of it
Freecode is offline
eyeball
Junior Member
Join Date: Jan 2005
Location: Latvia
Old 01-28-2005 , 16:28  
Reply With Quote #17

i am making a prince of persia hero with knife only (10x damage) + stop time, gravity, speed, 200hp. I made v_knife and p_knife models too. I have found out the the set_user_maxspeed(id,0.0) works only on bots, but human players get realy fast. Maybe i should use set_user_maxspeed(id,1.0) instead. I can give you the sma if ya want.
__________________
I was here
eyeball is offline
Freecode
Never Fall Asleep
Join Date: Jan 2004
Old 01-28-2005 , 16:40  
Reply With Quote #18

try 0.1
theyll move but really slow. but ur best choice is in client prethink just set users origin to his original that way he dont move.
Freecode is offline
Freecode
Never Fall Asleep
Join Date: Jan 2004
Old 01-28-2005 , 21:50  
Reply With Quote #19

Here is what i cam up with. Whipped it up pretty quick and only tested it with bots. There seem to be a few flaws in the fun module with user hitzones and for some reason my origin thing isnt working very good. So ill fix it up a bit later.
Code:
#include <amxmodx> #include <cstrike> #include <engine> #include <fun> new bool:g_pRunning;    //Plugin running? new bool:g_inUse;   //Time split in use? new g_ID;       //ID of person using timesplit new Float:g_Origin[32][3]//Origin of all players public plugin_init() {     register_plugin("No name","1.0","Freecode");     register_clcmd("amxx_timesplit","cmd_split",ADMIN_LEVEL_A,"Turn On/Off toggle");     register_clcmd("timesplit","timesplit",ADMIN_LEVEL_A,"Use timesplit");     register_cvar("ts_time","20.0");    //Timesplit time         g_pRunning = true;     g_inUse = false; } public plugin_modules() {     require_module("engine");     require_module("cstrike");     require_module("fun"); } public cmd_split(id) {     if(g_pRunning)         g_pRunning = false;     else         g_pRunning = true;             console_print(id,"[TS]Has been turned %s",g_pRunning ? "On" : "Off");         return PLUGIN_HANDLED; } public timesplit(id) {     if(g_pRunning)     {         if(g_inUse)         {             client_print(id,3,"[TS]Already in use. Try again later.");             return PLUGIN_HANDLED;         }         g_ID = id;         g_inUse = true;                 new players[32], inum         get_players(players,inum,"a");                 for(new i = 0;i < inum; i++)         {             if(i != g_ID && is_user_alive(i))             {                 set_user_hitzones(i, 0, 0);                 entity_get_vector(i,EV_VEC_origin,g_Origin[i]);             }         }         set_task(get_cvar_float("ts_time"),"timesplit_off",0,"",1);         client_print(g_ID,3,"Timesplit turned On");     }     return PLUGIN_HANDLED; } public timesplit_off() {     if(g_inUse)     {         g_inUse = false;         new players[32],inum         get_players(players,inum,"a");                 for(new i = 0;i < inum; i++)         {             if(i != g_ID && is_user_alive(i))                 set_user_hitzones(i, 0, 255);         }     }     client_print(g_ID,3,"Timesplit turned off");     return PLUGIN_HANDLED; } public client_PreThink(id) {     if(g_pRunning && g_inUse)     {         if(id == g_ID)         {             new players[32], inum             new Float:origin[3];             get_players(players,inum,"a");                         for(new i = 0; i < inum; i++)             {                 if(i != g_ID && is_user_alive(i))                 {                     entity_set_int(i,EV_INT_button,0);                      new b = entity_get_int(i,EV_INT,button);    //b = Button                     if( (b == IN_ATTACK) || (b == IN_ATTACK2) || (b == IN_RELOAD) )                     {                         set_gun_idle(i);                     }                                         entity_get_vector(i,EV_VEC_origin,origin);                     if( (origin[0] != g_Origin[i][0]) && (origin[1] != g_Origin[i][1]) && (origin[2] != g_Origin[i][2]))                     {                         entity_set_vector(i,EV_VEC_origin,g_Origin[i]);                     }                 }             }         }     }     return PLUGIN_HANDLED; } public set_gun_idle(id) {     new iWPNid;     new clip, ammo, wpn[32];     new wpnid = get_user_weapon(id, clip, ammo);         get_weaponname(wpnid,wpn,31);     while( (iWPNid = find_ent_by_class(iWPNid, wpn) ) != 0)     {         if (id == entity_get_edict(iWPNid, EV_ENT_owner))         {             entity_set_int(iWPNid, EV_INT_sequence, 1);         }     }     return PLUGIN_HANDLED; }

For updates you can find latest source in here: http://tcwonline.org/cgi-bin/viewcvs...viewcvs-markup
Freecode is offline
jtp10181
Veteran Member
Join Date: May 2004
Location: Madison, WI
Old 01-28-2005 , 23:03  
Reply With Quote #20

in blink i prevent players from moving by doing this

Code:
shStun(id, floatround(blinkdelay, floatround_floor) + 1) set_user_maxspeed(id, 1.0)
__________________
jtp10181 is offline
Send a message via ICQ to jtp10181 Send a message via AIM to jtp10181 Send a message via MSN to jtp10181 Send a message via Yahoo to jtp10181
Reply



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 08:38.


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