Unter public OnPlayerCommandText(playerid, cmdtext[]):
if (strcmp("/spamon", cmdtext, true) == 0)
{
SetTimer("Spam0",500,1);
SetTimer("Spam1",1000,1);
}
if (strcmp("/spamoff", cmdtext, true) == 0)
{
KillTimer("Spam0");
KillTimer("Spam1");
}
Dann ganz unten:
forward Spam0();
public Spam0()
{
SendClientMessageToAll(0xFF0000,"0");
return 1;
}
forward Spam1();
public Spam1()
{
SendClientMessageToAll(0xFF0000,"1");
return 1;
}
//Edit: Fehler im Code