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, 08:08 PM #20
Taylor
Former Black Knight.
Originally posted by SC58 View Post
Loool That what you call noobs


Yeah, some people are just incapable of a simple function being changed. I figured why not do it for them.
08-07-2014, 08:10 PM #21
SC58
Former Staff
Originally posted by Taylor View Post
Yeah, some people are just incapable of a simple function being changed. I figured why not do it for them.


Well if they can't port this simple code them self then they don't even know how to code in the first place lol

Pretty sad tbh
08-07-2014, 08:21 PM #22
Taylor
Former Black Knight.
Originally posted by SC58 View Post
Well if they can't port this simple code them self then they don't even know how to code in the first place lol

Pretty sad tbh


That is agreeable aha. Like literally, C++ for dummies right You must login or register to view this content.
08-07-2014, 08:25 PM #23
SC58
Former Staff
Originally posted by Taylor View Post
That is agreeable aha. Like literally, C++ for dummies right You must login or register to view this content.


yeah LOOOL :p I wasn't trying to be a dick as most will think i just was prob LOOOL
08-07-2014, 10:49 PM #24
ReFleX MoDzZ
Error… Cat invasion!
Originally posted by Taylor View Post
Yes, eventually.


its for mw2 right? Snail would be cool to see a good sprx menu Happy
08-11-2014, 09:03 PM #25
Esker
Samurai Poster
why 2 admins groan? lawl
08-12-2014, 03:11 AM #26
Taylor
Former Black Knight.
Originally posted by Lavecy View Post
why 2 admins groan? lawl


They are messing with me. :p
08-21-2014, 12:14 AM #27
Azus
Little One
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.



Still waiting for you to make an SPRX menu for MW2 Enzo
09-25-2014, 10:04 PM #28
Taylor Why So Sexy Bae?

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo