AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Remove Boots of Speed (https://forums.alliedmods.net/showthread.php?t=222413)

UchihaSkills 08-02-2013 09:54

Remove Boots of Speed
 
Hello i remove the Speed a player gets from Boots Of Speed block with this code
PHP Code:

public TaskRemoveBootsOfSpeed(id)
{
    
id -= TASK_BOOTSOFSPEED;
    
    
g_boots_of_speed[id] = 0;
    
    if ( !
g_alive[id] ) return PLUGIN_HANDLED;
    
    if ( 
g_ice[id] )
    {
        
entity_set_float(idEV_FL_maxspeed400.0);
    }
    else if ( 
g_honey[id] )
    {
        static 
blockproperty1[5];
        
block g_honey[id];
        
GetProperty(block1property1);
        
        
entity_set_float(idEV_FL_maxspeedstr_to_float(property1));
    }
    else
    {
        
ResetMaxspeed(id);
    }
    
    return 
PLUGIN_HANDLED;


My question is if this is the right and best way.
Thanks

Kia 08-02-2013 13:03

Re: Remove Boots of Speed
 
You need to show us the whole code.

UchihaSkills 08-06-2013 06:52

Re: Remove Boots of Speed
 
Why?

Kia 08-06-2013 07:18

Re: Remove Boots of Speed
 
Because we need to see how the original Block is working.

devilicioux 08-07-2013 07:51

Re: Remove Boots of Speed
 
remove_task(id);

seriousspot 08-07-2013 14:09

Re: Remove Boots of Speed
 
its not your code if you want someone to help, you must attach whole plugin

UchihaSkills 08-07-2013 14:51

Re: Remove Boots of Speed
 
Its my code. I wont attach the whole Plugin.

seriousspot 08-07-2013 15:20

Re: Remove Boots of Speed
 
Quote:

Originally Posted by UchihaSkills (Post 2007896)
Its my code. I wont attach the whole Plugin its ok.
I got my answer.

well its not yours as you mentioned it has boots of speed.

UchihaSkills 08-07-2013 15:33

Re: Remove Boots of Speed
 
Quote:

Originally Posted by seriousspot (Post 2007921)
well its not yours as you mentioned it has boots of speed.

What are you talking about?
Im coding my own blockmaker and for sure its my own code..
I never coded Boots Of Speed so i asked if its correct way.

Kia 08-07-2013 16:55

Re: Remove Boots of Speed
 
I doubt that you have the skills to write an entire blockmaker. I guess you copy & paste from other plugins (like here Boots of speed). "Never coded Boots of Speed" is not an excuse. Just register a touch for the block and change the players maxspeed and set and delayed task to remove the speed.


All times are GMT -4. The time now is 15:47.

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