Szerző Téma: Stopper  (Megtekintve 2101 alkalommal)

Nem elérhető Flash

  • 5726
  • (っ◕‿◕)っ
    • Profil megtekintése
Stopper
« Dátum: 2012. December 03. - 16:08:31 »
+5 Show voters
Hali all.
 
   Jókedvemben összedobtam egy stopper scriptet a pawn tanulóknak.

   Ebben a scriptben saját magad állíthatod be hogy meddig mérjen a stopper perc, másodperc pontosan.


   A stoppert csakis RCON admin állíthatja le a /sstopper parancsal.


   A textdraw a térkép felett található meg.

Információk a scriptrõl:
 
  • Készítõ: Flash(Én)

  • A scriptet tartalmazó parancsok: /stopper, /sstopper

  • Sorok száma: 82

  • A scripthez szükséges: gvar, sscanf, zcmd, és alapvetõen a_samp

  • A scriptet 10 percembe tartott megalkotni, teszteléssel együtt.


A script:
 
#include <a_samp>
#include <gvar>
#include <sscanf2>
#include <zcmd>
new
Text: StopperTD,
m,
s,
sTimer,
sString[16]
;
public OnFilterScriptInit() {
StopperTD = TextDrawCreate(88.000000, 314.000000, \"~b~~h~Betoltes~w~..\");
TextDrawAlignment(StopperTD, 2);
TextDrawBackgroundColor(StopperTD, 255);
TextDrawFont(StopperTD, 3);
TextDrawLetterSize(StopperTD, 0.529999, 1.100000);
TextDrawColor(StopperTD, -1);
TextDrawSetOutline(StopperTD, 1);
TextDrawSetProportional(StopperTD, 1);
SetGVarInt(\"Perc\", 0);
SetGVarInt(\"mPerc\", 0);
return 1;
}
public OnPlayerDisconnect(playerid, reason) {
TextDrawHideForPlayer(playerid, StopperTD);
return 1;
}
CMD:stopper(playerid, params[]) {
if(GetGVarInt(\"mPerc\") != 0 || GetGVarInt(\"Perc\") != 0) return SendClientMessage(playerid, 0xE60000FF, \"Hiba! A stopper már mûködésben van!\");
if(sscanf(params, \"ii\", m, s)) return SendClientMessage(playerid, 0xffff99AA, \"Használat: {ffffff}/stopper [Perc] [Másodperc]\");
if(!(0 < m < 11)) return SendClientMessage(playerid, 0xE60000FF, \"Hiba! A perc 1 és 10 szám között lehet!\");
if(!(-1 < s < 60)) return SendClientMessage(playerid, 0xE60000FF, \"Hiba! A másodperc 0 és 59 szám között lehet!\");
TextDrawShowForAll(StopperTD);
SetGVarInt(\"Perc\", 0);
SetGVarInt(\"mPerc\", 0);
sTimer = SetTimer(\"Stopperr\", 1000, true);
new str[128], n[64];
str[0] = EOS;
GetPlayerName(playerid, n, 64);
format(str, sizeof(str), \"%s elindított egy idõzítõt! (%02d:%02d)\", n, m, s);
SendClientMessageToAll(0xffff99AA, str);
return 1;
}
CMD:sstopper(playerid) {
if(!IsPlayerAdmin(playerid)) return 0;
if(GetGVarInt(\"mPerc\") == 0 && GetGVarInt(\"Perc\") == 0) return SendClientMessage(playerid, 0xE60000FF, \"Hiba! A stopper már mûködésben van!\");
KillTimer(sTimer);
SetGVarInt(\"Perc\", 0);
SetGVarInt(\"mPerc\", 0);
TextDrawHideForAll(StopperTD);
SendClientMessageToAll(0xffff99AA, \"Egy admin leállította a stopper-t!\");
return 1;
}
forward Stopperr();
public Stopperr() {
SetGVarInt(\"mPerc\", GetGVarInt(\"mPerc\") +1);
format(sString, sizeof(sString), \"%02d:%02d\", GetGVarInt(\"Perc\"), GetGVarInt(\"mPerc\"));
TextDrawSetString(StopperTD, sString);
if(GetGVarInt(\"Perc\") == m && GetGVarInt(\"mPerc\") == s) {
KillTimer(sTimer);
SetGVarInt(\"Perc\", 0);
SetGVarInt(\"mPerc\", 0);
TextDrawHideForAll(StopperTD);
SendClientMessageToAll(0xffff99AA, \"A stopper véget ért!\");
}
if(GetGVarInt(\"mPerc\") == 60) {
SetGVarInt(\"Perc\", GetGVarInt(\"Perc\") +1);
SetGVarInt(\"mPerc\", 0);
}
return 1;
}

 
vagy: http://www.solidfiles.com/d/dcabe14323/
sscanf
gvar
ZCMD
V2-es verzióban várható: Részidõk
 
Kritikákat, véleményeket tessék. :)
« Utoljára szerkesztve: 2012. December 03. - 16:18:10 írta Flash »

Nem elérhető Pedró

  • 3341
  • 2014 © Az év Szkriptere
    • Profil megtekintése
Stopper
« Válasz #1 Dátum: 2012. December 03. - 16:15:02 »
+1 Show voters
naon komoj tessa
<3
szeretes van


Egész jó lett. :)

Nem elérhető Mike.

  • 720
    • Profil megtekintése
Stopper
« Válasz #2 Dátum: 2012. December 03. - 16:45:43 »
+1 Show voters
Idézetet írta: Pedró date=1354547702\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"30572\" data-ipsquote-contentclass=\"forums_Topic
Egész jó lett. :)
 

Nem elérhető Dfoglalo

  • 4069
  • Globális Moderátor
    • Profil megtekintése
Stopper
« Válasz #3 Dátum: 2012. December 03. - 16:51:03 »
0 Show voters
Nem rossz, ment a + Fel fogom használni :)

Stopper
« Válasz #4 Dátum: 2012. December 03. - 17:10:05 »
0 Show voters
Idézetet írta: Mike. date=1354549543\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"30572\" data-ipsquote-contentclass=\"forums_Topic


Egész jó lett. :)
 

[/quote]

Nem elérhető Flash

  • 5726
  • (っ◕‿◕)っ
    • Profil megtekintése
Stopper
« Válasz #5 Dátum: 2012. December 03. - 18:17:44 »
0 Show voters
Kösz mindenkinek. :)

Nem elérhető Aqe34

  • 165
  • Ide mit irjak?O.o
    • Profil megtekintése
Stopper
« Válasz #6 Dátum: 2012. December 03. - 18:22:05 »
0 Show voters
köszi jó lett

Nem elérhető bendor

  • 2949
    • Profil megtekintése
Stopper
« Válasz #7 Dátum: 2012. December 03. - 19:24:01 »
+1 Show voters
Jó lett nuna

Nem elérhető Flash

  • 5726
  • (っ◕‿◕)っ
    • Profil megtekintése
Stopper
« Válasz #8 Dátum: 2012. December 03. - 19:57:59 »
0 Show voters
thanks!  :thumbsup:

Stopper
« Válasz #9 Dátum: 2012. December 03. - 20:38:11 »
0 Show voters
Zsírkirály+

Nem elérhető instant

  • 2778
  • ZzzzzZ
    • Profil megtekintése
Stopper
« Válasz #10 Dátum: 2012. December 03. - 23:07:29 »
0 Show voters
szép lett

Stopper
« Válasz #11 Dátum: 2012. December 03. - 23:17:46 »
0 Show voters
így jónak \"néz\" ki , képet elfogadtam volna csak így nézõkébe  :hmmm:
egyébként más idézetének beszúrása és semmi saját vélemény az nem tilos ?  :OO
ahogy tette Diego és Mike  :whistle:

Nem elérhető zeteni

  • 1970
  • Ex-Scripter
    • Profil megtekintése
Stopper
« Válasz #12 Dátum: 2012. December 04. - 12:21:28 »
0 Show voters
Köszi, hogy szóltál norbee0170, de gondoltam addig nem szólok érte, ameddig nem csinálják még egy páran.

Stopper
« Válasz #13 Dátum: 2012. December 04. - 21:19:16 »
0 Show voters
Szep,soksikert a tovabbi verziokhoz(de csak ha lesznek) ;) +!

Nem elérhető Flash

  • 5726
  • (っ◕‿◕)っ
    • Profil megtekintése
Stopper
« Válasz #14 Dátum: 2012. December 04. - 21:26:05 »
0 Show voters
Köszi all.  :yes:

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal