Raised This Month: $51 Target: $400
 12% 

Functions


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Fean0r
Member
Join Date: Mar 2004
Location: Belfast, UK
Old 04-25-2004 , 08:37   Functions
Reply With Quote #1

grab.sma(14 : error 017: undefined symbol "set_user_gravity"
grab.sma(149) : error 017: undefined symbol "set_user_rendering"
grab.sma(186) : error 017: undefined symbol "set_user_gravity"
grab.sma(187) : error 017: undefined symbol "set_user_rendering"

Sorry if this has been covered before but has the above been renamed?

Thanks.
Fean0r is offline
xeroblood
BANNED
Join Date: Mar 2004
Location: Toronto, Canada
Old 04-25-2004 , 10:00  
Reply With Quote #2

Both functions can be found in fun.inc and neither have been renamed, you just need to include fun.inc...

from fun.inc:
Code:
/* Sets player rendering mode. */ native set_user_rendering(index, fx = kRenderFxNone, r = 255, g = 255, b = 255, render = kRenderNormal, amount = 16); /* Sets users gravity. */ native set_user_gravity(index, Float:gravity = 1.0);
xeroblood is offline
Send a message via MSN to xeroblood
QwertyAccess
Veteran Member
Join Date: Feb 2004
Location: Enjiru Layer
Old 04-25-2004 , 11:48  
Reply With Quote #3

in other words the fun module
__________________
QwertyAccess is offline
Fean0r
Member
Join Date: Mar 2004
Location: Belfast, UK
Old 04-25-2004 , 12:33  
Reply With Quote #4

Thanks for the help I'm now only getting 1 error..

Code:
grab.sma(94) : error 017: undefined symbol "set_user_velocity"
Code:
/* AMX Mod script. * *  Jedi Force Grab *  by SpaceDude *  email: <a href="mailto:[email protected]">[email protected]</a> *  MSN: <a href="mailto:[email protected]">[email protected]</a> *  ICQ: 1615758 *  IRC: Quakenet, nickname: "SpaceDude" * *  Description: * *  Another plugin for those admins who like to abuse their players and have a little fun. *  With this plugin you can literally pick players up, drag them around in the air and then *  depending on your mood either slam them into the ground or let them go free. * *  In order to use this plugin you will need the xtrafun module which can be found here: * *  <a href="http://amxmod.net/forums/viewtopic.php?t=10714" target="_blank" rel="nofollow noopener">http://amxmod.net/forums/viewtopic.php?t=10714</a> * *  Server Side Cvars: * *    sv_grabforce - sets the amount of force used when grabbing players, default is 8 * *  Client Side Commands: * *    +grab - bind a key to +grab like this: bind <key> +grab, once you have done that *            hold the key down and look at someone. Once you see their ID pop-up on *            the screen you will be able to drag them around, just look in the direction *            you want them to go and they will be dragged there. requires level ADMIN_SLAY. * *    grab_toggle - works in the same way as +grab except it is a toggle press once to grab *                  press a second time to release. * * *  Revision History: * * *   v1.1 - Added a red glow *        - Added a grab_toggle as an alternative to +grab *        - Added notify messages *        - Made it possible to grab people while dead (works best in Free View mode) * *   v1.0 - Initial Release */ #include <amxmodx> #include <fun> new grabbed[33] new grablength[33] new bool:grabmodeon[33] new velocity_multiplier public grabtask(parm[]) {    new id = parm[0]    new targetid, body    if (!grabbed[id])    {       get_user_aiming(id, targetid, body)       if (targetid)       {          set_grabbed(id, targetid)       }    }    if (grabbed[id])    {       new origin[3], look[3], direction[3], moveto[3], grabbedorigin[3], velocity[3], length       if (!is_user_alive(grabbed[id]))       {          release(id)          return       }       get_user_origin(id, origin, 1)       get_user_origin(id, look, 3)       get_user_origin(grabbed[id], grabbedorigin)       direction[0]=look[0]-origin[0]       direction[1]=look[1]-origin[1]       direction[2]=look[2]-origin[2]       length = get_distance(look,origin)       if (!length) length=1            // avoid division by 0       moveto[0]=origin[0]+direction[0]*grablength[id]/length       moveto[1]=origin[1]+direction[1]*grablength[id]/length       moveto[2]=origin[2]+direction[2]*grablength[id]/length       velocity[0]=(moveto[0]-grabbedorigin[0])*velocity_multiplier       velocity[1]=(moveto[1]-grabbedorigin[1])*velocity_multiplier       velocity[2]=(moveto[2]-grabbedorigin[2])*velocity_multiplier       set_user_velocity(grabbed[id], velocity)    } } public grab_toggle(id) {    if (grabmodeon[id])       release(id)    else       grab(id)    return PLUGIN_HANDLED } public grab(id) {    if (!(get_user_flags(id)&ADMIN_SLAY))    {       client_print(id,print_notify,"[AMX] You have no access to that command")       return PLUGIN_HANDLED    }    if (!grabmodeon[id])    {       new targetid, body       new parm[1]       parm[0] = id       velocity_multiplier = get_cvar_num("sv_grabforce")       grabmodeon[id]=true       set_task(0.1, "grabtask", 100+id, parm, 1, "b")       get_user_aiming(id, targetid, body)       if (targetid)       {          set_grabbed(id, targetid)       }       else       {          client_print(id,print_notify,"[AMX] Searching for a target")       }    }    return PLUGIN_HANDLED } public release(id) {    if (!(get_user_flags(id)&ADMIN_SLAY))    {       client_print(id,print_notify,"[AMX] You have no access to that command")       return PLUGIN_HANDLED    }    if (grabmodeon[id])    {       grabmodeon[id]=false       if (grabbed[id])       {          new targname[32]          set_user_gravity(grabbed[id])          set_user_rendering(grabbed[id])          get_user_name(grabbed[id],targname,31)          client_print(id,print_notify,"[AMX] You have released %s", targname)       }       else       {          client_print(id,print_notify,"[AMX] No target found")       }       grabbed[id]=0       remove_task(100+id)    }    return PLUGIN_HANDLED } public spec_event(id) {    new targetid = read_data(2)    if (targetid < 1 || targetid > 32)       return PLUGIN_CONTINUE    if (grabmodeon[id] && !grabbed[id])    {       set_grabbed(id, targetid)    }    return PLUGIN_CONTINUE } public set_grabbed(id, targetid) { if ((!(get_user_flags(targetid)&ADMIN_IMMUNITY)) && (get_cvar_num("sv_grabimmune")))   {    new origin1[3], origin2[3], targname[32]    get_user_origin(id, origin1)    get_user_origin(targetid, origin2)    grabbed[id]=targetid    grablength[id]=get_distance(origin1,origin2)    set_user_gravity(targetid,0.001)    set_user_rendering(targetid,kRenderFxGlowShell,50,0,0, kRenderNormal, 16)    get_user_name(targetid,targname,31)    client_print(id,print_notify,"[AMX] You have grabbed onto %s", targname)   } else   {       client_print(id,print_notify,"[AMX] That action can't be performed on someone with immunity")   } } public plugin_init() {    register_plugin("Jedi Force Grab","1.1","SpaceDude")    register_cvar("sv_grabforce","8") /* * added line for cvar reg */    register_cvar("sv_grabimmune","1")    register_clcmd("grab_toggle","grab_toggle",ADMIN_SLAY,"press once to grab and again to release")    register_clcmd("+grab","grab",ADMIN_SLAY,"bind a key to +grab")    register_clcmd("-grab","release",ADMIN_SLAY)    register_event("StatusValue","spec_event","be","1=2") }

I'm converting spacedudes Jedi Force Grab over to amxX
Fean0r is offline
Hangman5386
Member
Join Date: Mar 2004
Old 04-25-2004 , 13:24  
Reply With Quote #5

I had the same problem, too. I needed to "borrow" this from xtrafun.inc.
However, BAILOPAN wrote he would add it to engine_stocks.inc here. In this thread, there's the solution for the problem, too.
Hangman5386 is offline
Fean0r
Member
Join Date: Mar 2004
Location: Belfast, UK
Old 04-25-2004 , 13:33  
Reply With Quote #6

I got it sorted lol

Before:
Code:
#include <amxmodx> #include <fun>

After:
Code:
#include <amxmodx> #include <fun> #include <xtrafun>
__________________
Fean0r
Fean0r is offline
Fean0r
Member
Join Date: Mar 2004
Location: Belfast, UK
Old 04-25-2004 , 13:33  
Reply With Quote #7

http://forums.alliedmods.net/showthread.php?t=1382
__________________
Fean0r
Fean0r is offline
Hangman5386
Member
Join Date: Mar 2004
Old 04-25-2004 , 13:44  
Reply With Quote #8

I suppose this won't get approved because of the use of xtrafun.inc. This suggests that you're using XtraFun module which is not included in this form in amxx.
Quote:
You must not use Vexd or XtraFun modules - use the AMX Mod X modules C-S/Engine/Fun instead.
(from here)
Hangman5386 is offline
PM
hello, i am pm
Join Date: Jan 2004
Location: Canalization
Old 04-25-2004 , 13:48  
Reply With Quote #9

haha you are right Hangman; i forgot about that
__________________
hello, i am pm
PM is offline
Hangman5386
Member
Join Date: Mar 2004
Old 04-25-2004 , 13:53  
Reply With Quote #10

PM = BAILOPAN
That's news to me. ;)
Hangman5386 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 08:25.


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