Raised This Month: $ Target: $400
 0% 

Solved fly plugin help


Post New Thread Closed Thread   
 
Thread Tools Display Modes
Author Message
Uzviseni Bog
Senior Member
Join Date: Jun 2020
Old 01-06-2024 , 14:05   Re: fly plugin help
#1

Buddy, no one will help you if you don't properly leave the entire code, not just a part of it, I believe you are not the author of that code, if you were, you would know how to solve it. Once again, post the entire code.
Uzviseni Bog is offline
vres
Junior Member
Join Date: Dec 2023
Location: Turkey
Old 01-06-2024 , 15:31   Re: fly plugin help
#2

Quote:
Originally Posted by Uzviseni Bog View Post
Buddy, no one will help you if you don't properly leave the entire code, not just a part of it, I believe you are not the author of that code, if you were, you would know how to solve it. Once again, post the entire code.
this is everything

Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>
#include <cstrike>
#include <engine>
#include <fakemeta>
#include <fun>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "me"


public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	
}

public client_PreThink(id)  
{ 

    if( is_user_alive(id) ) 
    { 
        new Float:fAim[3]
        VelocityByAim(id , 500, fAim)
        
        if( !(get_user_button(id) & IN_JUMP) ) 
            set_user_velocity(id, fAim)
    } 
    return PLUGIN_CONTINUE
}
It already works like this

Last edited by DarkDeviL; 01-08-2024 at 19:08. Reason: Restore to previous version.
vres is offline
Uzviseni Bog
Senior Member
Join Date: Jun 2020
Old 01-06-2024 , 15:43   Re: fly plugin help
#3

Quote:
Originally Posted by vres View Post
this is everything

Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>
#include <cstrike>
#include <engine>
#include <fakemeta>
#include <fun>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "me"


public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	
}

public client_PreThink(id)  
{ 

    if( is_user_alive(id) ) 
    { 
        new Float:fAim[3]
        VelocityByAim(id , 500, fAim)
        
        if( !(get_user_button(id) & IN_JUMP) ) 
            set_user_velocity(id, fAim)
    } 
    return PLUGIN_CONTINUE
}
It already works like this


What do you actually want? Do you want a hook that will be bound with the command 'bind c +fly' instead of 'bind c +hook', and to be given to certain players through a command?
Uzviseni Bog is offline
vres
Junior Member
Join Date: Dec 2023
Location: Turkey
Old 01-06-2024 , 16:11   Re: fly plugin help
#4

Quote:
Originally Posted by Uzviseni Bog View Post
What do you actually want? Do you want a hook that will be bound with the command 'bind c +fly' instead of 'bind c +hook', and to be given to certain players through a command?
If you've tried this code, you can see that the player can fly. I want it to work like a hook plugin, meaning it should activate with a command like +fly when the 'c' key is pressed, and the code should stop running when the 'c' key is released. In essence, I want it to function as a hook plugin with +fly and -fly commands.

Additionally, I want to be able to give and take this flying ability permanently to/from a player using the amx_givefly and amx_takefly commands. Even if the player logs out and logs back in, they should still have this ability, as it is stored as a permanent feature for that specific player.

sample hook plugin

https://forums.alliedmods.net/showthread.php?t=52304

Last edited by DarkDeviL; 01-08-2024 at 19:08. Reason: Restore to previous version.
vres is offline
Closed Thread



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 00:33.


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