mirror of
https://github.com/Jackzmc/sourcemod-plugins.git
synced 2025-05-07 04:33:20 +00:00
Fix bugs
This commit is contained in:
parent
54be62bfb0
commit
eb6573f829
2 changed files with 3 additions and 2 deletions
Binary file not shown.
|
@ -311,6 +311,7 @@ bool ApplyAction(int targetUserId, const char[] action, const char[] key, const
|
||||||
// If action is 'fta*' or 'ftas'
|
// If action is 'fta*' or 'ftas'
|
||||||
int target = GetClientOfUserId(targetUserId);
|
int target = GetClientOfUserId(targetUserId);
|
||||||
if(target == 0) return false;
|
if(target == 0) return false;
|
||||||
|
LogAction(-1, target, "activating automatic action on \"%L\": @%s.%s.%s", target, action, key, value);
|
||||||
if(strncmp(action, "fta", 4) >= 0) {
|
if(strncmp(action, "fta", 4) >= 0) {
|
||||||
#if defined _ftt_included_
|
#if defined _ftt_included_
|
||||||
// Replace under scores with spaces
|
// Replace under scores with spaces
|
||||||
|
@ -338,7 +339,7 @@ bool ApplyAction(int targetUserId, const char[] action, const char[] key, const
|
||||||
#endif
|
#endif
|
||||||
} else if(strncmp(action, "slap", 4) == 0) {
|
} else if(strncmp(action, "slap", 4) == 0) {
|
||||||
float delay = StringToFloat(key);
|
float delay = StringToFloat(key);
|
||||||
CreateTimer(delay, SlapPlayer, targetUserId);
|
CreateTimer(delay, Timer_SlapPlayer, targetUserId);
|
||||||
} else {
|
} else {
|
||||||
PrintToServer("[PlayerNotes] Warn: Action (\"%s\") for %N is not valid", action, target);
|
PrintToServer("[PlayerNotes] Warn: Action (\"%s\") for %N is not valid", action, target);
|
||||||
return false;
|
return false;
|
||||||
|
@ -347,7 +348,7 @@ bool ApplyAction(int targetUserId, const char[] action, const char[] key, const
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
Action SlapPlayer(Handle h, int userid) {
|
Action Timer_SlapPlayer(Handle h, int userid) {
|
||||||
int client = GetClientOfUserId(userid);
|
int client = GetClientOfUserId(userid);
|
||||||
if(client > 0) {
|
if(client > 0) {
|
||||||
SlapPlayer(client, 0, true);
|
SlapPlayer(client, 0, true);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue