Raised This Month: $ Target: $400
 0% 

Setting movement speed depending on class [Day of Defeat]


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Tabu34
New Member
Join Date: Jul 2007
Old 07-05-2007 , 21:17   Setting movement speed depending on class [Day of Defeat]
Reply With Quote #1

I'm trying to write a plugin that makes the movement speed of certain classes slower or faster. I have three warnings that I would like to resolve before I move on with the plugin.

Code:
\movespeed.sma<20> : warning 213: tag mismatch
\movespeed.sma<25> : warning 213: tag mismatch
\movespeed.sma<29> : warning 209: function "dod_client_spawn" should return a value
The plugin code is this:

Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <DoDX>

new PLUGIN[] = "DoD Movement Speed"
new AUTHOR[] = "Tabu34"
new VERSION[]= "1.00"

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

public dod_client_spawn(id)
{
    new class = dod_get_user_class(id)
    if(class == 2||class == 3||class == 4||class == 12)
    {
        set_user_maxspeed(id, 650)
        return PLUGIN_HANDLED
    }else{
    if(class == 6||class == 7||class == 8||class == 13||class == 15||class == 17||class == 18)
    {
        set_user_maxspeed(id, 550)
        return PLUGIN_HANDLED
    }
}
}
I'm sorry if this is only a simple mistake, I am new to writing AMX plugins.
Thank you in advance for the help.

Last edited by Tabu34; 07-05-2007 at 22:41.
Tabu34 is offline
 



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 21:32.


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