PDA

View Full Version : [C++] Fire Control



Homer
17th April 2006, 19:02
Since it released for Uscript and LScript , here its for c++

its usefuller to use with serverfire i guess but i wont release my serverfirefunction here since when u use serverfire wrong in Native it loops ****ing high ( i know cause i did wrong at beginning lol)

so i release with simple fire function




int timerthing;

int Fireit(void)
{
if (timething >= 3) // how lower the number u choose here how faster it repeat shooting the next bullet
{
UFunction* pFire = MPC->FindFunction(FName(TEXT("Fire")),FNAME_Find);
if (pFire != NULL)
{
APawn_execFire_Parms Parms;
Parms.F = 0;
MPC->ProcessEvent(pFire, &Parms, NULL);
}
timething = 0;
}
return timething +=1;
}



credits : poland and killa

.Machine-
17th April 2006, 19:08
nice work homer, looks cool and i had teh same prob with serverfire lol :P

Homer
17th April 2006, 19:10
i used simplebotīs aim before and when i put in serverfire it looped it through all bones i used lol

but i made a new aim now without a bone array so i dont loop the serverfire anymore

KizZamP-
17th April 2006, 19:51
may i ask why your function is called an int lol ?

Homer
17th April 2006, 20:09
otherwise it dont work native god ^^

KizZamP-
17th April 2006, 20:43
EHHHH ?! i mean why you use int FireIt and not void FireIt ...

Homer
17th April 2006, 20:45
Because it wonīt work when i use VOID because of the return value

KizZamP-
17th April 2006, 20:48
LOL ?!
1)are you doing like int fire = FireIt(); ? ,NO,you're doing it like FireIt(); so it doesn't need to return a value.
2)
Because it wonīt work when i use VOID because of the return value
lol ? just remove the "return"...

Killa
17th April 2006, 20:54
I don't really understand why ppl say serverfire lags and then they loop normal fire function.. after all, normal fire function calls serverfire.

No1uKnow
17th April 2006, 20:57
I don't really understand why ppl say serverfire lags and then they loop normal fire function..

if done right it doesnt lag, but when you call it for every freaking player on the battle field it will lag :p

and kizz, you want it to return the time from 0 -.- read the damn snippet

Fragger
18th April 2006, 01:42
rofl. all loops are trashy imo but its up to anyone how they like to hack. thats the base there are no rules in hackin. thats why im here.

why use ints? cuz otherwise it wont work cuz of the return value. rofl.

yeah but on a serious note voids are not all you can use and not the best. its all about the flow. we want it to cruise not jump. and theres many ways to get ot that.

gil
19th April 2006, 17:45
Thanks,
I've added it to the list :)