mirror of
https://github.com/Jackzmc/sourcemod-plugins.git
synced 2025-05-06 11:53:21 +00:00
updates
This commit is contained in:
parent
a1b239f394
commit
6c0e7bc1f2
23 changed files with 726 additions and 108 deletions
|
@ -627,4 +627,33 @@ stock int GetRealClient(int client) {
|
|||
}else{
|
||||
return client;
|
||||
}
|
||||
}
|
||||
|
||||
stock int FindIdleBot(int client) {
|
||||
for(int i = 1; i <= MaxClients; i++ ) {
|
||||
if(IsClientConnected(i) && HasEntProp(i, Prop_Send, "m_humanSpectatorUserID")) {
|
||||
int realPlayer = GetClientOfUserId(GetEntProp(i, Prop_Send, "m_humanSpectatorUserID"));
|
||||
if(realPlayer == client) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
stock void SetParent(int child, int parent) {
|
||||
SetVariantString("!activator");
|
||||
AcceptEntityInput(child, "SetParent", parent);
|
||||
}
|
||||
|
||||
stock void SetParentAttachment(int child, const char[] attachment, bool withOffset = false) {
|
||||
SetVariantString(attachment);
|
||||
if(withOffset)
|
||||
AcceptEntityInput(child, "SetParentAttachmentMaintainOffset");
|
||||
else
|
||||
AcceptEntityInput(child, "SetParentAttachment");
|
||||
}
|
||||
|
||||
stock void ClearParent(int child) {
|
||||
AcceptEntityInput(child, "ClearParent");
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue