Raised This Month: $ Target: $400
 0% 

MAXSPEED


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Kryzu
Senior Member
Join Date: Feb 2009
Old 10-05-2009 , 09:15   MAXSPEED
Reply With Quote #1

Hello!

I know this has been already asked and helped, i found the topics, but couldn't mix it into my script:S

Could anyone help me making this code working:

PHP Code:
public GiveStuffid ) {
    if( 
is_user_aliveid ) ) {
        
strip_user_weaponsid )
        
give_itemid"weapon_flashbang" );
        
give_itemid"weapon_smokegrenade" );
        
give_itemid"weapon_knife" );
        
give_itemid"weapon_usp" );
        
        new 
iUsp find_ent_by_owner( -1"weapon_usp"id );
        
        if( 
iUsp ){
            
cs_set_weapon_ammoiUsp10 );
            }
        

          new 
iCurWeapon read_data(2)
            if( 
iCurWeapon != g_iCurWeapon[id] )
         {
                
g_iCurWeapon[id] = iCurWeapon
                    set_user_maxspeed
(id270.0)
            }

    }

Atm this maxspeed isn't working at all. It worked untill i tried to make it to change player's maxspeed permentaly not untill weapon change. So could anyone make it working even if player changes weapons.
+karma

TY!
__________________
Kryzu is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 10-05-2009 , 09:17   Re: MAXSPEED
Reply With Quote #2

There are several threads that change a player's maxspeed and keep it that way on weapon change.
Search.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Kryzu
Senior Member
Join Date: Feb 2009
Old 10-05-2009 , 09:19   Re: MAXSPEED
Reply With Quote #3

Quote:
Originally Posted by Exolent[jNr] View Post
There are several threads that change a player's maxspeed and keep it that way on weapon change.
Search.

Ye i know. As u can see, i wrote it into my topic too.

I took the Curweapon code from http://forums.alliedmods.net/showthread.php?t=94331

BUT

FAiled adding it:s


I have to add this:
PHP Code:
public Event_CurWeapon_Activeid )
{
    new 
iCurWeapon read_data(2)
    if( 
iCurWeapon != g_iCurWeapon[id] )
    {
        
g_iCurWeapon[id] = iCurWeapon
        
new Float:flCustomMaxSpeed g_flCustomMaxSpeed[id]
        if( 
flCustomMaxSpeed != 0.0 )
        {
            
set_user_maxspeed(idflCustomMaxSpeed)
        }
    }

__________________

Last edited by Kryzu; 10-05-2009 at 09:26.
Kryzu is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 10-05-2009 , 09:30   Re: MAXSPEED
Reply With Quote #4

I know you failed at adding it to your code, but having someone do it for you won't help you learn.
Understand what the other code is doing before you think about copy/pasting, and I don't mean understand the whole purpose.
Understand each individual line.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 10-05-2009 , 09:31   Re: MAXSPEED
Reply With Quote #5

Register the CurWeapon event, and in the function fix the speed.
__________________
xPaw is offline
Kryzu
Senior Member
Join Date: Feb 2009
Old 10-05-2009 , 09:35   Re: MAXSPEED
Reply With Quote #6

Quote:
Originally Posted by xPaw View Post
Register the CurWeapon event, and in the function fix the speed.
Someone had to be VERY busy...

PHP Code:
public GiveStuffid ) {
    if( 
is_user_aliveid ) ) {
        
strip_user_weaponsid )
        
give_itemid"weapon_flashbang" );
        
give_itemid"weapon_smokegrenade" );
        
give_itemid"weapon_knife" );
        
give_itemid"weapon_usp" );
        
        new 
iUsp find_ent_by_owner( -1"weapon_usp"id );
        
        if( 
iUsp ){
            
cs_set_weapon_ammoiUsp10 );
            }
        
        
Event_CurWeapon_Activeid )

        new 
iCurWeapon read_data(2)
        if( 
iCurWeapon != g_iCurWeapon[id] )
        {
            
g_iCurWeapon[id] = iCurWeapon
        set_user_maxspeed
(id270.0)
        }    

    }

I did everything by this:

http://forums.alliedmods.net/showpos...02&postcount=5
__________________
Kryzu is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 10-05-2009 , 09:40   Re: MAXSPEED
Reply With Quote #7

Stop coding
__________________
xPaw is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 10-05-2009 , 09:42   Re: MAXSPEED
Reply With Quote #8

Quote:
Originally Posted by xPaw View Post
Stop coding
No need for that. He just needs to learn more before asking for help.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Kryzu
Senior Member
Join Date: Feb 2009
Old 10-05-2009 , 09:43   Re: MAXSPEED
Reply With Quote #9

Well, i am not going to be any "pluginer" or something. I don't want to...
I just want to complete one and only plugin and thats all:S

So, please, i ask,
can someone make it for me, so i can read and discuss about it= i learn=i'll not make these mistakes anymore
__________________

Last edited by Kryzu; 10-05-2009 at 09:46.
Kryzu is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 10-05-2009 , 09:46   Re: MAXSPEED
Reply With Quote #10

Well it's still better to learn so you can make something yourself if you ever decide to later on.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] 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 22:34.


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