Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*================
- = countdown =
- =================*/
- #include <a_samp>
- #include <YSI\y_commands>
- #include <sscanf2>
- #define lup(%0) for(new %0 = 0; %0 < MAX_PLAYERS; %0++)
- new countdown = -1,
- timer;
- YCMD:ct(playerid,params[],help)
- {
- #pragma unused help
- new koliko;
- if(sscanf(params, "i",koliko)) return SendClientMessage(playerid,-1,"KORISTI: /ct [sekundi]");
- countdown = koliko;
- new
- str[32];
- format(str,32,"~g~%d",koliko);
- GameTextForAll(str,1000,6);
- timer = SetTimer("ct",1000,1);
- return true;
- }
- forward ct();
- public ct()
- {
- countdown--;
- new
- str[32];
- format(str,32,"~g~%d",countdown);
- lup(i){
- GameTextForAll(str,1000,6);
- if(countdown==0){
- GameTextForAll("~g~GO!",2000,6);
- KillTimer(timer);
- PlayerPlaySound(i, 1057, 0.0, 0.0, 0.0);}}
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment