define mapname at top of the script -
Dripac - 30.06.2013
SendRconCommand("mapname", MAPNAME);
But this gives one warning, so whats the right way to use it?
Re: define mapname at top of the script -
JaKe Elite - 30.06.2013
pawn Код:
SendRconCommand("mapname MAPNAME");
AW: define mapname at top of the script -
Dripac - 30.06.2013
I want to define it on top of the script like #define MAPNAME "..."
Re: define mapname at top of the script -
JaKe Elite - 30.06.2013
You can change the map name when the script loads.
pawn Код:
#define MAPNAME "n00b world"
//OnGameModeInit/OnFilterScriptInit
SendRconCommand("mapname "#MAPNAME");
AW: define mapname at top of the script -
Dripac - 30.06.2013
I don't think you understand
I want to have a definition at top of the script like "#define MAPNAME ..." so i don't have to scroll at ongamemodeinit when i want to change it
Re: define mapname at top of the script -
Jarnu - 30.06.2013
pawn Код:
#define MAPNAME "n00b world"
//OnGameModeInit/OnFilterScriptInit
SendRconCommand("mapname "#MAPNAME");
Oh jesus.. _Jake_ gave you the correct thing. You don't HAVE TO SCROLL DOWN TO OnGameModeInit.. just change name in the define! !!!
Re: define mapname at top of the script -
JaKe Elite - 30.06.2013
I don't think the function will work outside the callback.
But if you really don't understand what we mean.
Use server.cfg as the mapname changing instead
Add
in server.cfg
AW: define mapname at top of the script -
Dripac - 30.06.2013
It's possible, i had this a long time ago but i forgot how to script it,
it was something with new string[56]; etc
//edit nvm i found it out
Код:
new string[128];
format(string, sizeof(string), "hostname %s", ServerName);
SendRconCommand(string);