Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public Plugin myinfo =
- {
- name = "FreeKill",
- author = "Wicked",
- description = "When someone thinks there freekilled it goes to chat if they do !freekill",
- version = "0.5",
- url = ""
- };
- public void OnPluginStart()
- {
- RegConsoleCmd("sm_freekill", Command_freekill, "If they think they are freekilled it is said in chat");
- }
- stock bool IsValidClient(int client, bool noBots=true)
- {
- if (client < 1 || client > MaxClients)
- return false;
- if (!IsClientInGame(client))
- return false;
- if (!IsClientConnected(client))
- return false;
- if (noBots)
- if (IsFakeClient(client))
- return false;
- if (IsClientSourceTV(client))
- return false;
- return true;
- }
- public Action Command_freekill(client, args)
- {
- if(!IsValidClient(client))
- return Plugin_Handled
- if(GetTime() - g_iaTimes[client] < g_iCooldownTime ) {
- g_iaTimes[client] = GetTime();
- } else {
- PrintToChat(client, PRG_CHAT_PREFIX ... "You're on cooldown!");
- }
- int warden = ModularJail_GetWarden()
- LoopValidPlayers(i)
- {
- if(i || ModularJail_IsWarden(i))
- {
- PrintToChat(i, "%N Thinks he was Freekilled!", warden)
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement