Author Topic: /reloadMap  (Read 803 times)

Simple, a command that changes the map to the same map you are on (effectively clearing everything that's there)

Some of you may not need this, but I do

You mean like /clearallbricks?


Ok? Don't flame. The way you described it just seemed like it was what you were talking about. Don't be in-descriptive.

Ok? Don't flame. The way you described it just seemed like it was what you were talking about. Don't be in-descriptive.
One could also say understand the problem better.

This seems like it would be incredibly easy, I hope it gets made.

This seems like it would be incredibly easy, I hope it gets made.
Yes. I could do it if someone told me what variables tell what map it is and what commands cause the map to change.


Code: [Select]
function serverCmdReloadMap(%client)
{
if(%client.isLocalConnection() || $Server::LAN || %client.getBLID() == getNumKeyID())
{
serverCmdChangeMap(%client,missionInfo.name);
schedule(200,0,messageAll,'',%client.getPlayerName() SPC "reloaded the map.");
}
}

That should work. I made it host-only, but you can easily change it to SA or admin-only.

Code: [Select]
function serverCmdReloadMap(%client)
{
if(%client.isLocalConnection() || $Server::LAN || %client.getBLID() == getNumKeyID())
{
serverCmdChangeMap(%client,missionInfo.name);
schedule(200,0,messageAll,'',%client.getPlayerName() SPC "reloaded the map.");
}
}

That should work. I made it host-only, but you can easily change it to SA or admin-only.
Thanks a bunch, will try this right now

The client has the current map info on them? That doesn't make sense, why would you apply the missioninfo to every player when they are in the map... Blah...

The client has the current map info on them? That doesn't make sense, why would you apply the missioninfo to every player when they are in the map... Blah...
Are you handicapped?


Code: [Select]
function serverCmdReloadMap(%client)
{
if(%client.isLocalConnection() || $Server::LAN || %client.getBLID() == getNumKeyID())
{
serverCmdChangeMap(%client,missionInfo.name);
schedule(200,0,messageAll,'',%client.getPlayerName() SPC "reloaded the map.");
}
}

That should work. I made it host-only, but you can easily change it to SA or admin-only.
%client.getPlayerName()
why would you i don't even

%client.getPlayerName()
why would you i don't even
That's the proper way to do it, rather than %client.name.

It doesn't work
I think I know the problem.

Try this one:
Code: [Select]
function serverCmdReloadMap(%client)
{
if(%client.isLocalConnection() || $Server::LAN || %client.getBLID() == getNumKeyID())
{
serverCmdChangeMap(%client,$Server::MissionFile);
schedule(200,0,messageAll,'',%client.getPlayerName() SPC "reloaded the map.");
}
}

I think I know the problem.

Try this one:
This one appears to work
Thanks!

Edit:
Code: [Select]
function serverCmdReloadMap(%client)
{
if(%client.isLocalConnection() || $Server::LAN || %client.getBLID() == getNumKeyID())
{
messageAll('',"\c3" @ %client.getPlayerName() SPC "\c0has reloaded the map");
serverCmdChangeMap(%client,$Server::MissionFile);
}
}
Above version makes the messages look nice
« Last Edit: March 25, 2012, 08:36:19 AM by Treynolds416 »