Raised This Month: $ Target: $400
 0% 

MultiJump for admins only


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
godlike
Senior Member
Join Date: Apr 2005
Old 06-24-2005 , 06:54   MultiJump for admins only
Reply With Quote #1

Well i still dont know how to script but i want this only for admins :


Code:
#include <amxmodx> #include <amxmisc> #include <engine> #include <float> new jumpnum[33] = 0 new bool:dojump[33] = false public plugin_init() {     register_plugin("MultiJump","1.0","twistedeuphoria")     register_cvar("amx_maxjumps","1") } public client_putinserver(id) {     jumpnum[id] = 0     dojump[id] = false } public client_disconnect(id) {     jumpnum[id] = 0     dojump[id] = false } public client_PreThink(id) {     new nbut = get_user_button(id)     new obut = get_user_oldbutton(id)     if((nbut & IN_JUMP) && !(get_entity_flags(id) & FL_ONGROUND) && !(obut & IN_JUMP))     {         if(jumpnum[id] < get_cvar_num("amx_maxjumps"))         {             dojump[id] = true             jumpnum[id]++             return PLUGIN_CONTINUE         }     }     if((nbut & IN_JUMP) && (get_entity_flags(id) & FL_ONGROUND))     {         jumpnum[id] = 0         return PLUGIN_CONTINUE     }     return PLUGIN_CONTINUE } public client_PostThink(id) {     if(dojump[id] == true)     {         new Float:velocity[3]           entity_get_vector(id,EV_VEC_velocity,velocity)         velocity[2] = random_float(265.0,285.0)         entity_set_vector(id,EV_VEC_velocity,velocity)         dojump[id] = false         return PLUGIN_CONTINUE     }     return PLUGIN_CONTINUE }
__________________
Read the rules before posting something stupid: click here

Any questions about amxx PM me
godlike is offline
Proach
Veteran Member
Join Date: Jan 2005
Location: The Netherlands
Old 06-24-2005 , 08:39  
Reply With Quote #2

ok.. probably crap but maybe add a line with

Code:
#define ACCESS_TYPE ADMIN_....

on top of the code?
you can find all acces types in amxconst.inc
__________________

www.psmod.net (the better psychostats)
PAOL
Proach is offline
Send a message via ICQ to Proach
godlike
Senior Member
Join Date: Apr 2005
Old 06-24-2005 , 10:41  
Reply With Quote #3

lol . I dont think its that but thx for trying
__________________
Read the rules before posting something stupid: click here

Any questions about amxx PM me
godlike is offline
WaZZeR++
Veteran Member
Join Date: Mar 2005
Location: Sweden
Old 06-24-2005 , 14:28  
Reply With Quote #4

Code:
public client_putinserver(id) {     jumpnum[id] = 0     dojump[id] = false }
and
Code:
    if((nbut & IN_JUMP) && (get_entity_flags(id) & FL_ONGROUND))     {         jumpnum[id] = 0         return PLUGIN_CONTINUE     }

try to set jumpnum[id] to 1 if it is a player, and 0 if it is a admin....
dont know if that help, you can allso put a check in the start of the commands, something like if(is_user_admin(id))
WaZZeR++ is offline
Send a message via MSN to WaZZeR++
twistedeuphoria
Veteran Member
Join Date: Jul 2004
Old 06-24-2005 , 15:41  
Reply With Quote #5

You posted in the thread, why didn't you request this there?
__________________
twistedeuphoria is offline
godlike
Senior Member
Join Date: Apr 2005
Old 06-24-2005 , 17:16  
Reply With Quote #6

sry twist.
__________________
Read the rules before posting something stupid: click here

Any questions about amxx PM me
godlike is offline
WaZZeR++
Veteran Member
Join Date: Mar 2005
Location: Sweden
Old 06-24-2005 , 17:17  
Reply With Quote #7

so you reguest someone to do it?
WaZZeR++ is offline
Send a message via MSN to WaZZeR++
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:11.


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