Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Ucim brata i usput objavljujem :)
- /*
- Credits - ne brisi jebo ga ti :D
- * boris *
- * K4R!K3 *
- */
- #include < a_samp >
- #include < zcmd >
- #include < sscanf2 >
- #define Scm(%0,%1) SendClientMessage(%0,-1,%1)
- new count=0, counttimer, countinuse;
- new Text:count0, Text:count1, Text:count2;
- public OnFilterScriptInit()
- {
- count0 = TextDrawCreate(461.000000, 44.000000, "~n~");
- TextDrawBackgroundColor(count0, 255);
- TextDrawFont(count0, 1);
- TextDrawLetterSize(count0, 0.500000, 2.899999);
- TextDrawColor(count0, -1);
- TextDrawSetOutline(count0, 0);
- TextDrawSetProportional(count0, 1);
- TextDrawSetShadow(count0, 1);
- TextDrawUseBox(count0, 1);
- TextDrawBoxColor(count0, -16711681);
- TextDrawTextSize(count0, 496.000000, 0.000000);
- count1 = TextDrawCreate(463.000000, 45.000000, "~n~");
- TextDrawBackgroundColor(count1, 255);
- TextDrawFont(count1, 1);
- TextDrawLetterSize(count1, 0.500000, 2.700000);
- TextDrawColor(count1, -1);
- TextDrawSetOutline(count1, 0);
- TextDrawSetProportional(count1, 1);
- TextDrawSetShadow(count1, 1);
- TextDrawUseBox(count1, 1);
- TextDrawBoxColor(count1, 255);
- TextDrawTextSize(count1, 494.000000, 0.000000);
- count2 = TextDrawCreate(467.000000, 49.000000, "10");
- TextDrawBackgroundColor(count2, 255);
- TextDrawFont(count2, 3);
- TextDrawLetterSize(count2, 0.629999, 1.500000);
- TextDrawColor(count2, -1);
- TextDrawSetOutline(count2, 0);
- TextDrawSetProportional(count2, 1);
- TextDrawSetShadow(count2, 1);
- return 1;
- }
- public OnFilterScriptExit()
- {
- KillTimer(counttimer);
- return 1;
- }
- CMD:count(playerid, params[])
- {
- if(!IsPlayerAdmin(playerid)) return 1;
- if(countinuse == 1) return Scm(playerid, "Odbrojavanje je vec ukljuceno!");
- new cc, str[128];
- if(sscanf(params,"i", cc)) return Scm(playerid,"INFO:: /count [sekundi]");
- else if(cc > 60) return Scm(playerid, "ERROR:: max. 60 sekundi");
- else
- {
- count = cc +1;
- format(str,sizeof(str),"Odbrojavanje pokrenuto, %d sekundi.", cc);
- SendClientMessageToAll(-1,str);
- counttimer = SetTimer("CountDown", 1000, true);
- TextDrawShowForAll(count0);
- TextDrawShowForAll(count1);
- TextDrawShowForAll(count2);
- countinuse=1;
- }
- return 1;
- }
- forward CountDown(); public CountDown()
- {
- new string[128];
- if(count < 1)
- {
- TextDrawHideForAll(count0);
- TextDrawHideForAll(count1);
- TextDrawHideForAll(count2);
- countinuse=0;
- return KillTimer(counttimer);
- }
- count--;
- format(string, sizeof(string),"%d", count);
- TextDrawSetString(count2, string);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement