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

error 100: when using TR_TraceRayFilterEx


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ZASTRELIS
Veteran Member
Join Date: Nov 2010
Location: Siberia, Irkutsk
Old 07-23-2018 , 23:28   error 100: when using TR_TraceRayFilterEx
Reply With Quote #1

easyvip/core/hooks.sp(409) : error 100: function prototypes do not match

Code:
{     ...     float startpos[3];     GetClientEyePosition( victim, startpos );         float angles[3];     GetClientEyeAngles( victim, angles );         Handle trace = TR_TraceRayFilterEx(startpos, angles, MASK_SHOT, RayType_Infinite, HitTrigger, client, &dmg, hp); // string 409, error 100         if(!TR_DidHit(trace))     {         delete trace;     }     .... } public bool HitTrigger( int victim, int contentsMask, float &dmg, int hp ) {     if(!IsValidEntity(victim))         return false;         int client = victim;         char classname[64];     GetEntityClassname( entity, classname, sizeof( classname ) );        if( StrContains( classname, "player" ) != -1 )     {         if(!IsValidPlayer(entity))             return false;                 dmg = view_as<float>(hp) + 1.0;                 // native void TR_ClipRayToEntity(int flags, int entity, Handle tr=INVALID_HANDLE);         TR_ClipRayToEntity( MASK_ALL, entity );                 float pos[3];         TR_GetEndPosition( pos );                 PrintToServer( "Hit a trigger! Collided at (%.2f, %.2f, %.2f)", pos[0], pos[1], pos[2] );         return false;     }         return true; }

Need help in solve of this problem, or helping with detection anything between two players. Thx.

Last edited by ZASTRELIS; 07-24-2018 at 00:13.
ZASTRELIS is offline
8guawong
AlliedModders Donor
Join Date: Dec 2013
Location: BlackMarke7
Old 07-24-2018 , 01:05   Re: error 100: when using TR_TraceRayFilterEx
Reply With Quote #2

https://sm.alliedmods.net/new-api/sd...ceEntityFilter

so would be

PHP Code:
public bool HitTriggerint victimint contentsMask
or if you want to pass data

PHP Code:
public bool HitTrigger(int victimint contentsMaskany data
__________________

Last edited by 8guawong; 07-24-2018 at 01:07.
8guawong is offline
ZASTRELIS
Veteran Member
Join Date: Nov 2010
Location: Siberia, Irkutsk
Old 07-24-2018 , 01:06   Re: error 100: when using TR_TraceRayFilterEx
Reply With Quote #3

and?, what can I do with this, I know about these func

Last edited by ZASTRELIS; 07-24-2018 at 01:06.
ZASTRELIS is offline
8guawong
AlliedModders Donor
Join Date: Dec 2013
Location: BlackMarke7
Old 07-24-2018 , 01:07   Re: error 100: when using TR_TraceRayFilterEx
Reply With Quote #4

Quote:
Originally Posted by ZASTRELIS View Post
and?, what can I do with this, I know about these func
so you can compile your plugin?
__________________
8guawong is offline
ZASTRELIS
Veteran Member
Join Date: Nov 2010
Location: Siberia, Irkutsk
Old 07-24-2018 , 01:20   Re: error 100: when using TR_TraceRayFilterEx
Reply With Quote #5

Quote:
Originally Posted by 8guawong View Post
so you can compile your plugin?
not understand fully how works any data, because I need to recieve dmg param in this funct.
ZASTRELIS is offline
ZASTRELIS
Veteran Member
Join Date: Nov 2010
Location: Siberia, Irkutsk
Old 07-24-2018 , 01:40   Re: error 100: when using TR_TraceRayFilterEx
Reply With Quote #6

I understand, It will transmit only one param of any and it can't work with pointers.
It's sm fail... Is we've another method?
ZASTRELIS is offline
ZASTRELIS
Veteran Member
Join Date: Nov 2010
Location: Siberia, Irkutsk
Old 07-24-2018 , 01:59   Re: error 100: when using TR_TraceRayFilterEx
Reply With Quote #7

Quote:
Originally Posted by 8guawong View Post
so you can compile your plugin?
yes, thx a lot. fixed
ZASTRELIS is offline
LenHard
Senior Member
Join Date: Jan 2016
Old 07-24-2018 , 03:17   Re: error 100: when using TR_TraceRayFilterEx
Reply With Quote #8

Use a DataPack to pass multiple amount of data. In your case, you can pass the client index (client's userid is safer), damage, and health values through one datapack. Reset and read the values on the callback.
__________________

Last edited by LenHard; 07-24-2018 at 03:18.
LenHard 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 11:20.


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