Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Count filterscript by -SteVe- (PLEASE LEAVE THE CREDITS!!!)
- #define FILTERSCRIPT
- #include <a_samp>
- #define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
- #define YELLOW 0xFFFF00FF
- #define ADMINRED 0xFB0000FF
- //Forwards
- forward timercountdown1();
- forward CountSpamOver();
- //News (veriables)
- new CountSpam[MAX_PLAYERS];
- new counts;
- new counter1;
- #if defined FILTERSCRIPT
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" Count Filterscript by -SteVe- ");
- print("--------------------------------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- #else
- main()
- {
- print("\n----------------------------------");
- print(" Blank Gamemode by your name here");
- print("----------------------------------\n");
- }
- #endif
- public OnGameModeInit()
- {
- // Don't use these lines if it's a filterscript
- SetGameModeText("Blank Script");
- AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- return 1;
- }
- public OnGameModeExit()
- {
- return 1;
- }
- public OnPlayerRequestClass(playerid, classid)
- {
- SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
- SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
- SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- CountSpam[playerid] = 0;
- return 1;
- }
- //count
- public timercountdown1()
- {
- counts--;
- if(counts == 3)
- {
- SendClientMessageToAll(YELLOW,"_-Three-_");
- }
- if(counts == 2)
- {
- SendClientMessageToAll(YELLOW,"_-Two-_");
- }
- if(counts == 1)
- {
- SendClientMessageToAll(YELLOW,"_-One-_");
- }
- if(counts == 0)
- {
- SendClientMessageToAll(YELLOW,"_-GoGoGo!!!-_");
- KillTimer(counter1);
- }
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- dcmd(count,5,cmdtext);
- return 0;
- }
- public CountSpamOver()
- {
- for(new i; i < MAX_PLAYERS; i ++)
- {
- CountSpam[i] = 0;
- }
- return 1;
- }
- //DCMD Commands
- dcmd_count(playerid,params[])
- {
- #pragma unused params
- if(CountSpam[playerid] == 0)
- {
- new str[128];
- new playername[MAX_PLAYER_NAME];
- GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
- format(str, sizeof(str), "_-%s has started a Count Down-_", playername);
- SendClientMessageToAll(YELLOW, str);
- counts = 4;
- CountSpam[playerid] = 1;
- counter1 = SetTimer("timercountdown1",1000,true);
- SetTimer("CountSpamOver", 14000, 0);
- }
- else if(CountSpam[playerid] == 1)
- {
- SendClientMessage(playerid,ADMINRED,"Please wait before you can use Count again.");
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment