Automatischen Befehl

Wichtiger Hinweis: Bitte ändert nicht manuell die Schriftfarbe auf schwarz sondern belasst es bei der Standardeinstellung. Somit tragt ihr dazu bei dass euer Text auch bei Verwendung unseren dunklen Forenstils noch lesbar ist!

Tipp: Ihr wollt längere Codeausschnitte oder Logfiles bereitstellen? Benutzt unseren eigenen PasteBin-Dienst Link
  • Wie kann ich einen Befehl automatisch nach einer bestimmte Zeit "tippen" lassen? Wäre wichtig.

  • vllt. nen Beispiel. WÄre nett? z.b. mit /startlotto oder so.

  • Sagen wir der Befehl /startlotto sieht so aus:
    if(strcmp(cmdtext,"/startlotto",true) == 0)
    {
    SendClientMessage(playerid,0xFF0000FF,"Lotto ist gestartet!");
    return 1;
    }


    Jetzt machen wir einen Timer, also oben bei Includes:
    forward StartLotto(playerid);


    OnGameModeInit:
    SetTimer("StartLotto",zeit in ms wann es immer sein soll,1);


    Ausserhalb jeden Callbacks:
    public StartLotto(playerid)
    {
    // und hier halt ebend das aus dem Befehl:
    SendClientMessage(playerid,0xFF0000FF,"Lotto ist gestartet!");
    }


  • public StartLotto(playerid)
    {
    if(strcmp(cmd, "/startlotto", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    format(string, sizeof(string), "Lottery News: We have started the Lottery Election.");
    OOCOff(COLOR_WHITE, string);
    new rand = random(80);
    if(rand < 77) { rand += 3; }
    Lotto(rand);
    }

    }
    return 1;
    }
    }

  • Nei...xD


    public StartLotto(playerid)
    {
    if(IsPlayerConnected(playerid))
    {
    format(string, sizeof(string), "Lottery News: We have started the Lottery Election.");
    OOCOff(COLOR_WHITE, string);
    new rand = random(80);
    if(rand < 77) { rand += 3; }
    Lotto(rand);
    }
    }

  • do.de - Domain-Offensive - Domains für alle und zu super Preisen
  • J:\Dokumente\Pawno, Script etc\Pawno\pawno\include\utils.inc(1) : warning 219: local variable "string" shadows a variable at a preceding level
    J:\Dokumente\Pawno, Script etc\Server\Filterscripts\Legendary.pwn(1663) : warning 219: local variable "string" shadows a variable at a preceding level
    J:\Dokumente\Pawno, Script etc\Server\Filterscripts\Legendary.pwn(2915) : warning 219: local variable "string" shadows a variable at a preceding level
    J:\Dokumente\Pawno, Script etc\Server\Filterscripts\Legendary.pwn(3122) : warning 219: local variable "string" shadows a variable at a preceding level
    J:\Dokumente\Pawno, Script etc\Server\Filterscripts\Legendary.pwn(3222) : warning 219: local variable "string" shadows a variable at a preceding level
    J:\Dokumente\Pawno, Script etc\Server\Filterscripts\Legendary.pwn(3720) : warning 219: local variable "string" shadows a variable at a preceding level
    J:\Dokumente\Pawno, Script etc\Server\Filterscripts\Legendary.pwn(4249) : warning 219: local variable "string" shadows a variable at a preceding level
    J:\Dokumente\Pawno, Script etc\Server\Filterscripts\Legendary.pwn(5179) : warning 219: local variable "string" shadows a variable at a preceding level
    J:\Dokumente\Pawno, Script etc\Server\Filterscripts\Legendary.pwn(5919) : warning 219: local variable "string" shadows a variable at a preceding level
    J:\Dokumente\Pawno, Script etc\Server\Filterscripts\Legendary.pwn(25025) : warning 217: loose indentation
    J:\Dokumente\Pawno, Script etc\Server\Filterscripts\Legendary.pwn(25315) : warning 217: loose indentation
    J:\Dokumente\Pawno, Script etc\Server\Filterscripts\Legendary.pwn(26974) : warning 219: local variable "string" shadows a variable at a preceding level
    J:\Dokumente\Pawno, Script etc\Server\Filterscripts\Legendary.pwn(28934) : warning 219: local variable "string" shadows a variable at a preceding level
    J:\Dokumente\Pawno, Script etc\Server\Filterscripts\Legendary.pwn(28983) : warning 219: local variable "string" shadows a variable at a preceding level
    J:\Dokumente\Pawno, Script etc\Server\Filterscripts\Legendary.pwn(29017) : warning 219: local variable "string" shadows a variable at a preceding level
    J:\Dokumente\Pawno, Script etc\Server\Filterscripts\Legendary.pwn(29101) : warning 219: local variable "string" shadows a variable at a preceding level
    J:\Dokumente\Pawno, Script etc\Server\Filterscripts\Legendary.pwn(29221) : warning 219: local variable "string" shadows a variable at a preceding level
    J:\Dokumente\Pawno, Script etc\Server\Filterscripts\Legendary.pwn(29254) : warning 219: local variable "string" shadows a variable at a preceding level
    J:\Dokumente\Pawno, Script etc\Server\Filterscripts\Legendary.pwn(29689) : warning 219: local variable "string" shadows a variable at a preceding level
    J:\Dokumente\Pawno, Script etc\Server\Filterscripts\Legendary.pwn(29729) : warning 219: local variable "string" shadows a variable at a preceding level
    J:\Dokumente\Pawno, Script etc\Server\Filterscripts\Legendary.pwn(29747) : warning 219: local variable "string" shadows a variable at a preceding level
    J:\Dokumente\Pawno, Script etc\Server\Filterscripts\Legendary.pwn(29762) : warning 219: local variable "string" shadows a variable at a preceding level
    J:\Dokumente\Pawno, Script etc\Server\Filterscripts\Legendary.pwn(29796) : warning 219: local variable "string" shadows a variable at a preceding level
    J:\Dokumente\Pawno, Script etc\Server\Filterscripts\Legendary.pwn(29823) : warning 219: local variable "string" shadows a variable at a preceding level
    J:\Dokumente\Pawno, Script etc\Server\Filterscripts\Legendary.pwn(29928) : warning 219: local variable "string" shadows a variable at a preceding level
    J:\Dokumente\Pawno, Script etc\Server\Filterscripts\Legendary.pwn(29948) : warning 219: local variable "string" shadows a variable at a preceding level
    J:\Dokumente\Pawno, Script etc\Server\Filterscripts\Legendary.pwn(30000) : warning 219: local variable "string" shadows a variable at a preceding level
    J:\Dokumente\Pawno, Script etc\Server\Filterscripts\Legendary.pwn(30020) : warning 219: local variable "string" shadows a variable at a preceding level
    J:\Dokumente\Pawno, Script etc\Server\Filterscripts\Legendary.pwn(30083) : warning 219: local variable "string" shadows a variable at a preceding level
    J:\Dokumente\Pawno, Script etc\Server\Filterscripts\Legendary.pwn(30176) : warning 219: local variable "string" shadows a variable at a preceding level
    J:\Dokumente\Pawno, Script etc\Server\Filterscripts\Legendary.pwn(30491) : warning 219: local variable "string" shadows a variable at a preceding level
    J:\Dokumente\Pawno, Script etc\Server\Filterscripts\Legendary.pwn(30506) : warning 219: local variable "string" shadows a variable at a preceding level
    J:\Dokumente\Pawno, Script etc\Server\Filterscripts\Legendary.pwn(30521) : warning 219: local variable "string" shadows a variable at a preceding level
    J:\Dokumente\Pawno, Script etc\Server\Filterscripts\Legendary.pwn(30536) : warning 219: local variable "string" shadows a variable at a preceding level
    J:\Dokumente\Pawno, Script etc\Server\Filterscripts\Legendary.pwn(30636) : warning 219: local variable "string" shadows a variable at a preceding level
    J:\Dokumente\Pawno, Script etc\Server\Filterscripts\Legendary.pwn(31090) : warning 219: local variable "string" shadows a variable at a preceding level
    J:\Dokumente\Pawno, Script etc\Server\Filterscripts\Legendary.pwn(31287) : warning 219: local variable "string" shadows a variable at a preceding level
    J:\Dokumente\Pawno, Script etc\Server\Filterscripts\Legendary.pwn(32015) : warning 219: local variable "string" shadows a variable at a preceding level
    J:\Dokumente\Pawno, Script etc\Server\Filterscripts\Legendary.pwn(32052) : warning 219: local variable "string" shadows a variable at a preceding level
    J:\Dokumente\Pawno, Script etc\Server\Filterscripts\Legendary.pwn(32578) : warning 219: local variable "string" shadows a variable at a preceding level
    J:\Dokumente\Pawno, Script etc\Server\Filterscripts\Legendary.pwn(32642) : warning 219: local variable "string" shadows a variable at a preceding level
    J:\Dokumente\Pawno, Script etc\Server\Filterscripts\Legendary.pwn(32684) : warning 219: local variable "string" shadows a variable at a preceding level
    J:\Dokumente\Pawno, Script etc\Server\Filterscripts\Legendary.pwn(32755) : warning 219: local variable "string" shadows a variable at a preceding level
    J:\Dokumente\Pawno, Script etc\Server\Filterscripts\Legendary.pwn(32842) : warning 219: local variable "string" shadows a variable at a preceding level
    J:\Dokumente\Pawno, Script etc\Server\Filterscripts\Legendary.pwn(32881) : warning 219: local variable "string" shadows a variable at a preceding level
    J:\Dokumente\Pawno, Script etc\Server\Filterscripts\Legendary.pwn(33005) : warning 219: local variable "string" shadows a variable at a preceding level
    J:\Dokumente\Pawno, Script etc\Server\Filterscripts\Legendary.pwn(33064) : warning 219: local variable "string" shadows a variable at a preceding level
    J:\Dokumente\Pawno, Script etc\Server\Filterscripts\Legendary.pwn(33075) : warning 219: local variable "string" shadows a variable at a preceding level
    J:\Dokumente\Pawno, Script etc\Server\Filterscripts\Legendary.pwn(33096) : warning 219: local variable "string" shadows a variable at a preceding level
    J:\Dokumente\Pawno, Script etc\Server\Filterscripts\Legendary.pwn(33115) : warning 219: local variable "string" shadows a variable at a preceding level
    J:\Dokumente\Pawno, Script etc\Server\Filterscripts\Legendary.pwn(33134) : warning 219: local variable "string" shadows a variable at a preceding level
    J:\Dokumente\Pawno, Script etc\Server\Filterscripts\Legendary.pwn(33153) : warning 219: local variable "string" shadows a variable at a preceding level
    J:\Dokumente\Pawno, Script etc\Server\Filterscripts\Legendary.pwn(33173) : warning 219: local variable "string" shadows a variable at a preceding level
    J:\Dokumente\Pawno, Script etc\Server\Filterscripts\Legendary.pwn(33192) : warning 219: local variable "string" shadows a variable at a preceding level
    J:\Dokumente\Pawno, Script etc\Server\Filterscripts\Legendary.pwn(33211) : warning 219: local variable "string" shadows a variable at a preceding level
    J:\Dokumente\Pawno, Script etc\Server\Filterscripts\Legendary.pwn(33233) : warning 219: local variable "string" shadows a variable at a preceding level
    J:\Dokumente\Pawno, Script etc\Server\Filterscripts\Legendary.pwn(33255) : warning 219: local variable "string" shadows a variable at a preceding level
    J:\Dokumente\Pawno, Script etc\Server\Filterscripts\Legendary.pwn(33273) : warning 219: local variable "string" shadows a variable at a preceding level
    J:\Dokumente\Pawno, Script etc\Server\Filterscripts\Legendary.pwn(33293) : warning 219: local variable "string" shadows a variable at a preceding level
    J:\Dokumente\Pawno, Script etc\Server\Filterscripts\Legendary.pwn(33313) : warning 219: local variable "string" shadows a variable at a preceding level
    J:\Dokumente\Pawno, Script etc\Server\Filterscripts\Legendary.pwn(33476) : warning 219: local variable "string" shadows a variable at a preceding level
    J:\Dokumente\Pawno, Script etc\Server\Filterscripts\Legendary.pwn(33615) : warning 219: local variable "string" shadows a variable at a preceding level
    J:\Dokumente\Pawno, Script etc\Server\Filterscripts\Legendary.pwn(34894) : warning 235: public function lacks forward declaration (symbol "DefineSanitaryCoords")
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


    Header size: 7028 bytes
    Code size: 1485660 bytes
    Data size: 2394360 bytes
    Stack/heap size: 16384 bytes; estimated max. usage=4904 cells (19616 bytes)
    Total requirements: 3903432 bytes


    63 Warnings.

  • O.O löl
    Irgendwie einige Klammerfehler? O_O
    EDIT: Du hast den new string oben reingehaun.
    Beim public rein!!!


    public StartLotto(playerid)
    {
    if(IsPlayerConnected(playerid))
    {
    new string[100];
    format(string, sizeof(string), "Lottery News: We have started the Lottery Election.");
    OOCOff(COLOR_WHITE, string);
    new rand = random(80);
    if(rand < 77) { rand += 3; }
    Lotto(rand);
    }
    }

  • Zitiere:
    Du hast den new string oben reingehaun.
    Beim public rein!!!


    public StartLotto(playerid)
    {
    if(IsPlayerConnected(playerid))
    {
    new string[100];
    format(string, sizeof(string), "Lottery News: We have started the Lottery Election.");
    OOCOff(COLOR_WHITE, string);
    new rand = random(80);
    if(rand < 77) { rand += 3; }
    Lotto(rand);
    }
    }


  • So gab nen anderen Fehler habs aber trotzdem danke. Geht einfach xD mir war nur nicht mehr klar wie das mit befehl automatisch macht^^