Raised This Month: $51 Target: $400
 12% 

Better ways to create the arrays?


Post New Thread Reply   
 
Thread Tools Display Modes
KissLick
Veteran Member
Join Date: Nov 2012
Location: void
Old 06-12-2015 , 10:24   Re: Better ways to create the arrays?
Reply With Quote #21

Quote:
Originally Posted by Dr. Api View Post
Ok but the array is creating at the OnPluginStart event. So what you mean is that OnPluginStart is not call while changemap ?
I don"t think.
My test plugin
PHP Code:
#include <sourcemod>

public Plugin:myinfo =
{
    
name "Test-OnPluginStart",
    
author "Raska",
    
description "Test OnPluginStart",
    
version "0.1",
    
url ""
}

public 
OnPluginStart() { LogMessage("OnPluginStart"); }
public 
OnMapStart() { LogMessage("OnMapStart"); }
public 
OnMapEnd() { LogMessage("OnMapEnd"); }
public 
OnPluginEnd() { LogMessage("OnPluginEnd"); } 
Log:
PHP Code:
L 06/12/2015 16:19:32SourceMod log file session started (file "L20150612.log") (Version "1.7.2-dev+5204")

L 06/12/2015 16:19:32: -------- Mapchange to jb_clouds_final5 --------
L 06/12/2015 16:19:35: [Test-OnPluginStart.smxOnPluginStart
L 06
/12/2015 16:19:46: [Test-OnPluginStart.smxOnMapStart
L 06
/12/2015 16:19:58: [SMChanged map to "de_dust2" // called sm_map de_dust2
L 06/12/2015 16:19:58: [Test-OnPluginStart.smxOnMapEnd

L 06
/12/2015 16:20:03: -------- Mapchange to de_dust2 --------
L 06/12/2015 16:20:04: [Test-OnPluginStart.smxOnMapStart
L 06
/12/2015 16:20:17: [SMChanged map to "de_mirage" // called sm_map de_mirage
L 06/12/2015 16:20:17: [Test-OnPluginStart.smxOnMapEnd

L 06
/12/2015 16:20:23: -------- Mapchange to de_mirage --------
L 06/12/2015 16:20:24: [Test-OnPluginStart.smxOnMapStart
L 06
/12/2015 16:20:36: [SMChanged map to "cs_assault" // called sm_map cs_assault
L 06/12/2015 16:20:36: [Test-OnPluginStart.smxOnMapEnd

L 06
/12/2015 16:20:42: -------- Mapchange to cs_assault --------
L 06/12/2015 16:20:43: [Test-OnPluginStart.smxOnMapStart
// called exit
L 06/12/2015 16:20:46: [Test-OnPluginStart.smxOnMapEnd
L 06
/12/2015 16:20:47: [Test-OnPluginStart.smxOnPluginEnd
L 06
/12/2015 16:20:47Log file closed

Last edited by KissLick; 06-12-2015 at 10:26.
KissLick is offline
Dr. Api
BANNED
Join Date: Mar 2015
Location: France
Old 06-12-2015 , 10:29   Re: Better ways to create the arrays?
Reply With Quote #22

Awesome, thx for the time you spend

Was write on the API: Called when the plugin is fully initialized and all known external references are resolved. This is only called once in the lifetime of the plugin, and is paired with OnPluginEnd().

Last edited by Dr. Api; 06-12-2015 at 10:34.
Dr. Api is offline
KissLick
Veteran Member
Join Date: Nov 2012
Location: void
Old 06-12-2015 , 10:36   Re: Better ways to create the arrays?
Reply With Quote #23

Quote:
Originally Posted by Dr. Api View Post
Awesome, thx for the time you spend
Yeah! It cost me two minutes of my life! And I want my two minutes back!!!
KissLick is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:01.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode