hiho leute
ich hab ne frage, wie mache ich das mein server 3 namen hat,
also das der Server Name/Host name alle 5 sekunden sich ändert in 3 verschiedene namen.
lg
hiho leute
ich hab ne frage, wie mache ich das mein server 3 namen hat,
also das der Server Name/Host name alle 5 sekunden sich ändert in 3 verschiedene namen.
lg
3 Timer:
Timer 1 = 1 Minute
Timer 2 = 2Minuten
Timer 3 = 3minuten
Public 1 = Rcon Befehl " Hostname Blabla...
Public 2 = Rcon Befehl Hostname Blabla...
Umgefähr in der art.
Alles anzeigen3 Timer:
Timer 1 = 1 Minute
Timer 2 = 2Minuten
Timer 3 = 3minuten
Public 1 = Rcon Befehl " Hostname Blabla...
Public 2 = Rcon Befehl Hostname Blabla...
Umgefähr in der art.
Viel zu umständlich/ressourcenfressend...
Besser:
new name;
SetTimer("Namechange",5000,1);
public Namechange();
{
if(name == 0)
{
SendRconCommand("hostname text1");
name = 1;
return 1;
}
if(name == 1)
{
SendRconCommand("hostname text2");
name = 2;
return 1;
}
if(name == 2)
{
SendRconCommand("hostname text3");
name = 0;
return 1;
}
forward ChangeServerName();
new Counter;
public OnGameModeInit()
{
SetTimer("ChangeServerName", 5000, 1);
return 1;
}
public ChangeServerName()
{
if (Counter == 0)
{
SendRconCommand("hostname Server Name 1");
Counter ++;
}
else if (Counter == 1)
{
SendRconCommand("hostname Server Name 2");
Counter ++;
}
else if (Counter == 2)
{
SendRconCommand("hostname Server Name 3");
Counter = 0;
}
return 1;
}
C:\Users\Sahin\Desktop\Server Ordner\samp03asvr_R5 Server\gamemodes\guardv2.pwn(139) : warning 219: local variable "name" shadows a variable at a preceding level
C:\Users\Sahin\Desktop\Server Ordner\samp03asvr_R5 Server\gamemodes\guardv2.pwn(203) : warning 219: local variable "name" shadows a variable at a preceding level
C:\Users\Sahin\Desktop\Server Ordner\samp03asvr_R5 Server\gamemodes\guardv2.pwn(866) : warning 219: local variable "name" shadows a variable at a preceding level
C:\Users\Sahin\Desktop\Server Ordner\samp03asvr_R5 Server\gamemodes\guardv2.pwn(3300) : error 055: start of function body without function header
C:\Users\Sahin\Desktop\Server Ordner\samp03asvr_R5 Server\gamemodes\guardv2.pwn(3301) : error 010: invalid function or declaration
C:\Users\Sahin\Desktop\Server Ordner\samp03asvr_R5 Server\gamemodes\guardv2.pwn(3305) : error 010: invalid function or declaration
C:\Users\Sahin\Desktop\Server Ordner\samp03asvr_R5 Server\gamemodes\guardv2.pwn(3307) : error 010: invalid function or declaration
C:\Users\Sahin\Desktop\Server Ordner\samp03asvr_R5 Server\gamemodes\guardv2.pwn(3311) : error 010: invalid function or declaration
C:\Users\Sahin\Desktop\Server Ordner\samp03asvr_R5 Server\gamemodes\guardv2.pwn(3313) : error 010: invalid function or declaration
C:\Users\Sahin\Desktop\Server Ordner\samp03asvr_R5 Server\gamemodes\guardv2.pwn(3317) : error 010: invalid function or declaration
C:\Users\Sahin\Desktop\Server Ordner\samp03asvr_R5 Server\gamemodes\guardv2.pwn(3319) : warning 203: symbol is never used: "name"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
7 Errors.
nenne die varriablen "name" um zu z.b. servername
anscheinend haste sie schonmal verwendet
probier mal das, was ich gepostet hab
thx blokk klappt
-erledigt