[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
#2

Cool tutorial
Uhm i think:
pawn Code:
SetTimer("ChangeMapName",4000,1);
//Not
SetTimer("ChangeMapName",4000,1);();
Reply
#3

pawn Code:
SetTimer("ChangeMapName",4000,1);();
//change it to
SetTimer("ChangeMapName",4000,1);
Reply
#4

Quote:
Originally Posted by Devilxz97
View Post
pawn Code:
SetTimer("ChangeMapName",4000,1);();
//change it to
SetTimer("ChangeMapName",4000,1);
Quote:
Originally Posted by Coder_
View Post
Cool tutorial
Uhm i think:
pawn Code:
SetTimer("ChangeMapName",4000,1);
//Not
SetTimer("ChangeMapName",4000,1);();
sorry guys had typo xD
Reply
#5

For future Tutorials, PLEASE dont use Bright Green text. Already got a headache and i didnt even read it all.
Reply
#6

Nice tutorial
Reply
#7

Quote:
Originally Posted by kurzagfx
View Post
For future Tutorials, PLEASE dont use Bright Green text. Already got a headache and i didnt even read it all.
Suggestion?

Wear glasses
Reply
#8

Nything, just not green.
Reply
#9

Quote:
Originally Posted by Kevin FOx
View Post
Nice tutorial
Thanks i dont think im the first to post this tho
Reply
#10

Quote:
Originally Posted by kurzagfx
View Post
Nything, just not green.
kk
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)