Raised This Month: $ Target: $400
 0% 

function inb?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Burnzy
Veteran Member
Join Date: Apr 2004
Old 07-10-2004 , 19:26   function inb?
Reply With Quote #1

whats is the function 'inb' from amx now?

Quote:
undefined symbol "inb"
__________________
Burnzy is offline
Send a message via AIM to Burnzy
jtp10181
Veteran Member
Join Date: May 2004
Location: Madison, WI
Old 07-10-2004 , 19:29  
Reply With Quote #2

WTH are you talking about?

its not a function in AMX nor AMXx

Are you sure you just did not forget to define something?
__________________
jtp10181 is offline
Send a message via ICQ to jtp10181 Send a message via AIM to jtp10181 Send a message via MSN to jtp10181 Send a message via Yahoo to jtp10181
SidLuke
Senior Member
Join Date: Mar 2004
Location: Poland, Chrzanow
Old 07-10-2004 , 19:30  
Reply With Quote #3

post code
SidLuke is offline
Send a message via AIM to SidLuke Send a message via MSN to SidLuke
Burnzy
Veteran Member
Join Date: Apr 2004
Old 07-10-2004 , 19:38  
Reply With Quote #4

Code:
#include <amxmodx> #include <amxmisc> #include <fun> #define NEG_GRAV                -50.0 #define CRUSH_GRAV       999999999.0 #define DELAY                    1.0 #define RISE_TIME                3.0 #define FALL_TIME                4.0 #define SMALL_JUMP              15 new Float:old_grav          // to remember old grav setting new bool:is_in_progress     // to know if there is a crush in progress new thePlayers[32], nb      // to remember which players are being crushed public grav_crush(id,level,cid) {     // check access rights     if (!cmd_access(id,level,cid,1))         return PLUGIN_HANDLED     // check if there is already a crush     if (is_in_progress)     {         console_print(id,"There is already a crush in progress.")         return PLUGIN_HANDLED     }     // send hud warning     is_in_progress = true     show_hudmessage(0, "Now, you will all be crushed !")     // support for amx_show_activity     switch (get_cvar_num("amx_show_activity"))     {     case 1 :         client_print(0, print_chat, "ADMIN has launched a gravity crush !")     case 2 :         {             new name[32]             get_user_name(id, name, 31)             client_print(0, print_chat, "ADMIN %s has launched a gravity crush !", name)         }     }     // set all tasks     set_task(DELAY, "begin_jump")     set_task(DELAY + RISE_TIME, "reverse_grav")     set_task(DELAY + FALL_TIME, "restore_grav")     return PLUGIN_HANDLED } public begin_jump() {     // change gravity     old_grav = get_cvar_float("sv_gravity")     set_cvar_float("sv_gravity", NEG_GRAV)     // make all alive players jump     get_players(thePlayers,nb,"a")     new origin[3]     for(new i=0; i<nb; ++i)     {         get_user_origin(thePlayers[i], origin)         origin[2] += SMALL_JUMP         set_user_origin(thePlayers[i], origin)     }         return PLUGIN_HANDLED } public reverse_grav() {     // reverse gravity     set_cvar_float("sv_gravity", CRUSH_GRAV)     // set all immune alive players in godmode     get_players(thePlayers,nb,"a")       for(new i=0; inb; ++i)         if (get_user_flags(thePlayers[i])&ADMIN_IMMUNITY)                   set_user_godmode(thePlayers[i],1)     return PLUGIN_HANDLED } public restore_grav() {     // restore gravity     set_cvar_float("sv_gravity", old_grav)     // remove godmode for everyone     get_players(thePlayers,nb)       for(new i=0; inb; ++i)         if (get_user_godmode(thePlayers[i]))                    set_user_godmode(thePlayers[i])     is_in_progress = false     return PLUGIN_HANDLED } public plugin_init() {     register_plugin("Gravity Crush","1.0","Vince1")     register_concmd("amx_gravity_crush","grav_crush",ADMIN_SLAY)     is_in_progress = false     return PLUGIN_CONTINUE }
__________________
Burnzy is offline
Send a message via AIM to Burnzy
kingpin
Veteran Member
Join Date: Apr 2004
Location: kpsforum.com
Old 07-10-2004 , 19:41  
Reply With Quote #5

umm anything has to be defined first i.e. "inb" has to be defined somewhere in the code. i.e. "new inb" or something I didnt read the code yet I dont know what context you are using it in.
__________________
kingpin is offline
Send a message via ICQ to kingpin Send a message via AIM to kingpin Send a message via MSN to kingpin Send a message via Yahoo to kingpin Send a message via Skype™ to kingpin
jtp10181
Veteran Member
Join Date: May 2004
Location: Madison, WI
Old 07-10-2004 , 19:42  
Reply With Quote #6

Code:
inb
should be
Code:
i < nb
__________________
jtp10181 is offline
Send a message via ICQ to jtp10181 Send a message via AIM to jtp10181 Send a message via MSN to jtp10181 Send a message via Yahoo to jtp10181
Burnzy
Veteran Member
Join Date: Apr 2004
Old 07-10-2004 , 19:42  
Reply With Quote #7

im porting a plugin. Seems it wasnt even defined...
__________________
Burnzy is offline
Send a message via AIM to Burnzy
Burnzy
Veteran Member
Join Date: Apr 2004
Old 07-10-2004 , 19:45  
Reply With Quote #8

originally from here
http://amxmod.net/amx-getplugin.php?id=17501&t=17501
__________________
Burnzy is offline
Send a message via AIM to Burnzy
SidLuke
Senior Member
Join Date: Mar 2004
Location: Poland, Chrzanow
Old 07-10-2004 , 19:45  
Reply With Quote #9

Quote:
Originally Posted by jtp10181
Code:
inb
should be
Code:
i < nb
Yes
Code:
public restore_grav() 
{ 
    // restore gravity 
    set_cvar_float("sv_gravity", old_grav) 

    // remove godmode for everyone 
    get_players(thePlayers,nb)   
    for(new i=0; i<nb; ++i) 
        if (get_user_godmode(thePlayers[i]))          
            set_user_godmode(thePlayers[i]) 

    is_in_progress = false 
    return PLUGIN_HANDLED 
}
SidLuke is offline
Send a message via AIM to SidLuke Send a message via MSN to SidLuke
Burnzy
Veteran Member
Join Date: Apr 2004
Old 07-10-2004 , 19:52  
Reply With Quote #10

thx man
__________________
Burnzy is offline
Send a message via AIM to Burnzy
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 14:43.


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