Szerző Téma: CountDown  (Megtekintve 647 alkalommal)

CountDown
« Dátum: 2013. Szeptember 19. - 18:39:19 »
0 Show voters
Valaki tud írni egy sima /count-ot?
3-tól számoljon vissza.

CountDown
« Válasz #1 Dátum: 2013. Szeptember 19. - 18:52:44 »
+1 Show voters

Nem elérhető ZSOLTI99

  • 1827
    • Profil megtekintése
CountDown
« Válasz #2 Dátum: 2013. Szeptember 19. - 20:07:25 »
+1 Show voters
Vagy esetleg:
http://forum.sa-mp.com/showthread.php?t=169023
http://samp-scripts.com/post/FS_CountDown_System_With_textDraw-RenisiL-filterscript-systems-9226/
 
#include < a_samp >
#include < sscanf2 >
#include < zcmd >
new szamlalo;
new bool:aktiv[MAX_PLAYERS];
new counttimer[MAX_PLAYERS];
new Float:X, Float:Y, Float:Z;
new str[128];
main() { }
CMD:count(playerid, params[])
{
new count, string[80], pName[24];
GetPlayerName(playerid, pName, 24);
GetPlayerPos(playerid, X, Y, Z);
if(sscanf(params, \"i\", count)) return SendClientMessage(playerid, 0xeda023AA, \">> /count [3-10] <<\");
if(count > 10 || count < 3) return SendClientMessage(playerid, 0xeb1717AA, \"A visszaszámlálási idõ csak 3 és 10 között lehet!\");
if(aktiv[playerid] == true) return SendClientMessage(playerid, 0xeb1717AA, \"Már folyamatban van egy visszaszámlálás a közeledben..!\");
for(new p = 0; p < MAX_PLAYERS; p++)
{
    if(IsPlayerInRangeOfPoint(p, 15, X, Y, Z))
    {
        aktiv[p] = true;
        szamlalo = count;
   counttimer[p] = SetTimerEx(\"szamlalas\", 1000, true, \"i\", p);
   TogglePlayerControllable(p, 0);
   format(str, 128, \"~g~%d\", szamlalo);
   format(string, 80, \"%s elindított egy %d másodperces visszaszámlálást.\", pName, count);
   SendClientMessage(p, 0x17e0ebAA, string);
   GameTextForPlayer(p, str, 1500, 4);
   PlayerPlaySound(playerid, 1056, 0, 0, 0);
   --szamlalo;
}
}
return 1;
}
       
       
       
forward szamlalas(playerid);
public szamlalas(playerid)
{
format(str, 128, \"~g~%d\", szamlalo);
if(szamlalo == 0)
{
GameTextForPlayer(playerid, \"~w~GO-GO-GO\", 1500, 4);
KillTimer(counttimer[playerid]);
szamlalo = -1;
aktiv[playerid] = false;
TogglePlayerControllable(playerid, 1);
PlayerPlaySound(playerid, 1057, 0, 0, 0);
    } else {
   GameTextForPlayer(playerid, str, 1500, 4);
--szamlalo;
PlayerPlaySound(playerid, 1056, 0, 0, 0);
}
}
       

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal