define mapname at top of the script
#1

SendRconCommand("mapname", MAPNAME);

But this gives one warning, so whats the right way to use it?
Reply
#2



pawn Код:
SendRconCommand("mapname MAPNAME");
Reply
#3

I want to define it on top of the script like #define MAPNAME "..."
Reply
#4

You can change the map name when the script loads.

pawn Код:
#define MAPNAME "n00b world"

//OnGameModeInit/OnFilterScriptInit
SendRconCommand("mapname "#MAPNAME");
Reply
#5

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
Reply
#6

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! !!!
Reply
#7

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

Код:
mapname MAPNAME
in server.cfg
Reply
#8

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);
Reply


Forum Jump:


Users browsing this thread: 6 Guest(s)