You are viewing our Forum Archives. To view or take place in current topics click here.
#11. Posted:
Status: Offline
Joined: Sep 11, 201410Year Member
Posts: 268
Reputation Power: 14
Status: Offline
Joined: Sep 11, 201410Year Member
Posts: 268
Reputation Power: 14
XeSao wroteActually this is GetPlayerAnglesOrbs wroteAnimeHypedUp wroteOrbs wroteWhy aren't you using G_EffectIndex for the effects rather than using all those if statements?AnimeHypedUp wrote Lol this is a really bad way of doing it just saying.
it might be a bad way of doing it but its still a way / only way that is released that i could find/
i didn't think about using it :/ its on the post now though
You should use G_EffectIndex as it is much easier then finding the id's for all of the effects.
I actually wrote a ShootFx function yesterday.
It's pretty short
If you want you can use it.
void shootEffect(int client, char *effect)
{
playFX(effect, GetCursorPosition(client));
}
then for GetCursorPosition:
float *GetCursorPosition(int client)
{
BulletTraceType Type;
bulletTrace(&Type, getTagOrigin(client, "tag_eye"), vector_scale(anglesToForward(getPlayerAngles(client)), 1000000), client, 0);
return Type.position;
}
Im using my own bulletTrace but you can use yours as both should work
if you dont have vector_scale:
float *vector_scale(float *vec, float scale)
{
float out[3];
for(int i = 0;i < 3;i++)
out[i] = (vec[i] * scale);
return out;
}
and anglesToForward
void (*AngleVectors)(const float *angles, float *forward, float *right, float *up) =
(void(*)(const float *, float *, float *, float *))0x8228EDC0;
float *anglesToForward(float *angles)
{
float forward[3];
AngleVectors(angles, forward, 0, 0);
return forward;
}
and if you dont have getPlayerAngles:
float *getPlayerAngles(int client)
{
return (float *)(playerState(client) + 0x10C);
}
Everything worked when i tested it yesterday
So have fun with it
float* GetPlayerAngles(){
return (float*)(Entity() + 0x48);
}
- 2useful
- 0not useful
#12. Posted:
Status: Offline
Joined: Aug 13, 201410Year Member
Posts: 8
Reputation Power: 0
AnimeHypedUp wroteActually this is GetPlayerAnglesXeSao wroteOrbs wroteAnimeHypedUp wroteOrbs wroteWhy aren't you using G_EffectIndex for the effects rather than using all those if statements?AnimeHypedUp wrote Lol this is a really bad way of doing it just saying.
it might be a bad way of doing it but its still a way / only way that is released that i could find/
i didn't think about using it :/ its on the post now though
You should use G_EffectIndex as it is much easier then finding the id's for all of the effects.
I actually wrote a ShootFx function yesterday.
It's pretty short
If you want you can use it.
void shootEffect(int client, char *effect)
{
playFX(effect, GetCursorPosition(client));
}
then for GetCursorPosition:
float *GetCursorPosition(int client)
{
BulletTraceType Type;
bulletTrace(&Type, getTagOrigin(client, "tag_eye"), vector_scale(anglesToForward(getPlayerAngles(client)), 1000000), client, 0);
return Type.position;
}
Im using my own bulletTrace but you can use yours as both should work
if you dont have vector_scale:
float *vector_scale(float *vec, float scale)
{
float out[3];
for(int i = 0;i < 3;i++)
out[i] = (vec[i] * scale);
return out;
}
and anglesToForward
void (*AngleVectors)(const float *angles, float *forward, float *right, float *up) =
(void(*)(const float *, float *, float *, float *))0x8228EDC0;
float *anglesToForward(float *angles)
{
float forward[3];
AngleVectors(angles, forward, 0, 0);
return forward;
}
and if you dont have getPlayerAngles:
float *getPlayerAngles(int client)
{
return (float *)(playerState(client) + 0x10C);
}
Everything worked when i tested it yesterday
So have fun with it
EDIT: You should release your bullettrace because this isn't working with james's
float* GetPlayerAngles(){
return (float*)(Entity() + 0x48);
}
gEnt + 0x48 are the angles you can set and read from.
I'm using ps + 0x10C because it's used in PlayerCmd_getPlayerAngles.
It's up to you which one you want to use.
I'm just using getPlayerAngles because they used it at Tu6
P.S.: I'm adding bulletTrace later - ( 0x821D6018 - Offset for PlayerCmd_getPlayerAngles if you want to look into that )
Edit: paste bin. com/eSxdnP0F - That's my bulletTrace
Last edited by XeSao ; edited 4 times in total
- 1useful
- 0not useful
#13. Posted:
Status: Offline
Joined: Sep 11, 201410Year Member
Posts: 268
Reputation Power: 14
Status: Offline
Joined: Sep 11, 201410Year Member
Posts: 268
Reputation Power: 14
XeSao wroteAhh I see what you mean now that I look at the function. Cheers. Looking forward for that bullettrace ;)AnimeHypedUp wroteActually this is GetPlayerAnglesXeSao wroteOrbs wroteAnimeHypedUp wroteOrbs wroteWhy aren't you using G_EffectIndex for the effects rather than using all those if statements?AnimeHypedUp wrote Lol this is a really bad way of doing it just saying.
it might be a bad way of doing it but its still a way / only way that is released that i could find/
i didn't think about using it :/ its on the post now though
You should use G_EffectIndex as it is much easier then finding the id's for all of the effects.
I actually wrote a ShootFx function yesterday.
It's pretty short
If you want you can use it.
void shootEffect(int client, char *effect)
{
playFX(effect, GetCursorPosition(client));
}
then for GetCursorPosition:
float *GetCursorPosition(int client)
{
BulletTraceType Type;
bulletTrace(&Type, getTagOrigin(client, "tag_eye"), vector_scale(anglesToForward(getPlayerAngles(client)), 1000000), client, 0);
return Type.position;
}
Im using my own bulletTrace but you can use yours as both should work
if you dont have vector_scale:
float *vector_scale(float *vec, float scale)
{
float out[3];
for(int i = 0;i < 3;i++)
out[i] = (vec[i] * scale);
return out;
}
and anglesToForward
void (*AngleVectors)(const float *angles, float *forward, float *right, float *up) =
(void(*)(const float *, float *, float *, float *))0x8228EDC0;
float *anglesToForward(float *angles)
{
float forward[3];
AngleVectors(angles, forward, 0, 0);
return forward;
}
and if you dont have getPlayerAngles:
float *getPlayerAngles(int client)
{
return (float *)(playerState(client) + 0x10C);
}
Everything worked when i tested it yesterday
So have fun with it
EDIT: You should release your bullettrace because this isn't working with james's
float* GetPlayerAngles(){
return (float*)(Entity() + 0x48);
}
gEnt + 0x48 are the angles you can set and read from.
I'm using ps + 0x10C because it's used in PlayerCmd_getPlayerAngles.
It's up to you which one you want to use.
I'm just using getPlayerAngles because they used it at Tu6
P.S.: I'm adding bulletTrace later - ( 0x821D6018 - Offset for PlayerCmd_getPlayerAngles if you want to look into that )
- 0useful
- 0not useful
#14. Posted:
Status: Offline
Joined: Dec 10, 20149Year Member
Posts: 58
Reputation Power: 2
Looks good I'll have to try it out
- 0useful
- 0not useful
You are viewing our Forum Archives. To view or take place in current topics click here.