[Tutorial] [TuT]How to make random mapname change for players
#1

Tutorial on how to change map for server not a map changer just for the map in the samp bit for other players to see
if people dont know how to change mapname then its easy
just add this to server.cfg
Code:
mapname |namehere|
Ok lets start!

First what you want to do is put this on you'r fowards the code below.v. that is to foward it for players to see!
Code:
forward ChangeMapName();
Then you will need to put this code on ongamemodeinit the 4000 is 4secounds changeing and the 1 is to turn on and make it 0 to turn it off.
Code:
SetTimer("ChangeMapName",4000,1);
Then when you have done that just paste this Note [i would suggest at the very bottom of gamemode]
Code:
public ChangeMapName()
{
   new var = random(3); //(Change the 2 to a different number if you are adding more message or deleting)
   switch (var)
   {
     case 0: SendRconCommand("mapname |namehere|"); // WARNING: Do not delete the word 'mapname' from here
     case 1: SendRconCommand("mapname |namehere|"); // WARNING: Do not delete the word 'mapname' from here
     case 2: SendRconCommand("mapname |namehere|"); // WARNING: Do not delete the word 'mapname' from here
   }
}
Ok guys i may not be the first to finde this out but enjoy for people who dont know how to do this

----------------
Note if this helped you please +rep thanks guys--ps im not a noob
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)