Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
sourcemod
DraftPick
Commits
d35c93de
Commit
d35c93de
authored
Oct 01, 2019
by
Mikleo
Browse files
emputils compatibility
parent
693001c3
Pipeline
#7182
passed with stages
in 18 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
dist/addons/sourcemod/plugins/draftpick.smx
View file @
d35c93de
No preview for this file type
dist/addons/sourcemod/scripting/draftpick.sp
View file @
d35c93de
...
...
@@ -8,7 +8,7 @@
#include <empstats>
#include <updater>
#define PluginVersion "0.9
6
"
#define PluginVersion "0.9
7
"
#define UPDATE_URL "https://sourcemod.docs.empiresmod.com/DraftPick/dist/updater.txt"
...
...
@@ -537,11 +537,16 @@ public Action Command_SetTeam(int client, int args)
{
GetCmdArg(1, arg1, sizeof(arg1));
int target = GetClientID(arg1,client);
GetCmdArg(2, arg2, sizeof(arg2));
char commandString[64];
Format(commandString,sizeof(commandString),"sm_setteam %s %s","#%d",arg2);
int target = EU_MenuFindTarget(commandString,client,arg1);
if(target == -1)
return Plugin_Handled;
GetCmdArg(2, arg2, sizeof(arg2));
char clientName[64];
char targetName[64];
GetClientName(client,clientName,sizeof(clientName));
...
...
@@ -1314,7 +1319,7 @@ public Action Command_SimJoin(int client, int args)
{
return Plugin_Handled;
}
int target =
GetClientID(arg1,
client);
int target =
EU_FindTarget(
client
,arg1
);
if(target != -1)
StartBatchJoin(target,20);
...
...
@@ -1334,7 +1339,7 @@ public Action Command_SetCaptain(int client, int args)
PrintToChat(client,"You must be in the captain vote stage to set captains");
return Plugin_Handled;
}
int target =
GetClientID(arg1,
client);
int target =
EU_FindTarget(
client
,arg1
);
if(target != -1)
SetCaptain(target,client);
...
...
@@ -1353,7 +1358,7 @@ public Action Command_RemoveCaptain(int client, int args)
PrintToChat(client,"You must be in the captain vote stage to remove captains");
return Plugin_Handled;
}
int target =
GetClientID(arg1,
client);
int target =
EU_FindTarget(
client
,arg1
);
if(target != -1)
RemoveCaptain(target,client);
...
...
@@ -2398,34 +2403,7 @@ int TeamCaptained(int client)
return -1;
}
}
GetClientID(char[] name,int client)
{
char target_name[MAX_TARGET_LENGTH];
int target_list[MAXPLAYERS], target_count;
bool tn_is_ml;
target_count = ProcessTargetString(
name,
client,
target_list,
MAXPLAYERS,
COMMAND_FILTER_NO_IMMUNITY,
target_name,
sizeof(target_name),
tn_is_ml);
if(target_count == -7)
{
ReplyToCommand(client, " Input applies to more than one target");
return -1;
}
if (target_count <= 0)
{
ReplyToCommand(client, "No Targets detected");
return -1;
}
return target_list[0];
}
// must delete the list after using this function
ArrayList GetClientCandidates(char[] name)
{
...
...
dist/updater.txt
View file @
d35c93de
...
...
@@ -4,7 +4,7 @@
{
"Version"
{
"Latest" "0.9
6
"
"Latest" "0.9
7
"
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment