Код:
#include <a_samp>
#define COLOR_GRAD1 0xB4B5B7FF
#pragma tabsize 0
new Text:C3;
new Text:C2;
new Text:C1;
new Text:YA;
forward conteo2(playerid);
forward conteo1(playerid);
forward conteoYa(playerid);
forward conteoFin(playerid);
public OnFilterScriptInit()
{
C3 = TextDrawCreate(317.000000,197.000000,"~g~3");
TextDrawFont(C3,3);
TextDrawSetOutline(C3,1);
TextDrawColor(C3,0xff000033);
TextDrawBackgroundColor(C3,0x000000FF);
TextDrawColor(C3,0xFFFFFFFF);
TextDrawLetterSize(C3,0.520000,1.799999);
C2 = TextDrawCreate(317.000000,197.000000,"~g~2");
TextDrawFont(C2,3);
TextDrawSetOutline(C2,1);
TextDrawBackgroundColor(C2,0x000000FF);
TextDrawColor(C2,0xFFFFFFFF);
TextDrawTextSize(C2,0.000000,0.000000);
TextDrawLetterSize(C2,0.520000,1.799999);
C1 = TextDrawCreate(317.000000,197.000000,"~g~1");
TextDrawFont(C1,3);
TextDrawSetOutline(C1,1);
TextDrawBackgroundColor(C1,0x000000FF);
TextDrawColor(C1,0xFFFFFFFF);
TextDrawTextSize(C1,0.000000,0.000000);
TextDrawLetterSize(C1,0.520000,1.799999);
YA = TextDrawCreate(312.000000,197.000000,"~r~Go");
TextDrawFont(YA,3);
TextDrawSetOutline(YA,1);
TextDrawBackgroundColor(YA,0x000000FF);
TextDrawColor(YA,0xFFFFFFFF);
TextDrawTextSize(YA,0.000000,0.000000);
TextDrawLetterSize(YA,0.520000,1.799999);
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/conteo", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid,COLOR_GRAD1,"[ ! ] Conteo en inicio");
PlayerPlaySound(playerid,1056,0.0,0.0,0.0);
TextDrawShowForPlayer(playerid,C3);
SetTimer("conteo2",1000,0);
return 1;
}
return 0;
}
public conteo2(playerid)
{
TextDrawHideForPlayer(playerid,C3);
PlayerPlaySound(playerid,1056,0.0,0.0,0.0);
TextDrawShowForPlayer(playerid,C2);
SetTimer("conteo1",1100,0);
}
public conteo1(playerid)
{
TextDrawHideForPlayer(playerid,C2);
PlayerPlaySound(playerid,1056,0.0,0.0,0.0);
TextDrawShowForPlayer(playerid,C1);
SetTimer("conteoYa",1100,0);
}
public conteoYa(playerid)
{
TextDrawHideForPlayer(playerid,C1);
PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
TextDrawShowForPlayer(playerid,YA);
SetTimer("conteoFin",1100,0);
}
public conteoFin(playerid)
{
TextDrawHideForPlayer(playerid,YA);
}