I wanted to ask you here as I couldn't figure out how to do it. I want to add a usage limit to this Command. I wanted to enable a player to use it maximum 3 times, but when he used this command, I could not write the code to increase it and when it reached the limit, I could not disable it from using it. I'm giving you the source version without the garbage code I made. I would be very happy if you can help.
PHP Code:
public Action ResetBHP(int client, int args)
{
if (client == 0 || !IsClientInGame(client))
{
return Plugin_Handled;
}
AdminId clientId = GetUserAdmin(client);
if (clientId == INVALID_ADMIN_ID || iPounces[client] == 0)
{
CPrintToChat(client, "\x03Invalid!\x01");
return Plugin_Handled;
}
CPrintToChat(client, "\x04Fatal Jump\x01 \x03Counts Reset!\x01");
/*
I left these out because it sums up what I want to do.
if(int i, i =< limited i++ ){
CPrintToChat(client, "\x04You Used Reset. (%i/%i)",resetnum,limited );
}*/
if (hPenaltyTime[client] != null)
{
hPenaltyTime[client] = null;
}
//iPounces[client] = 0;
iPenalty[client] = 0;
return Plugin_Handled;
}