AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   FakeMeta, DispatchTouch() Help (https://forums.alliedmods.net/showthread.php?t=56485)

Styles 06-14-2007 15:00

FakeMeta, DispatchTouch() Help
 
Hey, I need help with two errors im getting: Now I Know nothing about fake meta. I used GunGames code to stop gun pickups.
Code:
[META] ERROR: Plugin didn't set meta_result: fakemeta_amxx_i386.so:DispatchTouch()

Code:
[META] ERROR: Plugin didn't set meta_result: fakemeta_amxx_i386.so:PlayerPreThink()

Code:
 // touchy touchy STOLEN FROM GUNGAME  public fw_touch(touched,toucher)  {     if(cs_get_user_team(toucher) == CS_TEAM_T)     {         //strip_user_weapons(toucher)         // invalid entities involved or gungame disabled         if(!pev_valid(touched) || !is_user_connected(toucher))             return FMRES_IGNORED             static classname[10]         pev(touched,pev_classname,classname,9)             // not touching a weapon-giver         // checks for weaponbox, weapon_*, armoury_*         if(classname[8] != 'x'         && !(classname[0] == 'w' && classname[1] == 'e' && classname[2] == 'a')         && !(classname[0] == 'a' && classname[1] == 'r' && classname[2] == 'm'))             return FMRES_IGNORED;             // removing starting pistols         if(get_gametime() - spawnTime[toucher] < 0.2)         {             dllfunc(DLLFunc_Think,touched)             return FMRES_SUPERCEDE         }             static model[24]         pev(touched,pev_model,model,23)             // not touching the kind of weaponbox that we like         // checks for models/w_weaponbox.mdl         if(model[17] == 'x') return FMRES_IGNORED             // allow pickup of C4         // checks for models/w_backpack.mdl         if(model[9] == 'b') return FMRES_IGNORED             // weapon is weapon_mp5navy, but model is w_mp5.mdl         // checks for models/w_mp5.mdl         if(model[10] == 'p' && model[11] == '5') model = "mp5navy"             // get the type of weapon based on model         else         {             replace(model,23,"models/w_","")             replace(model,23,".mdl","")         }         // everyone is allowed to use knife         // checks for knife         //if(model[0] == 'k') return FMRES_IGNORED;             // otherwise, this is an item we're not allowed to have         return FMRES_SUPERCEDE     }     return FMRES_IGNORED  }

Code:
// Thanks hawk for Shadow Cloak you rock! public Forward_PlayerPreThink(id) {     if(!is_user_alive(id))         return FMRES_IGNORED             set_hudmessage(0, 255, 0, -1.0, 0.79, 0, 6.0, 2.0, 0.0, 0.0, 1)     if( pev( id, pev_button ) & IN_USE && !( pev( id, pev_oldbuttons ) & IN_USE ) )         biteFunction(id)         if(cs_get_user_team(id) != CS_TEAM_T)         return FMRES_IGNORED                 new Float:Velocity[3]     pev(id,pev_velocity,Velocity)     new Float:Speed = Velocity[0] + Velocity[1] + Velocity[2],Modifier = Speed != 0.0 ? 1 : -1,Float:RenderAmount = float((g_LastRender[id] = clamp(g_LastRender[id] + Modifier,0,255)))     set_pev(id,pev_renderfx,kRenderFxGlowShell)     set_pev(id,pev_rendercolor,Float:{0.0,0.0,0.0})     set_pev(id,pev_rendermode,kRenderTransAlpha)     set_pev(id,pev_renderamt,RenderAmount)     if(RenderAmount <= 0)         show_hudmessage(id, "Stealth: Fully Invisable" )     else         show_hudmessage(id, "Stealth: %i / 255", floatround(RenderAmount) )         return FMRES_IGNORED }

XxAvalanchexX 06-14-2007 15:02

Re: FakeMeta, DispatchTouch() Help
 
Return FMRES_IGNORED instead of FMRES_HANDLED would be my guess.

Styles 06-14-2007 15:10

Re: FakeMeta, DispatchTouch() Help
 
okay ill try that now :)

Edit:
Looks like that fixed the PlayerPreThink error. The Dispatch is still there though.

Rolnaaba 06-14-2007 16:06

Re: FakeMeta, DispatchTouch() Help
 
1 Attachment(s)
[off_topic] sorry but I could resist:

XxAvalanchexX 06-14-2007 16:10

Re: FakeMeta, DispatchTouch() Help
 
Did you change ALL of your FMRES_HANDLED into FMRES_IGNORED, across both functions?

Styles 06-14-2007 16:59

Re: FakeMeta, DispatchTouch() Help
 
yes ill update the top post with what I now have.

pRED* 06-24-2007 17:57

Re: FakeMeta, DispatchTouch() Help
 
Did you ever find a solution to this? I'm having the same problem, except with DispatchThink()

I've hooked FM_think and inside that function all three returns are FMRES_IGNORED..

Code here..


All times are GMT -4. The time now is 10:43.

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