Raised This Month: $ Target: $400
 0% 

Simple Script Help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ClanStyles
BANNED
Join Date: Jun 2006
Old 07-06-2006 , 13:59   Simple Script Help
Reply With Quote #1

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

#define PLUGIN "Custom F.U.N Plugin"
#define VERSION "1.0"
#define AUTHOR "Styles"


public plugin_init() {
    register_plugin(PLUGIN, VERSION, AUTHOR)
    register_event("CurWeapon", "Event_CurWeapon", "be", "1=1")
    
}

public Event_CurWeapon(id) 
{
   new oldspeed[id] = get_user_maxspeed(id);
    
    
    if(CSW_KNIFE)
    {
        set_user_maxspeed(id,700.0);
        set_hudmessage(255, 170, 0, -1.0, 0.32, 0, 6.0, 12.0);
        show_hudmessage(id, "--> You know can go faster <--");
    }
    else
    {
        set_user_maxspeed(id,oldspeed[id]);
        set_hudmessage(255, 170, 0, -1.0, 0.32, 0, 6.0, 12.0);
        show_hudmessage(id, "--> Your speed is now over <--");
    }
}
i get an:
Must be constant expression; assumed zero for lines 18 x2

and Emty Statement on 19 and fatal error 107 to many errors
ClanStyles is offline
shino
Senior Member
Join Date: May 2006
Old 07-06-2006 , 14:04   Re: Simple Script Help
Reply With Quote #2

try to not use oldspeed:
Code:
public Event_CurWeapon(id) {      if(CSW_KNIFE)     {         set_user_maxspeed(id,700.0);         set_hudmessage(255, 170, 0, -1.0, 0.32, 0, 6.0, 12.0);         show_hudmessage(id, "--> You know can go faster <--");     }     else     {         set_user_maxspeed(id,320.0); // 320 == normal speed         set_hudmessage(255, 170, 0, -1.0, 0.32, 0, 6.0, 12.0);         show_hudmessage(id, "--> Your speed is now over <--");     } }
__________________


+karma if i am helpful
shino is offline
ClanStyles
BANNED
Join Date: Jun 2006
Old 07-06-2006 , 14:27   Re: Simple Script Help
Reply With Quote #3

thx Testing it now

Done testing now the bugs i need help w/

one is that there ALLWAYS going fast! Not just w/ knife.

Also they can change there cl_forwardspeed and maket hemselfs go WAY to fast.

Last edited by ClanStyles; 07-06-2006 at 15:23.
ClanStyles is offline
Rolnaaba
Veteran Member
Join Date: May 2006
Old 07-06-2006 , 16:26   Re: Simple Script Help
Reply With Quote #4

Code:
<div align="left">#include <amxmodx></div></p><p><div align="left">#include <amxmisc></div></p><p><div align="left">#include <cstrike></div></p><p><div align="left">#include <fun></div></p><p></p><p><div align="left">#define PLUGIN "Custom F.U.N Plugin"</div></p><p><div align="left">#define VERSION "1.0"</div></p><p><div align="left">#define AUTHOR "Styles"</div></p><p></p><p></p><p><div align="left">public plugin_init() {</div></p><p><div align="left"> register_plugin(PLUGIN, VERSION, AUTHOR)</div></p><p><div align="left"> register_event("CurWeapon", "Event_CurWeapon", "be", "1=1")</div></p><p></p><p><div align="left">}</div></p><p></p><p><div align="left">public Event_CurWeapon(id) </div></p><p><div align="left">{</div></p><p><div align="left"> if(CSW_KNIFE)</div></p><p><div align="left"> {</div></p><p><div align="left"> set_user_maxspeed(id,700.0);</div></p><p><div align="left"> set_hudmessage(255, 170, 0, -1.0, 0.32, 0, 6.0, 12.0);</div></p><p><div align="left"> show_hudmessage(id, "--> You know can go faster <--");</div></p><p><div align="left"> return PLUGIN_CONTINUE;</div></p><p><div align="left"> }</div></p><p><div align="left"> else</div></p><p><div align="left"> {</div></p><p><div align="left"> set_user_maxspeed(id,oldspeed[id]);</div></p><p><div align="left"> set_hudmessage(255, 170, 0, -1.0, 0.32, 0, 6.0, 12.0);</div></p><p><div align="left"> show_hudmessage(id, "--> Your speed is now over <--");</div></p><p><div align="left"> return PLUGIN_CONTINUE;</div></p><p><div align="left"> }</div></p><p><div align="left">}</div>



try it like that
__________________
DO NOT PM me about avp mod.
Rolnaaba is offline
Rolnaaba
Veteran Member
Join Date: May 2006
Old 07-06-2006 , 16:26   Re: Simple Script Help
Reply With Quote #5

[small]
Code:
<div align="left">#include <amxmodx> #include <amxmisc> #include <cstrike> #include <fun> #define PLUGIN "Custom F.U.N Plugin" #define VERSION "1.0" #define AUTHOR "Styles" public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     register_event("CurWeapon", "Event_CurWeapon", "be", "1=1")     } public Event_CurWeapon(id) {     if(CSW_KNIFE)     {         set_user_maxspeed(id,700.0);         set_hudmessage(255, 170, 0, -1.0, 0.32, 0, 6.0, 12.0);         show_hudmessage(id, "--> You know can go faster <--");         return PLUGIN_CONTINUE;     }     else     {         set_user_maxspeed(id,oldspeed[id]);         set_hudmessage(255, 170, 0, -1.0, 0.32, 0, 6.0, 12.0);         show_hudmessage(id, "--> Your speed is now over <--");         return PLUGIN_CONTINUE;     } }</div>

sry for double post

__________________
DO NOT PM me about avp mod.

Last edited by Rolnaaba; 07-06-2006 at 16:31.
Rolnaaba is offline
Reply


Thread Tools
Display Modes

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 08:03.


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