Raised This Month: $ Target: $400
 0% 

Plugin Modification #1


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
kmal2t
BANNED
Join Date: Apr 2006
Old 04-15-2006 , 02:26   Plugin Modification #1
Reply With Quote #1

BRAWR

Last edited by kmal2t; 05-21-2007 at 04:44.
kmal2t is offline
organizedKaoS
Senior Member
Join Date: Feb 2006
Old 04-15-2006 , 06:09  
Reply With Quote #2

I dont know or play VS, but at least im trying to help. Try this
Code:
public client_PreThink(id)     {       if((is_user_alive(id)) && (get_team_int(id) == 1))         {         newButton[id] = get_user_button(id)         new oldButton = get_user_oldbutton(id)         new flags = get_entity_flags(id)                 //reset if we are on ground         if(caughtJump[id] && (flags & FL_ONGROUND))             {             numJumps[id] = 0             caughtJump[id] = false         }                 //begin when we jump         if((newButton[id] & IN_JUMP) && (flags & FL_ONGROUND) && !caughtJump[id] && !(oldButton & IN_JUMP) && !numJumps[id])             {             caughtJump[id] = true             entity_get_vector(id,EV_VEC_velocity,jumpVeloc[id])             jumpVeloc[id][2] = get_cvar_float("walljump_str")         }     } } public client_PostThink(id)     {     if(is_user_alive(id))         {         //do velocity if we walljumped         if(doJump[id])             {             entity_set_vector(id,EV_VEC_velocity,jumpVeloc[id])                         doJump[id] = false                         if(numJumps[id] >= get_cvar_num("walljump_num")) //reset if we ran out of jumps                 {                 numJumps[id] = 0                 caughtJump[id] = false             }         }     } } public Touch_World(id, world)     {     if(is_user_alive(id))         {         //if we touch wall and have jump pressed, setup for jump         if(caughtJump[id] && (newButton[id] & IN_JUMP) && !(get_entity_flags(id) & FL_ONGROUND))             {                         //reverse velocity             for(new x=0;x<2;x++)                 jumpVeloc[id][x] *= -1.0                         numJumps[id]++             doJump[id] = true         }         } } stock get_team_int(id)     {     new TeamString[8]     get_user_team(id,TeamString,7)     if(equali(TeamString,"VAMPIRE"))         return 1     if(equali(TeamString,"SLAYER"))         return 2     return 0 }
organizedKaoS is offline
kmal2t
BANNED
Join Date: Apr 2006
Old 04-16-2006 , 03:29  
Reply With Quote #3

Thanks a million dude. I had figured it would be something along those lines but I didn't know how to exactly put it together. By that example I could probably implement team designation on my own in the future.
kmal2t is offline
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 05:11.


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