PDA

View Full Version : Viewing map names in string


ConnorHunter
07/03/2014, 05:45 PM
How would I make a string display the map name, or mode ect

Something like GetMapName or something along those lines.

CutX
07/03/2014, 06:55 PM
you could define the mapname on top of you script

#define mapname SomeAwesomeMap

and then set it in OnGamemodeInit
SendRconCommand("mapname "mapname"");

you can use the map name in a string like this
new string[] = mapname;
now "string" will hold the defined mapname


btw. you could also load the mapname from somewhere, making it more dynamic


http://wiki.sa-mp.com/wiki/GetServerVarAsString
?
nice!didn't know that myself :D

newbienoob
07/03/2014, 06:57 PM
http://wiki.sa-mp.com/wiki/GetServerVarAsString
?