SA-MP Forums Archive
[Tutorial] [TuT]How to make random mapname change for players - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Tutorials (https://sampforum.blast.hk/forumdisplay.php?fid=70)
+---- Thread: [Tutorial] [TuT]How to make random mapname change for players (/showthread.php?tid=331500)



[TuT]How to make random mapname change for players - [EuG]ZeRoGoD - 05.04.2012

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


Re: [TuT]How to make random mapname change for players - Coder_ - 24.07.2012

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



Re: [TuT]How to make random mapname change for players - Devilxz97 - 27.07.2012

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



Re: [TuT]How to make random mapname change for players - [EuG]ZeRoGoD - 28.07.2012

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


Re: [TuT]How to make random mapname change for players - kurzagfx - 28.07.2012

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


Re: [TuT]How to make random mapname change for players - Kevin FOx - 28.07.2012

Nice tutorial


Re: [TuT]How to make random mapname change for players - [EuG]ZeRoGoD - 28.07.2012

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


Re: [TuT]How to make random mapname change for players - kurzagfx - 28.07.2012

Nything, just not green.


Re: [TuT]How to make random mapname change for players - [EuG]ZeRoGoD - 28.07.2012

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


Re: [TuT]How to make random mapname change for players - [EuG]ZeRoGoD - 28.07.2012

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