Raised This Month: $ Target: $400
 0% 

Flying script?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
LAMMPARD8_PRO
Member
Join Date: Dec 2012
Old 12-28-2012 , 20:21   Flying script?
Reply With Quote #1

Hello,
Since i started to learn pawn hard and my private plug-in maker is because of some reason out of the forums.. i have some bad situations to solve. I couldn't do anything, the information is 0, so i decide to ask here.

As we know the plug-in jetpack with comes with bazooka and 1393191239 things more, i couldn't see in the script function that will run the flying. You know ..ctrl+space and the player go to the sky.

Ive tried with PreThink with registered keys to set user gravity to 0 and from Post Think when the function is not in process (ctrl is not pressed) to set the players gravity to normal. But i got navigation problems Can you help me draw a simple script that if u press ctrl+space you flying and navigating like the Jetpack.. i hope the script is short and so i can use it in my function. Thanks.
__________________
[IMG]http://img24.**************/img24/3333/92810204.png[/IMG]
LAMMPARD8_PRO is offline
twix_p
Member
Join Date: Jul 2011
Old 12-28-2012 , 20:29   Re: Flying script?
Reply With Quote #2

http://forums.alliedmods.net/showthread.php?p=213777

Jetpack Lite is more simplified.

PHP Code:

public client_PreThink(id) {

    if( !
is_user_alive(id)) {
        return 
PLUGIN_CONTINUE;
    }
    if(!(
get_user_button(id) & IN_JUMP)) {
        return 
PLUGIN_CONTINUE;
    }

    new 
Float:fAim[3] , Float:fVelocity[3];
    
VelocityByAim(id 500 fAim);

    
fVelocity[0] = fAim[0];
    
fVelocity[1] = fAim[1];
    
fVelocity[2] = fAim[2];

    
set_user_velocity(id fVelocity);

    
entity_set_int(id EV_INT_gaitsequence 6);

    
emit_sound(id CHAN_VOICE JP_SOUND 1.0 ATTN_NORM PITCH_NORM);

    if(
frame[id] >= 3) {
        
frame[id] = 0;
        
smoke_effect(id);
        
entity_set_string(id EV_SZ_weaponmodel "models/p_egon.mdl");
    }
    
frame[id]++;

    return 
PLUGIN_CONTINUE;


Last edited by twix_p; 12-28-2012 at 20:30.
twix_p is offline
LAMMPARD8_PRO
Member
Join Date: Dec 2012
Old 12-28-2012 , 20:57   Re: Flying script?
Reply With Quote #3

Right, thanks. I did some corrects so i can use that. That is like the zp class crow btw same script way. Thanks.
__________________
[IMG]http://img24.**************/img24/3333/92810204.png[/IMG]
LAMMPARD8_PRO is offline
AngeIII
Senior Member
Join Date: Sep 2007
Location: Latvia
Old 12-29-2012 , 03:45   Re: Flying script?
Reply With Quote #4

inside Loop velocity and origins nothing more needed.
__________________
skype: pavle_ivanof
-=ThQ=-
PRIVATE SUPPORT = PAID SUPPORT
AngeIII is offline
Send a message via Skype™ to AngeIII
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 13:40.


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