command line/shortcut direct to the server?
#1

Hi,

A little weird question, but please let me know if this is possible. Is there anyway to make a command line or shortcut on the desktop, that lanuches the server when you click it? opposed to starting up SA-MP and selecting the server?

Thanks!
Reply
#2

yes with html

Код:
<meta http-equiv="refresh" content="1;url=samp://IP:PORT">
save it as name.html
Reply
#3

Isn't it possible with running samp.exe with parameters too?
Reply
#4

Quote:
Originally Posted by BloodyEric
Посмотреть сообщение
Isn't it possible with running samp.exe with parameters too?
Yes it is.

Syntax : Location\Location\samp.exe ip port
Example Location\Location\samp.exe 127.0.0.1 7777
Reply
#5

Quote:
Originally Posted by D0erfler
Посмотреть сообщение
yes with html

Код:
<meta http-equiv="refresh" content="1;url=samp://IP:PORT">
save it as name.html
That'll say either to play or add to favorites, that's close to hes needing. He wants a button he clicks from the desktop and connects him instantly to the server without clicking anything else.

Your HTML code will forward the visitor in 1 second to samp://iport, and the internet browser will still be open, though.

He's looking forward for something near that. But your solution is a good solution, though! Not bad.
Reply
#6

Quote:
Originally Posted by Mujib
Посмотреть сообщение
Yes it is.

Syntax : Location\Location\samp.exe ip port
Example Location\Location\samp.exe 127.0.0.1 7777
Location\Location\samp.exe 127.0.0.1 7777 Password
Reply
#7

Create a new file in your GTA:SA directory. Label it anything you please, but make sure the extension is .bat.

Right click on the file, editing it with Notepad.exe. Add the following code into the file, save it. Right click on the file, send to -> desktop (create shortcut) will do the trick.
Код:
samp.exe IP:PORT
::EXAMPLE: samp.exe 127.0.0.1:7777, and this line is a comment..
Or if you find this simpler (it does the same exact thing) just place the servers IP in for the IP variable, and the PORT for the port variable.
Код:
@echo off
set ip=
set port=
samp.exe %ip%:%port%
Reply
#8

Quote:
Originally Posted by iFriSki
Посмотреть сообщение
...[/code]
Thanks you guys!! Worked like a charm! Although at first I got a gta_sa.exe error, it stopped happening after a few re-try's.

I know this will sound REALLY lazy... But is there anyway to also make it so it enters my username and password automaticly, so I join the server without having to type in the PW?

Thanks again!
Reply
#9

Quote:
Originally Posted by iFriSki
Посмотреть сообщение
Create a new file in your GTA:SA directory. Label it anything you please, but make sure the extension is .bat.

Right click on the file, editing it with Notepad.exe. Add the following code into the file, save it. Right click on the file, send to -> desktop (create shortcut) will do the trick.
Код:
samp.exe IP:PORT
::EXAMPLE: samp.exe 127.0.0.1:7777, and this line is a comment..
Or if you find this simpler (it does the same exact thing) just place the servers IP in for the IP variable, and the PORT for the port variable.
Код:
@echo off
set ip=
set port=
samp.exe %ip%:%port%
Yea dude, works but when i conect says Wrong Server Password. I don't have a server password. What i do
Reply
#10

Is it possible to start samp server via command line that also adds username parameter?

I can connect to my server with samp.exe samp.ngaming.eu
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)