Wysłany: 2016-08-27, 16:57
JestemSuperLIKE
Początkujący grafik
Wiek: 27 Na forum: 3694 dni Posty: 133
Piwa : 6
Jak mog? zrobi? od?wie?aj?cy textdraw w zabawach dm. Bo jak kto? si? wypisuje z zabawy to si? nie od?wie?a. Jak mog? zrobi? od?wie?anie i gdzie to mam da??
Kod:
forward WGPlayerEnd(playerid);
public WGPlayerEnd(playerid)
{
WGTeam[playerid] = 0;
ZapisEv[playerid] = 0;
PlayerSetColor(playerid);
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid,0);
SetPlayerTeam(playerid,playerid+10);
TextDrawHideForPlayer(playerid, WGtexdr);
TextDrawHideForPlayer(playerid, WGtexdr2);
TextDrawHideForPlayer(playerid, WGtexdr3);
return 1;
}
forward WGoff();
public WGoff()
{
KillTimer(WGTimer);
foreach(Player, x){
WGDMG[x] = 0;
if(ZapisEv[x] == Zapis_WG){
TextDrawHideForPlayer(x, WGtexdr);
TextDrawHideForPlayer(x, WGtexdr2);
TextDrawHideForPlayer(x, WGtexdr3);
PlayerSetColor(x);
LoadPlayerData(x);
ZapisEv[x] = 0;
SetPlayerInterior(x,0);
SetPlayerVirtualWorld(x,0);
StopSpecialAction(x);
}
SetPlayerTeam(x,x+10);
WGTeam[x] = 0;
}
WGLiczba = 0;
WGTeamLiczba[1] = 0;
WGTeamLiczba[2] = 0;
WGON = false;
WGStarted = false;
GangZoneHideForAll(ArenaZone2);
WGZapis();
return 1;
}
Kod:
CMD:wg(playerid,cmdtext[]){//Na Dole Mapy!
if(WGON){
SendClientMessage(playerid,COLOR_RED2,"›› |b??d| Wojna Gangow juz wystartowala !");
return 1;
}
if(ZapisEv[playerid] == Zapis_WG){
SendClientMessage(playerid,COLOR_RED2,"›› |b??d| Jestes juz zapisany(a) na Wojne Gangow !");
return 1;
}
ZapisEv[playerid] = Zapis_WG;
SendClientMessage(playerid,COLOR_GREEN,"›› |info| Zapisales(as) sie na Wojne Gangow !");
PlayerPlaySound(playerid, 1139, 0, 0, 0);
WGZapis();
new LiczbaWG = 0;
foreach(Player, x){
if(ZapisEv[x] == Zapis_WG){
LiczbaWG ++;
}
}
if(LiczbaWG == 4 && !WGStarted){
WGStarted = true;
SetTimer("WGStart",20000,0);
SendClientMessageToAll(0xD8F2F7FF,"Wojna Gangow wystartuje za 20 sek. (Nadal trwaj? zapisy!)");
KillTimer(WGTimer);
WGTimer = SetTimer("WGoff",240000,0);
if(EventTimer != 0) KillTimer(EventTimer);
TextDrawHideForAll(Eventex);
TextDrawSetString(Eventex, " ");
TextDrawShowForAll(Eventex);
EventTimer = SetTimerEx("TDZapisyUpdate", 10, 0, "dd", 20, 1);
return 1;
}
return 1;
}
CMD:wgexit(playerid,cmdtext[]){
if(ZapisEv[playerid] != Zapis_WG){
SendClientMessage(playerid,COLOR_ERROR,"›› |b??d| Nie jeste? zapisany(a) na Wojne Gang?w !");
return 1;
}
if(WGON && WGTeam[playerid] > 0){
SpawnPlayer(playerid);
}
WGTeam[playerid] = 0;
TextDrawHideForPlayer(playerid, WGtexdr);
TextDrawHideForPlayer(playerid, WGtexdr2);
TextDrawHideForPlayer(playerid, WGtexdr3);
ZapisEv[playerid] = 0;
EvColors(playerid);
SetPlayerTeam(playerid,playerid+10);
SendClientMessage(playerid,COLOR_GREEN,"›› |info| Wypisa?e?(a?) si? z WG !");
return 1;
}
Wysłany: 2016-08-27, 19:48
Iggy
#admin
Wiek: 26 Na forum: 4597 dni Posty: 3469
Nick w MP: Iggy
Piwa : 1716
Administrator: Admin ma zawsze rację | REGULAMIN FORUM | REKLAMA/VIP | .
JestemSuperLIKE , gdy zaczyna si? zabawa dla danego gracza, dajesz jeszcze dodatkowo:
Więcej informacji znajdziesz w Wikipedii SA-MP: SetTimerEx
czyli timer dla gracza i w nim ustawiasz parametry, a nast?pnie w publicu od tego timera formatujesz jaki? ci?g znak?w i wy?wietlasz co tam chcesz w TextDrawie (po prostu zamieniasz tre?? napisu TextDrawa). Po zako?czeniu zabawy dajesz:
Więcej informacji znajdziesz w Wikipedii SA-MP: KillTimer
i to by by?o na tyle.
Wysłany: 2016-08-28, 02:15
JestemSuperLIKE
Początkujący grafik
Wiek: 27 Na forum: 3694 dni Posty: 133
Piwa : 6
Jako? mi nie wychodzi xD. Poprosz? kod i gdzie to mam da?, jeszcze si? nie bawi?em z timerami. xd
Wysłany: 2016-08-28, 10:12
ToxiC.
Wiek: 28 Na forum: 5246 dni Posty: 3792
Piwa : 8590
Co Ci nie wychodzi? Poprosz? Tw?j kod, kt?ry napisa?e?.
Wysłany: 2016-08-28, 11:44
JestemSuperLIKE
Początkujący grafik
Wiek: 27 Na forum: 3694 dni Posty: 133
Piwa : 6
Doda?em timer do publicu WGPlayerEnd i WGoff.
Kod:
forward WGPlayerEnd(playerid);
public WGPlayerEnd(playerid)
{
SetTimerEx("", 2000, false, "WGTimer", playerid);
WGTeam[playerid] = 0;
ZapisEv[playerid] = 0;
PlayerSetColor(playerid);
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid,0);
SetPlayerTeam(playerid,playerid+10);
TextDrawHideForPlayer(playerid, WGtexdr);
TextDrawHideForPlayer(playerid, WGtexdr2);
TextDrawHideForPlayer(playerid, WGtexdr3);
return 1;
}
forward WGoff();
public WGoff()
{
KillTimer(WGTimer);
foreach(Player, x){
WGDMG[x] = 0;
if(ZapisEv[x] == Zapis_WG){
TextDrawHideForPlayer(x, WGtexdr);
TextDrawHideForPlayer(x, WGtexdr2);
TextDrawHideForPlayer(x, WGtexdr3);
PlayerSetColor(x);
LoadPlayerData(x);
ZapisEv[x] = 0;
SetPlayerInterior(x,0);
SetPlayerVirtualWorld(x,0);
StopSpecialAction(x);
}
SetPlayerTeam(x,x+10);
WGTeam[x] = 0;
}
WGLiczba = 0;
WGTeamLiczba[1] = 0;
WGTeamLiczba[2] = 0;
WGON = false;
WGStarted = false;
GangZoneHideForAll(ArenaZone2);
WGZapis();
return 1;
}
Wysłany: 2016-09-04, 14:40
Iggy
#admin
Wiek: 26 Na forum: 4597 dni Posty: 3469
Nick w MP: Iggy
Piwa : 1716
Administrator: Admin ma zawsze rację | REGULAMIN FORUM | REKLAMA/VIP | .
JestemSuperLIKE , ?le u?ywasz timer?w.
Pawn new Timer [ MAX_PLAYERS ];
Timer [ playerid ] = SetTimerEx ( parametry timera );
KillTimer ( Timer [ playerid ]);
Wysłany: 2016-09-04, 17:32
JestemSuperLIKE
Początkujący grafik
Wiek: 27 Na forum: 3694 dni Posty: 133
Piwa : 6
Dzi?kuje. Temat do zamkni?cia.
Tagi: odświeżający :: textdraw :: zabawach :: dm.
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: