Raised This Month: $ Target: $400
 0% 

loading origins from a .cfg


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Rolnaaba
Veteran Member
Join Date: May 2006
Old 06-15-2007 , 22:57   loading origins from a .cfg
Reply With Quote #1

I am making my CTF plugin with .cfg files for the spawn locations of the flag entities. Lets say you install them to: "your_configs_directory\ctf\" and the filename is "map_name.ctf.cfg" so for example "de_aztec.ctf.cfg"

I would get this location/file like this:
Code:
new map_name[32], file[64], config_dir[32] get_configsdir(config_dir,31); get_mapname(map_name,31); formatex(file, 63, "%s/ctf/%s.ctf.cfg", config_dir, map_name);

then I would check if that file exsists, and if so load the origin from it:
Code:
if(file_exists(file)) {      //load info, but I dont know how to do this. }

how would I load the information?

here is an example from my de_aztec.ctf.cfg I made:
Code:
-3311.968750 128.465026 -313.994537
2531.370605 41.470859 -251.968750
counter-terrorist is first, then terrorist.

also attatched. Thanks in advance.
Attached Files
File Type: cfg de_aztec.ctf.cfg (70 Bytes, 85 views)
__________________
DO NOT PM me about avp mod.
Rolnaaba is offline
 



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 10:31.


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