#include <a_samp>
new Count = 5;
new CountTexts[][] =
{
\"H¨ggy~!!!\",
\"Gyer¬nk!!!\",
\"Go!!!\"
};
public OnPlayerCommandText(playerid,cmdtext[])
{
if(strcmp(\"/count\",cmdtext,true) == 0)
{
if(Count < 5) SendClientMessage(playerid,0xAA3333AA,\"Már valaki elindította!\");
else CountDown();
return 1;
}
return 0;
}
forward CountDown();
public CountDown()
{
new Str[16];
if(Count > 0)
{
for(new i; i < GetMaxPlayers(); i ++)
{
if(IsPlayerConnected(i)) PlayerPlaySound(i,1056,0.0,0.0,0.0);
}
format(Str,sizeof(Str),\"~r~%d\",Count);
GameTextForAll(Str,1000,5);
SetTimer(\"CountDown\",1000,true);
Count --;
}
else
{
new ASD = random(sizeof(CountTexts));
for(new i; i < GetMaxPlayers(); i ++)
{
if(IsPlayerConnected(i)) PlayerPlaySound(i,1057,0.0,0.0,0.0);
}
format(Str,sizeof(Str),\"%s\",CountTexts[ASD]);
GameTextForAll(Str,1000,5);
Count = 5;
}
return 1;
}
A ~ \" Á ékezet \" miatt crashelni fog