Quote:
Originally Posted by Dragokas
What?
|
https://github.com/eyal282/Useful-Co...mands.sp#L2864
Code:
public Action Timer_UberSlap(Handle hTimer, int UserId)
{
int client = GetClientOfUserId(UserId);
if (client == 0)
return Plugin_Stop;
else if (!UberSlapped[client])
{
TIMER_UBERSLAP[client] = INVALID_HANDLE;
return Plugin_Stop;
}
TotalSlaps[client]++;
if (TotalSlaps[client] >= 100 || (UC_UnlethalSlap(client, 1) && TotalSlaps[client] >= 10))
{
UberSlapped[client] = false;
TIMER_UBERSLAP[client] = INVALID_HANDLE;
UC_PrintToChat(client, "%s\x02Uberslap has ended.\x04 Prepare your landing!", UCTag);
return Plugin_Stop;
}
return Plugin_Continue;
}
stock bool UC_UnlethalSlap(int client, int damage = 0, bool sound = true)
{
bool OneHP = false;
int Health = GetEntityHealth(client);
if (damage >= Health)
{
damage = Health - 1;
OneHP = true;
}
SlapPlayer(client, damage, sound);
return OneHP;
}
__________________
I am available to make plugins for pay.
Discord: Eyal282#1334