Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Copyright © Saving
- ______________________________________________________________________________________________
- | | |
- | * SA-MP timer bug. |
- |______________________________________________________________________________________________|
- FilterScript - [FS]Timer
- --------------------------
- */
- //==============================================================================
- // Include.
- //==============================================================================
- #include <a_samp>
- //==============================================================================
- // Variable.
- //==============================================================================
- new Connect[MAX_PLAYERS];
- //==============================================================================
- // Anti-Amx.
- //==============================================================================
- AntiAmx()
- {
- new a[][] =
- {
- "Unarmed (Fist)",
- "Brass K"
- };
- #pragma unused a
- }
- //==============================================================================
- // Forward.
- //==============================================================================
- forward Test(playerid);
- //==============================================================================
- //------------------------------------------------------------------------------
- // Publics.
- //------------------------------------------------------------------------------
- //==============================================================================
- //==============================================================================
- // Public - OnFilterScriptInit.
- //==============================================================================
- public OnFilterScriptInit()
- {
- AntiAmx();
- return 1;
- }
- //==============================================================================
- // Public - OnFilterScriptExit.
- //==============================================================================
- public OnFilterScriptExit()
- {
- AntiAmx();
- return 1;
- }
- //==============================================================================
- // Public - OnPlayerCommandText.
- //==============================================================================
- //==============================================================================
- // Command.
- //==============================================================================
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if(!strcmp(cmdtext, "/Timer", true))
- {
- Connect[playerid] = SetTimerEx("Test", 1000, true, "i", playerid);
- return 1;
- }
- if(!strcmp(cmdtext, "/Killer", true))
- {
- KillTimer(Connect[playerid]);
- return 1;
- }
- return 0;
- }
- //==============================================================================
- // Public - Test.
- //==============================================================================
- public Test(playerid)
- {
- print("Running timer.");
- SendClientMessage(playerid, -1, "Timer running.");
- }
- // © Flare Entertainment - All rights reserved.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement