MCPcopy Create free account
hub / github.com/alliedmodders/sourcemod / ProcessTargetString

Function ProcessTargetString

core/logic/smn_players.cpp:1474–1508  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1472}
1473
1474static cell_t ProcessTargetString(IPluginContext *pContext, const cell_t *params)
1475{
1476 cmd_target_info_t info;
1477
1478 pContext->LocalToString(params[1], (char **) &info.pattern);
1479 info.admin = params[2];
1480 pContext->LocalToPhysAddr(params[3], &info.targets);
1481 info.max_targets = params[4];
1482 info.flags = params[5];
1483 pContext->LocalToString(params[6], &info.target_name);
1484 info.target_name_maxlength = params[7];
1485
1486 cell_t *tn_is_ml;
1487 pContext->LocalToPhysAddr(params[8], &tn_is_ml);
1488
1489 playerhelpers->ProcessCommandTarget(&info);
1490
1491 if (info.target_name_style == COMMAND_TARGETNAME_ML)
1492 {
1493 *tn_is_ml = 1;
1494 }
1495 else
1496 {
1497 *tn_is_ml = 0;
1498 }
1499
1500 if (info.num_targets == 0)
1501 {
1502 return info.reason;
1503 }
1504 else
1505 {
1506 return info.num_targets;
1507 }
1508}
1509
1510static cell_t FormatActivitySource(IPluginContext *pContext, const cell_t *params)
1511{

Callers

nothing calls this directly

Calls 1

ProcessCommandTargetMethod · 0.45

Tested by

no test coverage detected