Need scripting Help for making maps/GM's to be selected in TDM?
#1

Hello everyone,

I have a TDM Which am making on my own. I want to create a function Which exits the GM named "new.amx" in 25 minutes exact after on round and Start's the other GM named "new2.amx " which is similar to the GM new.amx but with other corrdinates that means different corrdinates/Maps. Please help me on how to start other GM after using the first!

Please help me! Thanks for reading
Peace
Char.C
Reply
#2

pawn Code:
public ExitMap()
{
    GameModeExit();
}
OnGameModeInit
pawn Code:
SetTimer("ExitMap", 1500000, 0);
server.cfg
Code:
gamemode0 new
gamemode1 new2
Reply
#3

Once the Map will end?? Will it start the other game mode in continuation?
Reply
#4

Use timers, for example:
pawn Code:
// Top of your script
forward GameModeChanger();
pawn Code:
// Under OnGameModeInit
SetTimer("GameModeChanger", 1500 * 1000, false);
// SetTimer(function, interval, repeating);
pawn Code:
// Bottom of the script
public GameModeChanger()
{
    SendClientMessageToAll(-1, "Map changing don't go anywhere");
    SendRconCommand("changemode YOUR_OTHER_GAMEMODER_NAME");
    return 1;
}
Though if it is done from a single gamemode it would be better.
Reply
#5

Quote:
Originally Posted by suhrab_mujeeb
View Post
Use timers, for example:
pawn Code:
// Top of your script
forward GameModeChanger();
pawn Code:
// Under OnGameModeInit
SetTimer("GameModeChanger", 1500 * 1000, false);
// SetTimer(function, interval, repeating);
pawn Code:
// Bottom of the script
public GameModeChanger()
{
    SendClientMessageToAll(-1, "Map changing don't go anywhere");
    SendRconCommand("changemode YOUR_OTHER_GAMEMODER_NAME");
    return 1;
}
Though if it is done from a single gamemode it would be better.
What do you mean by Single Game mode? Your Timer is for 25 Mins ?? Do i need to add something in server.cfg if am using the Function GameModeChanger() ??
Reply
#6

Quote:
Originally Posted by Ballu Miaa
View Post
What do you mean by Single Game mode? Your Timer is for 25 Mins ?? Do i need to add something in server.cfg if am using the Function GameModeChanger() ??
1- By single gamemode I mean to do it in one script, no changing gamemodes.
2- Yes, the time is for 25 minutes.
3- Nope you don't need to add anything in your server.cfg. All you have to do is to include the code in ur gamemode.
Reply
#7

Quote:
Originally Posted by suhrab_mujeeb
View Post
1- By single gamemode I mean to do it in one script, no changing gamemodes.
2- Yes, the time is for 25 minutes.
3- Nope you don't need to add anything in your server.cfg. All you have to do is to include the code in ur gamemode.
I really want one Gamemode. Can you please tell me how can i do that?? I dont know what to do. Two GM's for Two Maps is what i know lol.

Thanks for the help!
Ballu Miaa
Reply
#8

https://sampforum.blast.hk/showthread.php?tid=269336

This might help ya.
Reply
#9

Awesome!!! Your fucking Awesome brother. Much Love
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)