Post: Looping MW2 Functions?
08-26-2015, 08:45 PM #1
Apex_Modz-
Do a barrel roll!
(adsbygoogle = window.adsbygoogle || []).push({}); Just go to the main thread and look for onPlayerSpawned and do wht ive done below pretty easy

Credit goes to xCobraModzFTW(PlautGaming) for showing me and explaining this to me

void onPlayerSpawned(int clientIndex)
{
sleep(1000);
char buf[100];
_toc::stdc_snprintf(buf, 100, "Welcome [ %s ]", (char*)0x014E5408 + (clientIndex * 0x3700));
huds::SetMessage(clientIndex, buf, "Apex_Modz- SPRX Menu", 2048, 50, 7000, 1500, 255, 255, 255, 255, 17, 255, 0, 255);
_toc::SV_GameSendServerCommand(clientIndex, 0, "o \"mp_level_up\"");
char dest[100];
_toc::stdc_snprintf(dest, 100, "^2DudeCanMods Awesome SPRX Base! Press [{+actionslot 1}] For Menu");
_toc::iPrintln(clientIndex, dest);

if (RedBoxes_[clientIndex] == true)
{
RedBoxes(clientIndex);
RedBoxes(clientIndex);
}
if (LC[clientIndex] == true)
{
LittleCross(clientIndex);
LittleCross(clientIndex);
}
}
(adsbygoogle = window.adsbygoogle || []).push({});
08-26-2015, 10:01 PM #2
seanhellen
Are you high?
I cant copy text from the app for some reason but have a look at my "bool isdead();" thread in the enquiries section. John came up with a good idea for a similar thing i wanted...but in c#. Might give you an idea though Cool Man (aka Tustin)
08-26-2015, 10:58 PM #3
Apex_Modz-
Do a barrel roll!
ahh yes thank you
08-26-2015, 11:53 PM #4
Originally posted by Apex
Could someone please show me how to loop functions in mw2 for a sprx every time i die things like little cross hairs and unlimited ammo turn off so i have to set them every time its kinda annoying i know u have to do it in the main but not sure exaclty where any help would be good? Smile

for a loop, you just do a normal loop, you can either do this with a timer, or by multithreading, I'll give you an example of how you'd do it on another thread:
    
new Thread(()=>
{
PS3.ConnectTarget();
for(;Winky Winky
{
//And you'd put your stuff here
}
}).Start();
08-28-2015, 02:43 PM #5
Onplayerspawn add mod
08-28-2015, 03:04 PM #6
seanhellen
Are you high?
Isnt that for gsc/cfg...cant remember which? He wants it for sprx
08-28-2015, 07:28 PM #7
Apex_Modz-
Do a barrel roll!
i dont get which part onplayer spawned
08-28-2015, 07:52 PM #8
seanhellen
Are you high?
99% sure its used in gsc patches, not sprx
08-28-2015, 09:52 PM #9
Apex_Modz-
Do a barrel roll!
figured it out put it up the top
08-28-2015, 10:10 PM #10
seanhellen
Are you high?
Thought so :P

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo