help load
#1

How could I load the following:

name:name server
mode:mode test
map:Los santos
url:www.sampforums.com
weather:10

of a text document in the scripfile folder already created to the GM using native functions example fopen
Reply
#2

That's server.cfg
Reply
#3

Quote:
Originally Posted by v1k1nG
Посмотреть сообщение
That's server.cfg
Yes but I want to load it from scriptfiles for example as it would be without using any reading system using native functions of samp
Reply
#4

https://sampwiki.blast.hk/wiki/SetGameModeText
https://sampwiki.blast.hk/wiki/Advanced_Server_Controls

You can use SendRconCommand in your script, here are some RCON commands below:

PHP код:
RCON Commands
Type cmdlist 
for commands (or, varlist for variablesmaking use of the RCON in-game ('/rcon cmdlist'). You do not need to type with [ ] they're just to highlight the parameter.
These are the functions that you as admin can use:
/rcon cmdlist - Shows a list with commands.
/rcon varlist - Shows a list with the current variables.
/rcon exit - Closes the server.
/rcon echo [text] - Shows the [text] in the console of the server (NOT the client-console in-game).
/rcon hostname [name] - change the hostname text (example: /rcon hostname my server).
/rcon gamemodetext [name] - change the gamemode text (example: /rcon gamemodetext my gamemode).
/rcon mapname [name] - change the map name text (example: /rcon mapname San Andreas).
/rcon exec [filename] - Executes the file which contains server cfg (example: /rcon exec blah.cfg).
/rcon kick [ID] - Kick the player with the given ID (example: /rcon kick 2).
/rcon ban [ID] - Ban the player with the given ID (example: /rcon ban 2). 
etc..
Reply
#5

They are not understanding what I want to do, basically I have in a text document what I mentioned earlier as charge that from scriptfile to gamemode using fopen
Reply
#6

I can't even understand what you're saying.
Reply
#7

https://sampwiki.blast.hk/wiki/Fopen

But idk, maybe Sql is better
Reply
#8

Let's see, I explain, I have the following in a txt file in scriptfile


name:Server
mode:Test
map:Samp
url:www.sampforums.com
weather:10

how do I charge that in the gamemode using fopen
Reply
#9

Use the function SendRconCommand and insert the command you wish to send after retrieving the data from your file.
Reply
#10

Quote:
Originally Posted by DaniceMcHarley
Посмотреть сообщение
Use the function SendRconCommand and insert the command you wish to send after retrieving the data from your file.
The problem is that I do not know how to load it with fopen
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)