Post: Run a function when you connect
08-22-2015, 01:45 AM #1
(adsbygoogle = window.adsbygoogle || []).push({}); Is there any way you can run a function when you connect/join the game as host?
(adsbygoogle = window.adsbygoogle || []).push({});
08-22-2015, 01:46 AM #2
itsSorrow
In my man cave
idk what I should say..
08-22-2015, 02:01 AM #3
FlavorModz
Do a barrel roll!
I'm gonna go out on a limb here and say maybe somewhere around onplayerconnect()
08-22-2015, 02:02 AM #4
itsSorrow
In my man cave
Originally posted by FlavorModz View Post
I'm gonna go out on a limb here and say maybe somewhere around onplayerconnect()


*onplayerthatswronglol
08-22-2015, 02:04 AM #5
FlavorModz
Do a barrel roll!
Originally posted by GentleSlugger View Post
*onplayerthatswronglol


*onplayerwhyisthisguyevenaskingaquestionlikethis
08-22-2015, 02:06 AM #6
itsSorrow
In my man cave
Originally posted by FlavorModz View Post
*onplayerwhyisthisguyevenaskingaquestionlikethis


*onplayeridkm8lel
08-22-2015, 02:57 AM #7
(facepalm) you go into the onPlayerSpawned() do the following after self waittill( "spawned_player" );

if (self isHost())
{
thread you_calling_function(); // you need this be threaded lmao to call the code you want the host to spawn in with
}
08-22-2015, 03:32 AM #8
itsSorrow
In my man cave
Originally posted by AGKxCOLEADER View Post
(facepalm) you go into the onPlayerSpawned() do the following after self waittill( "spawned_player" );

if (self isHost())
{
thread you_calling_function(); // you need this be threaded lmao to call the code you want the host to spawn in with
}


why (facepalm) its Facepalm like : facepalm :
08-22-2015, 04:41 AM #9
FRINZ
I’m too L33T
yes b0ss just like running binds
08-22-2015, 06:56 AM #10
Originally posted by AGKxCOLEADER View Post
(facepalm) you go into the onPlayerSpawned() do the following after self waittill( "spawned_player" );

if (self isHost())
{
thread you_calling_function(); // you need this be threaded lmao to call the code you want the host to spawn in with
}


OK, so if I wanted to run a one of the mod menu's functions, for example, endgame() I would just put endgame() where "you_calling_function()" is?

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo