HELP - with /gravity for admins
Hello guys im new on Allied Modders, Im polish and i need help with /gravity for VIP's.
So I'v searched everywhere and I managed to find it but there are a few things I would like to change. This is what i found, it works fine but it resets in new round, and you need to type it in two times before enableing it. I need: -type /gravity or /grav to enable or disable gravity -Dont want it to reset untill admin types in /gravity or /grav again Thank you all for your help and time, im sorry if there are some spelling mistakes as i sed im from poland and english is my second language :) Here: https://forums.alliedmods.net/showthread.php?p=847780 Code:
#include <amxmodx> |
Re: HELP - with /gravity for admins
Gravity is resetted 'cuz the game does automaticly set it back when you spawn.
What you could do is check at spawn if g_bHasGrav at spawn and if "index" does, set it again. |
Re: HELP - with /gravity for admins
Do is there no way i can have gravity at all times untill i type /gravity again ?
|
Re: HELP - with /gravity for admins
Did you read what Erox902 said ?
Code:
Btw : Code:
= Code:
|
Re: HELP - with /gravity for admins
This looks like it would work, but i am new to scripting could you show me this added in
Thank your the best karma !! |
Re: HELP - with /gravity for admins
why is it when i coppy and paste it all looks like this:
Code:
#include <amxmodx> #include <fun> #include <hamsandwich> #define MAX_PLAYERS 32 #define ADMIN_LEVEL ADMIN_SLAY #define ADMIN_GRAV 250.0 new g_bHasGrav[MAX_PLAYERS+1] new sv_gravity public plugin_init() { sv_gravity = get_cvar_pointer("sv_gravity") register_clcmd("say /grav", "cmdGrav", ADMIN_LEVEL) register_clcmd("say /gravity", "cmdGrav", ADMIN_LEVEL) RegisterHam( Ham_Spawn , "player" , "fwPlayerSpawn" , true ) } public fwPlayerSpawn( id ) { if( is_user_alive( id ) && g_bHasGrav[ id ] ) { set_user_gravity( id , ADMIN_GRAV / get_pcvar_float(sv_gravity)) } } public client_putinserver(id) { g_bHasGrav[id] = false } public cmdGrav(id) { if( get_user_flags(id) & ADMIN_LEVEL ) { if( !g_bHasGrav[id] ) { set_user_gravity(id, ADMIN_GRAV / get_pcvar_float(sv_gravity)) client_print(id, print_chat, " * You Have Enabled Low Gravity") } else { set_user_gravity(id) client_print(id, print_chat, " * You Have Disabled Low Gravity") } } return PLUGIN_HANDLED } |
Re: HELP - with /gravity for admins
I have tried this but gravity still resets in next round ;(
Can some one make a plugin like this when player with flag "t" types in /gravity it sets gravity to lower and when they type /gravityoff it sets it back to normal ? is it possible so that it does not reset every round ? |
Re: HELP - with /gravity for admins
The code that Devil259 should work.
Are you sure that you compiled and replaced the original amxx? Also don't double post use the edit button |
Re: HELP - with /gravity for admins
yes, after i type /gravity it works but restes in the next round an also when i type in /gravity second time in the round it doesent change back to norman this pops up all the time "
You Have Enabled Low Gravity |
Re: HELP - with /gravity for admins
Try this simple edit
PHP Code:
|
| All times are GMT -4. The time now is 12:06. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.