Help with reading/making files [rep+]
#1

Hello. I am creating a system like where you can own a company, and name the company. It is 15 companys in the game, 5 airlines, 5 trucking companys, and 5 bus companies.
What I need help with:
* Making it so that it creates a file with the list of all the companys with name. For instance:

Код:
Company 1: Norwegian Airline
Company 2: Bussing Company
Company 3: DHL Trucking Company
Company 4: Empty Company
...
Company 15: Empty Company
etc...

* Reading the names of company from file
* Making a command to change the name, so a player can write for instance: /changecompanyname (New Company Name) so they don't have to ask the owner to change via the files.

I'll rep for anyone that can help me with that, not neccesarily write it for me, but guide me into making in or referencing to another page where I can find the neccesary codes to write etc.

Thanks in advance.
Reply
#2

format(fileSrv2,sizeof(fileSrv2),"/company.txt");

I guess you could do something like that, make a command to Create a company, Then string the rest of the information. Have it right to a new file in your scriptfiles.
Reply
#3

Try creating Dcmd or Zcmd
in coincidence
Reply
#4

use Y_INI
Reply
#5

Quote:
Originally Posted by henry jiggy
Посмотреть сообщение
use Y_INI
I was thinking that too
Reply
#6

Quote:
Originally Posted by 4Brothers
Посмотреть сообщение
I was thinking that too
Y_Ini is a great way to make files. Fast and efficient. Here is the topic by ******. There is also a tutorial written by ****** himself that can be viewed here. If you didn't catch it in the first link the download for Y_Ini is here. Also there is a Register/Login that can be used for reference by Zh3r0 here!
Goodluck with your scripting.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)