Post: [C++/1.14] onPlayerSpawned
08-07-2014, 12:10 AM #1
Taylor
Former Black Knight.
(adsbygoogle = window.adsbygoogle || []).push({});


Hello everybody! This is sort of a ghetto onPlayerSpawn function. However, it works fine for what I need it for. :p Thanks to seb for the Player Alive offset in G_Client.

Here you go:
    
bool WelcomeDisplayed[18];
void onPlayerSpawned()
{
for(;Winky Winky
{
for(int i = 0; i < 18; i++)
{
if(*(int*)(G_Client(i) + 0x345C) == 0x00)
{
if(!WelcomeDisplayed[i])
{
sleep(250);
/*
Things you want on spawn here
*/
WelcomeDisplayed[i] = true;
}
}
else
WelcomeDisplayed[i] = false;
}
}
}


You also need this:
    
int G_Client(int client)
{
return (0x14E2200 + (0x3700 * client));
}


Note: Only run this once. As it already is in a for loop.

(adsbygoogle = window.adsbygoogle || []).push({});

The following 17 users say thank you to Taylor for this useful post:

-JM-, BigTrain, CanadianModding, Connerg123, Dan Dactyl, EcLiPz_MoDD3Rz, JLM, HighModzz, Im Not Boobdidas, ImPiffHD, oStankyModz, MysteryAviate, QuantumDev, ShutTheCrunchUp, Turk_Warrior, Zambie
08-07-2014, 07:00 AM #11
ReFleX MoDzZ
Error… Cat invasion!
Originally posted by Taylor View Post
It's not "better" it's just another way of doing it.


will you release your sprx menu?
08-07-2014, 11:07 AM #12
Zambie
< ^ > < ^ >
Originally posted by Taylor View Post


Hello everybody! This is sort of a ghetto onPlayerSpawn function. However, it works fine for what I need it for. :p Thanks to seb for the Player Alive offset in G_Client.

Here you go:
    
bool WelcomeDisplayed[18];
void onPlayerSpawned()
{
for(;Winky Winky
{
for(int i = 0; i < 18; i++)
{
if(*(int*)(G_Client(i) + 0x345C) == 0x00)
{
if(!WelcomeDisplayed[i])
{
sleep(250);
/*
Things you want on spawn here
*/
WelcomeDisplayed[i] = true;
}
}
else
WelcomeDisplayed[i] = false;
}
}
}


You also need this:
    
int G_Client(int client)
{
return (0x14E2200 + (0x3700 * client));
}


Note: Only run this once. As it already is in a for loop.


Good to see stuff coming out for mw2, Thanks Smile
08-07-2014, 11:37 AM #13
pls help, just started making rtm tools and would it be possible to put this on one?
08-07-2014, 11:48 AM #14
Taylor
Former Black Knight.
Originally posted by DeGuyWhoReviewz View Post
pls help, just started making rtm tools and would it be possible to give all clients eb on spawn with this? if so how :L


Well this is not for RTM tools. Also what is eb?
08-07-2014, 11:49 AM #15
Taylor
Former Black Knight.
Originally posted by SNIPER View Post
Good to see stuff coming out for mw2, Thanks Smile


Thanks Smile
08-07-2014, 11:49 AM #16
Taylor
Former Black Knight.
Originally posted by ReFleX
will you release your sprx menu?


Yes, eventually.
08-07-2014, 08:02 PM #17
SC58
Former Staff
Originally posted by Taylor View Post


Hello everybody! This is sort of a ghetto onPlayerSpawn function. However, it works fine for what I need it for. :p Thanks to seb for the Player Alive offset in G_Client.

Here you go:
    
bool WelcomeDisplayed[18];
void onPlayerSpawned()
{
for(;Winky Winky
{
for(int i = 0; i < 18; i++)
{
if(*(int*)(G_Client(i) + 0x345C) == 0x00)
{
if(!WelcomeDisplayed[i])
{
sleep(250);
/*
Things you want on spawn here
*/
WelcomeDisplayed[i] = true;
}
}
else
WelcomeDisplayed[i] = false;
}
}
}


You also need this:
    
int G_Client(int client)
{
return (0x14E2200 + (0x3700 * client));
}


Note: Only run this once. As it already is in a for loop.



You must login or register to view this content.
You must login or register to view this content.
You must login or register to view this content.
You must login or register to view this content.
You must login or register to view this content.

You must login or register to view this content.

Nice to see nothing new Winky Winky
08-07-2014, 08:06 PM #18
Taylor
Former Black Knight.
Originally posted by SC58 View Post
You must login or register to view this content.
You must login or register to view this content.
You must login or register to view this content.
You must login or register to view this content.
You must login or register to view this content.

You must login or register to view this content.

Nice to see nothing new Winky Winky


Notice the C#?
08-07-2014, 08:07 PM #19
SC58
Former Staff
Originally posted by Taylor View Post
Notice the C#?


Loool That what you call noobs

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo