mirror of
https://github.com/Jackzmc/sourcemod-plugins.git
synced 2025-05-08 16:43:20 +00:00
Use new move points save system
This commit is contained in:
parent
9409873f3a
commit
4ef633c68f
1 changed files with 11 additions and 5 deletions
|
@ -19,13 +19,15 @@ public Action Command_GuessWho(int client, int args) {
|
||||||
} else {
|
} else {
|
||||||
subcmd = currentSet;
|
subcmd = currentSet;
|
||||||
}
|
}
|
||||||
if(SaveMapData(currentMap, subcmd)) {
|
if(movePoints.SaveMap(currentMap, subcmd)) {
|
||||||
ReplyToCommand(client, "Saved movement data for %s/%s", currentMap, subcmd);
|
ReplyToCommand(client, "Saved movement data for %s/%s", currentMap, subcmd);
|
||||||
} else {
|
} else {
|
||||||
ReplyToCommand(client, "Failed to save map data");
|
ReplyToCommand(client, "Failed to save map data");
|
||||||
}
|
}
|
||||||
} else if(StrEqual(subcmd, "load")) {
|
} else if(StrEqual(subcmd, "load")) {
|
||||||
if(LoadMapData(currentMap, currentSet)) {
|
MovePoints points = MovePoints.LoadMap(currentMap, currentSet);
|
||||||
|
if(points != null) {
|
||||||
|
Game.SetPoints(points);
|
||||||
ReplyToCommand(client, "Loaded movement data for %s/%s", currentMap, currentSet);
|
ReplyToCommand(client, "Loaded movement data for %s/%s", currentMap, currentSet);
|
||||||
} else {
|
} else {
|
||||||
ReplyToCommand(client, "Failed to load map data");
|
ReplyToCommand(client, "Failed to load map data");
|
||||||
|
@ -89,9 +91,13 @@ public Action Command_GuessWho(int client, int args) {
|
||||||
if(!LoadConfigForMap(currentMap)) {
|
if(!LoadConfigForMap(currentMap)) {
|
||||||
ReplyToCommand(client, "Warn: No config entry for %s", currentMap);
|
ReplyToCommand(client, "Warn: No config entry for %s", currentMap);
|
||||||
}
|
}
|
||||||
if(!LoadMapData(currentMap, currentSet)) {
|
MovePoints points = MovePoints.LoadMap(currentMap, currentSet);
|
||||||
ReplyToCommand(client, "Warn: No map data found for %s/%s", currentMap, currentSet);
|
if(points != null) {
|
||||||
} else if(movePoints.Length == 0) {
|
if(movePoints.Length == 0) {
|
||||||
|
ReplyToCommand(client, "Warn: No map data found for %s/%s", currentMap, currentSet);
|
||||||
|
}
|
||||||
|
Game.SetPoints(points);
|
||||||
|
} else {
|
||||||
ReplyToCommand(client, "Warn: %s/%s has 0 saved movement locations", currentMap, currentSet);
|
ReplyToCommand(client, "Warn: %s/%s has 0 saved movement locations", currentMap, currentSet);
|
||||||
}
|
}
|
||||||
Game.Cleanup();
|
Game.Cleanup();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue