Osiris icon indicating copy to clipboard operation
Osiris copied to clipboard

Grenade Damage -98(Help)

Open Evilhelder opened this issue 6 years ago • 3 comments

I took this code from another hack, and tried to "translate" it to osiris, but I don't know which variable to use to replace those that are giving error, image below:

image

Evilhelder avatar Feb 06 '20 23:02 Evilhelder

" Thread" this is not defined

Evilhelder avatar Feb 06 '20 23:02 Evilhelder

"LocalPlayer" Must be a class

Evilhelder avatar Feb 06 '20 23:02 Evilhelder

stop pasting

#import <time.h> then replace Thread.sleep() with Sleep() sleep only accepts ints I think so you might need to use usleep

next time just read how other code works and you will see how to get localPlayer localPlayer = interfaces.entityList->getEntity(interfaces.engine->getLocalPlayer());

ClientCMD.exec() is completely wrong. cmd is for internal things like view angles or side move, not executing commands. either you could use engine's clientCmdUnrestricted which is not recommended or you could use cmds buttons: cmd.buttons |= IN_ATTACK (LMB IN) cmd.buttons &= IN_ATTACK (RMB OUT) cmd.buttons &= IN_ATTACK (LMB OUT)

you don't overwrite the viewangles inside localPlayer, you would inside cmd.

please make an effort to understand osiris before you try pasting imcompatible code.

also its not "translating" over to Osiris, osiris's "sdk" is just another implementation of valve's source engine. translating code only makes sense when you are going from 1 language to another, otherwise you mean porting.

ghost avatar Feb 07 '20 20:02 ghost