On Player Spawn will not work

broken avatar :(
Created 1163 days ago
by ToXxiCxMoDz
0 Members and 1 Guest are viewing this topic.
2,446 views
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 26 December 2014
Last active: 46 days ago
Posts
16
Respect
Forum Rank
Legless Crawler
Primary Group
Member
×
ToXxiCxMoDz's Groups
ToXxiCxMoDz's Contact & Social Links
I saw a tutorial on Forums user MakeCent's website on how to do something when the player connects and/or spawns, which can be found here:
[You are not allowed to view external links. Register or Login to see them]

I can't get it to work. I tried using IPrintLnBold and giving a weapon, but neither worked.

This is the code I used.
function init(){
callback::on_connect( &on_player_connect );
callback::on_spawned( &on_player_spawned );
}
function on_player_connect(){
        //do stuff each time a player connects
}
function on_player_spawned(){
iPrintLnBold("hi");
}
I tried putting the code above and below the main function, neither worked. Help is greatly appreciated!
Marked as best answer by ToXxiCxMoDz on Today at 01:02:09 am
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 262 days ago
Posts
1,895
Respect
Forum Rank
Zombie Destroyer
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
BE ORIGINAL
Signature
×
MakeCents's Groups
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
Show your whole script, not just this part. Also, I am not sure you will see this in zm as the screen may be black, try adding these lines.

#using scripts\shared\flag_shared;//add to the top of the gsc you are using the line below in


level flag::wait_till( "initial_blackscreen_passed" );//add before print


did you call or thread the init function at all from main?
Last Edit: October 04, 2016, 05:06:34 pm by MakeCents
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 26 December 2014
Last active: 46 days ago
Posts
16
Respect
Forum Rank
Legless Crawler
Primary Group
Member
×
ToXxiCxMoDz's Groups
ToXxiCxMoDz's Contact & Social Links
That worked, thank you so much!
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 26 December 2014
Last active: 46 days ago
Posts
16
Respect
Forum Rank
Legless Crawler
Primary Group
Member
×
ToXxiCxMoDz's Groups
ToXxiCxMoDz's Contact & Social Links
Also if you don't mind me asking, where do you get all of the level flags from? (intial_blackscreen_passed, etc.)
broken avatar :(
×
broken avatar :(
[UGX] Documentation Writer & Programmer
Location: usLos Angeles, CA
Date Registered: 23 August 2013
Last active: 76 days ago
Posts
1,322
Respect
Forum Rank
Zombie Colossus
Primary Group
UGX Team Member
My Groups
More
My Contact & Social Links
More
Personal Quote
(ง º ω º )ง u wont sum m8y?
Signature
Do not take life too seriously. You will never get out of it alive.
×
DidUknowiPwn's Groups
UGX Team Member
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Scripter Elite Has shown excellence and experience in the area of custom scripting in the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
Also if you don't mind me asking, where do you get all of the level flags from? (intial_blackscreen_passed, etc.)
There is no appropriate list all you can do is search for the flags within the scripts.

 

Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Twitch
Loading ...