GTA Közösség - A magyar GTA fórum

San Andreas Multiplayer (SA-MP) => SA-MP: Szerverfejlesztés => Segítségkérés => A témát indította: Pioneer - 2011. július 23. - 14:15:38

Cím: Mode váltás timerrel.
Írta: Pioneer - 2011. július 23. - 14:15:38
Hali azt hogy tudnám megcsinálni 1 timerrel hogy 10 percenként váltson Gamemodot automatikusan?
és lenne 1 textdraw ami mindig visszaszámol 10 perctõl. elõre is köszi.,
Cím: Mode váltás timerrel.
Írta: jana4 - 2011. július 23. - 14:17:52
[pawn]
new mt;
public ModCsere();
mt = SetTimer(\"ModCsere\", 10*60000, true);
public ModCsere()
{
    SendRconCommand(\"changemode MODNEVE\");
    return 1;
}
[/pawn]
Cím: Mode váltás timerrel.
Írta: Pioneer - 2011. július 23. - 14:33:12
Király. még annyit tudnál hogy a visszaszámlállót?
Cím: Mode váltás timerrel.
Írta: George Santiago - 2011. július 23. - 14:43:56

Ebbe van egy timer textdrawwal, ami 10 perc után vált mapot

Nem én csináltam csak találtam, már nem emlékszem hol.

 
 
http://www.megaupload.com/?d=PX9FBU0L
Cím: Mode váltás timerrel.
Írta: Pioneer - 2011. július 23. - 14:54:13
van 1 kis problem  ScreaM
 

(30) : error 010: invalid function or declaration

 
30 as sor:
mt = SetTimer(\"ModCsere\", 10*6000, true);
Cím: Mode váltás timerrel.
Írta: jana4 - 2011. július 23. - 14:58:29
new mt; -t bárhova csak ne funkciókba rakd, a settimert pedig az OnGameModeInit vagy az OnFilterScriptInit alá helyezd.
Cím: Mode váltás timerrel.
Írta: Pioneer - 2011. július 23. - 15:11:05
Igy csináltam meg:
GM elejére:
 

new mt;

 
Mode elejére
 

public ModCsere();
 
public ModCsere()
{
    SendRconCommand(\"changemode mode1\");
    return 1;
}

 
OnGamemodeInit alá:
 

mt = SetTimer(\"ModCsere\", 10*6000, true);

 
Igy 1 warning:
 

warning 204: symbol is assigned a value that is never used: \"mt\"

 
Így jó amugy?
Cím: Mode váltás timerrel.
Írta: George Santiago - 2011. július 23. - 15:19:44
Idézetet írta: Pioneer date=1311426665\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"9793\" data-ipsquote-contentclass=\"forums_Topic
Igy csináltam meg:
Mode elejére
 

public ModCsere();
 
public ModCsere()
{
    SendRconCommand(\"changemode mode1\");
    return 1;
}

 

Helyett:
 

forward ModCsere();
 
public ModCsere()
{
    SendRconCommand(\"changemode mode1\");
    return 1;
}

 
Ja És:
 

public OnGameModeExit()
{
KillTimer(mt);
}
Cím: Mode váltás timerrel.
Írta: jana4 - 2011. július 24. - 13:17:17
Idézetet írta: George Santiago date=1311427184\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"9793\" data-ipsquote-contentclass=\"forums_Topic
Ja És:
 

public OnGameModeExit()
{
KillTimer(mt);
}

 

Hányszor mondjam még el nektek, hogy PUBLIC-al is jó? Nem csak forwarddal!!

Ja és KillTimeres dolgot valóban kihagytam, sry.
Cím: Mode váltás timerrel.
Írta: GroX - 2011. július 24. - 14:06:53
Idézetet írta: ScreaM date=1311506237\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"9793\" data-ipsquote-contentclass=\"forums_Topic


Ja És:
 

public OnGameModeExit()
{
KillTimer(mt);
}

 

Hányszor mondjam még el nektek, hogy PUBLIC-al is jó? Nem csak forwarddal!!

Ja és KillTimeres dolgot valóban kihagytam, sry.

 
[/quote]
Ezt azoknak hiába mondod, akik csak a script nyelveket tanulják meg.
Cím: Mode váltás timerrel.
Írta: George Santiago - 2011. július 24. - 14:53:32
Idézetet írta: ScreaM date=1311506237\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"9793\" data-ipsquote-contentclass=\"forums_Topic


Ja És:
 

public OnGameModeExit()
{
KillTimer(mt);
}

 

Hányszor mondjam még el nektek, hogy PUBLIC-al is jó? Nem csak forwarddal!!

Ja és KillTimeres dolgot valóban kihagytam, sry.

 
[/quote]
Bocs, ezt tényleg nem tudtam de köszi, már tudom