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({});
10-12-2016, 10:14 PM #11
S63
Space Ninja
Originally posted by Apex
figured it out put it up the top


Why not just use hooks and then you can use strings such as "player_spawned" and it will run per frame so it is always running
10-12-2016, 10:16 PM #12
S63
Space Ninja
Originally posted by seanhellen View Post
99% sure its used in gsc patches, not sprx


Well thats where your wrong Happy in sprx you can use hooks for example vm_notify you can use things such as "player_spawned", "weapon_fired" etc and it runs per frame so it is constantly running and you can use gsc functions like playercmd_giveweapon, gsc_hide etc

The following user thanked S63 for this useful post:

seanhellen
10-12-2016, 10:21 PM #13
seanhellen
Are you high?
Ahhh. Live n learn Happy
10-12-2016, 11:09 PM #14
S63
Space Ninja
Originally posted by seanhellen View Post
Ahhh. Live n learn Happy


No problem, ever need help getting answers hit me Smile, also i see a comment about your bool isdead another way you could do this is by creating a hook and using "death" this will detect if you died so for example if you create a bool like...

struct MenuSettings {
bool IsDead;
}MenuSets[18];

You could add in the bit where "player_spawned" is notifyed

MenuSets[clientIndex].IsDead = false;

Then where your "death" is notifyed add

MenuSets[clientIndex].IsDead = true;
10-13-2016, 08:53 AM #15
seanhellen
Are you high?
Originally posted by S63 View Post
No problem, ever need help getting answers hit me Smile, also i see a comment about your bool isdead another way you could do this is by creating a hook and using "death" this will detect if your dead or alive so for example if you create a bool like...

struct MenuSettings {
bool IsDead;
}MenuSets[18];

You could add in the bit where "player_spawned" is notifyed

bool MenuSets[clientIndex].IsDead = false;

Then where your "death" is notifyed add

bool MenuSets[clientIndex].IsDead = true;


Clever stuff Happy thanks

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo