mirror of
https://github.com/Jackzmc/sourcemod-plugins.git
synced 2025-05-08 08:03:21 +00:00
ftt: Use a queue for special spawning
This commit is contained in:
parent
c3e43d744a
commit
d9241b2949
11 changed files with 329 additions and 158 deletions
|
@ -13,10 +13,6 @@ public Action Command_InstaSpecial(int client, int args) {
|
|||
menu.ExitButton = true;
|
||||
menu.Display(client, 0);
|
||||
} else {
|
||||
if(gInstaSpecialType > -1) {
|
||||
ReplyToCommand(client, "Please wait for last Insta to spawn.");
|
||||
return Plugin_Handled;
|
||||
}
|
||||
char arg1[32], arg2[32] = "jockey";
|
||||
GetCmdArg(1, arg1, sizeof(arg1));
|
||||
if(args >= 2) {
|
||||
|
@ -49,7 +45,7 @@ public Action Command_InstaSpecial(int client, int args) {
|
|||
for (int i = 0; i < target_count; i++) {
|
||||
int target = target_list[i];
|
||||
if(GetClientTeam(target) == 2) {
|
||||
if(SpawnSpecialNear(target, specialType)) {
|
||||
if(SpawnSpecialForTarget(specialType, target)) {
|
||||
LogAction(client, target, "\"%L\" spawned Insta-%s™ nearby \"%L\"", client, arg2, target);
|
||||
successes++;
|
||||
} else {
|
||||
|
@ -82,10 +78,6 @@ public Action Command_InstaSpecialFace(int client, int args) {
|
|||
menu.ExitButton = true;
|
||||
menu.Display(client, 0);
|
||||
} else {
|
||||
if(gInstaSpecialType > -1) {
|
||||
ReplyToCommand(client, "Please wait for last Insta to spawn.");
|
||||
return Plugin_Handled;
|
||||
}
|
||||
char arg1[32], arg2[32] = "jockey";
|
||||
GetCmdArg(1, arg1, sizeof(arg1));
|
||||
if(args >= 2) {
|
||||
|
@ -118,7 +110,7 @@ public Action Command_InstaSpecialFace(int client, int args) {
|
|||
for (int i = 0; i < target_count; i++) {
|
||||
int target = target_list[i];
|
||||
if(GetClientTeam(target) == 2) {
|
||||
if(SpawnSpecialInFace(target, specialType)) {
|
||||
if(SpawnSpecialForTarget(specialType, target, Special_OnTarget)) {
|
||||
LogAction(client, target, "\"%L\" spawned Insta-%s™ at player \"%L\"", client, arg2, target);
|
||||
successes++;
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue