Wunsch

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
  • Ich bräuchte dne befehl:


    /god on und /god off


    dann verliert man keine hp


    und dann noch:


    /cargod on und /cargof off


    Dann geht das car nicht kaputt


    2. Wenn man /minigun macht kommt man in eine Lagerhalle mit voller hp und einer minigun.


    3. Es soll angezeit werden wenn man sich portet.


    zb. Dass im Chat steht KinG | Floo hat sich zum LS Airport geportet (/lsap)
    oder KinG | Floo hat sich zur Minigun map geportet (/minigun)

  • 1
    if(strcmp(cmdtext,"/god",true,10) == 0)
    {
    SetPlayerHealth(playerid,99999999);
    SendClientMessage(playerid,FARBE,"God-Mode aktiviert");
    }


    2
    if (strcmp("/minigun", cmdtext, true, 10) == 0)
    {
    new name[MAX_PLAYER_NAME]
    new string[128]
    SetPlayerPos(playerid,x,y,z);//die koords musste eintragen
    ResetPlayerWeapon(playerid);
    GivePlayerWeapon(playerid,38,999); // 38 waffenid glaub das ist die minigun, 999 ist die munition
    GetPlayerName(playerid, name, sizeof(name));
    format(playeid, sizeof(name), "%s ist nun in der MinigunArea(/minigun)", name);
    SendClientMessage(playerid,FARBE,string);
    return 1
    }


    im editor geschrieben es können fehler drin sein

  • return 1;
    if (strcmp("/minigun", cmdtext, true, 10) == 0)
    new name[MAX_PLAYER_NAME]
    new string[128]
    SetPlayerPos(playerid,254,1386.2164,2174.7224);//die koords musste eintragen
    ResetPlayerWeapon(playerid);
    GivePlayerWeapon(playerid,38,999); // 38 waffenid glaub das ist die minigun, 999 ist die munition
    GetPlayerName(playerid, name, sizeof(name));
    format(playeid, sizeof(name), "%s ist nun in der MinigunArea(/minigun)", name);
    SendClientMessage(playerid,FARBE,string);
    return 1
    }
    //---------------------------------------------------------
    ^Kommt C:\Program Files\Rockstar Games\GTA SA SAMP\gamemodes\monster.pwn(412) : warning 225: unreachable code
    C:\Program Files\Rockstar Games\GTA SA SAMP\gamemodes\monster.pwn(413) : error 003: declaration of a local variable must appear in a compound block
    C:\Program Files\Rockstar Games\GTA SA SAMP\gamemodes\monster.pwn(413) : error 017: undefined symbol "name"
    C:\Program Files\Rockstar Games\GTA SA SAMP\gamemodes\monster.pwn(413) : warning 215: expression has no effect
    C:\Program Files\Rockstar Games\GTA SA SAMP\gamemodes\monster.pwn(413) : error 001: expected token: ";", but found "]"
    C:\Program Files\Rockstar Games\GTA SA SAMP\gamemodes\monster.pwn(413) : fatal error 107: too many error messages on one line


    Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    4 Errors.

  • @ Weed:
    Scripting Basics


    @ Philip:
    if (strcmp("/minigun", cmdtext, true) == 0) {
    new name[16];
    new string[84];
    SetPlayerPos(playerid,254,1386.2164,2174.7224);//Coords ändern
    ResetPlayerWeapons(playerid);
    GivePlayerWeapon(playerid,38,99999);
    GetPlayerName(playerid, name, sizeof(name));
    format(string, sizeof(string), "%s ist nun in der MinigunArea(/minigun)", name);
    SendClientMessage(playerid,FARBE,string);
    return 1;
    }

  • Geht imma noch nich:
    :\Program Files\Rockstar Games\GTA SA SAMP\gamemodes\monster.pwn(412) : warning 225: unreachable code
    C:\Program Files\Rockstar Games\GTA SA SAMP\gamemodes\monster.pwn(425) : error 029: invalid expression, assumed zero
    C:\Program Files\Rockstar Games\GTA SA SAMP\gamemodes\monster.pwn(425) : error 004: function "OnPlayerRequestClass" is not implemented
    C:\Program Files\Rockstar Games\GTA SA SAMP\gamemodes\monster.pwn(433) : warning 225: unreachable code
    C:\Program Files\Rockstar Games\GTA SA SAMP\gamemodes\monster.pwn(433) : error 029: invalid expression, assumed zero
    C:\Program Files\Rockstar Games\GTA SA SAMP\gamemodes\monster.pwn(433) : error 004: function "OnPlayerDeath" is not implemented
    C:\Program Files\Rockstar Games\GTA SA SAMP\gamemodes\monster.pwn(445) : warning 225: unreachable code
    C:\Program Files\Rockstar Games\GTA SA SAMP\gamemodes\monster.pwn(445) : error 029: invalid expression, assumed zero
    C:\Program Files\Rockstar Games\GTA SA SAMP\gamemodes\monster.pwn(445) : error 004: function "GameModeExitFunc" is not implemented
    C:\Program Files\Rockstar Games\GTA SA SAMP\gamemodes\monster.pwn(448) : error 030: compound statement not closed at the end of file (started at line 365)
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase

  • Du hast es schon unter OnPlayerCommandText eingefügt oder? ._.


    Hier mal überarbeitet:
    if(strcmp("/minigun", cmdtext, true) == 0) {
    new
    str[64],
    name[16];
    GetPlayerName(playerid, name, sizeof(name));
    format(str, sizeof(str), "%s ist bei Minigun(/minigun)", name);
    SendClientMessageToAll(0xFF00FFFF, str);
    SetPlayerPos(playerid, 0.0/* X Coord*/, 0.0/* Y Coord */, 0.0/* Z Coord */);
    GivePlayerWeapon(playerid, 38, 99999);
    SetPlayerHealth(playerid, 100.0);
    SetPlayerArmour(playerid, 100.0);
    return 1;
    }

  • Natürlich ich bin ja nicht blöd xD
    if(strcmp("/minigun", cmdtext, true) == 0) {
     new
      str[64],
      name[16];
     GetPlayerName(playerid, name, sizeof(name));
     format(str, sizeof(str), "%s ist bei Minigun(/minigun)", name);
     SendClientMessageToAll(0xFF00FFFF, str);
     SetPlayerPos(playerid, 0.0254, 0.01386.2164, 0.02174.7224);
     GivePlayerWeapon(playerid, 38, 99999);
     SetPlayerHealth(playerid, 100.0);
     SetPlayerArmour(playerid, 100.0);
     return 1;
     }
    //---------------------------------------------------------



    Kommt:
    C:\Program Files\Rockstar Games\GTA SA SAMP\gamemodes\monster.pwn(413) : warning 225: unreachable code
    C:\Program Files\Rockstar Games\GTA SA SAMP\gamemodes\monster.pwn(420) : error 001: expected token: ",", but found "."
    C:\Program Files\Rockstar Games\GTA SA SAMP\gamemodes\monster.pwn(420) : error 029: invalid expression, assumed zero
    C:\Program Files\Rockstar Games\GTA SA SAMP\gamemodes\monster.pwn(420) : warning 215: expression has no effect
    C:\Program Files\Rockstar Games\GTA SA SAMP\gamemodes\monster.pwn(420) : warning 215: expression has no effect
    C:\Program Files\Rockstar Games\GTA SA SAMP\gamemodes\monster.pwn(420) : error 001: expected token: ";", but found "."
    C:\Program Files\Rockstar Games\GTA SA SAMP\gamemodes\monster.pwn(420) : fatal error 107: too many error messages on one line


    Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase

  • besser
    forward Heal(playerid);


    if(strcmp("/minigun", cmdtext, true) == 0) {
    new
    str[64],
    name[16];
    GetPlayerName(playerid, name, sizeof(name));
    format(str, sizeof(str), "%s ist bei Minigun(/minigun)", name);
    SendClientMessageToAll(0xFF00FFFF, str);
    SetPlayerPos(playerid, 0.0/* X Coord*/, 0.0/* Y Coord */, 0.0/* Z Coord */);
    GivePlayerWeapon(playerid, 38, 99999);
    SetPlayerHealth(playerid,200.0);
    SetPlayerArmor(playerid,20000.0);
    SetTimerEx("Heal",1000,1,"i",playerid);//um health neu zu setzen
    return 1;
    }


    public Heal(playerid)
    {
    SetPlayerHealth(playerid,200.0);
    SetPlayerArmor(playerid,20000.0);
    return 1;
    }

    you have been Traceured.


  • :\Program Files\Rockstar Games\GTA SA SAMP\gamemodes\monster.pwn(413) : warning 225: unreachable code
    C:\Program Files\Rockstar Games\GTA SA SAMP\gamemodes\monster.pwn(420) : error 001: expected token: ",", but found "."
    C:\Program Files\Rockstar Games\GTA SA SAMP\gamemodes\monster.pwn(420) : error 029: invalid expression, assumed zero
    C:\Program Files\Rockstar Games\GTA SA SAMP\gamemodes\monster.pwn(420) : warning 215: expression has no effect
    C:\Program Files\Rockstar Games\GTA SA SAMP\gamemodes\monster.pwn(420) : warning 215: expression has no effect
    C:\Program Files\Rockstar Games\GTA SA SAMP\gamemodes\monster.pwn(420) : error 001: expected token: ";", but found "."
    C:\Program Files\Rockstar Games\GTA SA SAMP\gamemodes\monster.pwn(420) : fatal error 107: too many error messages on one line


    Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    4 Errors.


    BEI:
    if(strcmp("/minigun", cmdtext, true) == 0) {
    new
      str[64],
      name[16];
    GetPlayerName(playerid, name, sizeof(name));
    format(str, sizeof(str), "%s ist bei Minigun(/minigun)", name);
    SendClientMessageToAll(0xFF00FFFF, str);
    SetPlayerPos(playerid, 0.0254, 0.01386.2164, 0.02174.7224);
    GivePlayerWeapon(playerid, 38, 99999);
    SetPlayerHealth(playerid,200.0);
    SetPlayerArmor(playerid,20000.0);
    SetTimerEx("Heal",1000,1,"i",playerid);//um health neu zu setzen
    return 1;
    }


    public Heal(playerid)
    {
    SetPlayerHealth(playerid,200.0);
     SetPlayerArmor(playerid,20000.0);
    return 1;
    }
    //---------------------------------------------------------

    Habe Oben auch geforwarded

  • do.de - Domain-Offensive - Domains für alle und zu super Preisen
  • Em?
    Sorry für die Störung
    aber wth is das?
    SetPlayerPos(playerid, 0.0254, 0.01386.2164, 0.02174.7224);



    das sind doch keine koordinaten.
    SetPlayerPos(playerid, X,Y,Z);



    füg da mal deine Koordinaten ein
    z.b.
    SetPlayerPos(playerid, 123.456, 123.456, 123.456);

  • kommen dauernd fehler^^
    egal danke für die hilfe kb mehr^^
    :\Program Files\Rockstar Games\GTA SA SAMP\gamemodes\monster.pwn(404) : error 017: undefined symbol "name"
    C:\Program Files\Rockstar Games\GTA SA SAMP\gamemodes\monster.pwn(404) : error 017: undefined symbol "name"
    C:\Program Files\Rockstar Games\GTA SA SAMP\gamemodes\monster.pwn(404) : error 029: invalid expression, assumed zero
    C:\Program Files\Rockstar Games\GTA SA SAMP\gamemodes\monster.pwn(404) : fatal error 107: too many error messages on one line


    Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


    Kommt bei:


    if(strcmp(cmdtext,"/spawn",true)==0)
    {
    if(GetPlayerState(playerid) == 2)
    {
    SetVehiclePos(GetPlayerVehicleID(playerid),388.8238,2542.3767,16.5391);
    }
    else
    {
    SetPlayerPos(playerid,388.8238,2542.3767,16.5391);
    GetPlayerName(playerid, name, sizeof(name));
    format(playeid, sizeof(name), "%s ist nun beim Spawn /spawn)", name);
    SendClientMessage(playerid,COLOR_LEE,string);
    }
    return 1;



    ??

  • if(strcmp("/minigun", cmdtext, true) == 0)
    {
    new
    str[64],
    name[16];
    GetPlayerName(playerid, name, sizeof(name));
    format(str, sizeof(str), "%s ist bei Minigun(/minigun)", name);
    SendClientMessageToAll(0xFF00FFFF, str);
    SetPlayerPos(playerid, 0.0254, 0.01386, 0.02174);
    GivePlayerWeapon(playerid, 38, 99999);
    SetPlayerHealth(playerid,200.0);
    SetPlayerArmour(playerid,20000.0);
    SetTimerEx("Heal",1000,1,"i",playerid);//um health neu zu setzen
    return 1;
    }


    Bittesehr so geht es zu 1000% habe selbst keine errors

  • danke geht
    EDIT: KOmmt ein fehler nämlich:


    C:\Program Files\Rockstar Games\GTA SA SAMP\gamemodes\monster.pwn(413) : warning 225: unreachable code
    C:\Program Files\Rockstar Games\GTA SA SAMP\gamemodes\monster.pwn(428) : warning 209: function "OnPlayerCommandText" should return a value
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    if(strcmp("/minigun", cmdtext, true) == 0)
    {
    new
    str[64],
    name[16];
    GetPlayerName(playerid, name, sizeof(name));
    format(str, sizeof(str), "%s ist bei Minigun(/minigun)", name);
    SendClientMessageToAll(0xFF00FFFF, str);
    SetPlayerPos(playerid, 0.0254, 0.01386, 0.02174);
    GivePlayerWeapon(playerid, 38, 99999);
    SetPlayerHealth(playerid,200.0);
    SetPlayerArmour(playerid,20000.0);
    SetTimerEx("Heal",1000,1,"i",playerid);//um health neu zu setzen
    return 1;
    }
    }

    Einmal editiert, zuletzt von KinG | Philip ()

  • Kannste nicht mal Copy & Paste machen oO?
    Du hast eine Klammer zu viel.
    Aber wenn de den Befehl am ende on OnPlayerCommandText hast,
    dann machs so


    if(strcmp("/minigun", cmdtext, true) == 0)
    {
    new
    str[64],
    name[16];
    GetPlayerName(playerid, name, sizeof(name));
    format(str, sizeof(str), "%s ist bei Minigun(/minigun)", name);
    SendClientMessageToAll(0xFF00FFFF, str);
    SetPlayerPos(playerid, 0.0254, 0.01386, 0.02174);
    GivePlayerWeapon(playerid, 38, 99999);
    SetPlayerHealth(playerid,200.0);
    SetPlayerArmour(playerid,20000.0);
    SetTimerEx("Heal",1000,1,"i",playerid);//um health neu zu setzen
    return 1;
    }
    return 1;
    }

  • OnPlayerCommandText sollte immer false returnen.....

  • Lezter fehler:
    C:\Program Files\Rockstar Games\GTA SA SAMP\gamemodes\monster.pwn(413) : warning 225: unreachable code
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


    Der Script:


    if(strcmp("/minigun", cmdtext, true) == 0)
      {
     new
      str[64],
      name[16];
     GetPlayerName(playerid, name, sizeof(name));
     format(str, sizeof(str), "%s ist bei Minigun(/minigun)", name);
     SendClientMessageToAll(0xFF00FFFF, str);
     SetPlayerPos(playerid, 0.0254, 0.01386, 0.02174);
     GivePlayerWeapon(playerid, 38, 99999);
     SetPlayerHealth(playerid,200.0);
     SetPlayerArmour(playerid,20000.0);
     SetTimerEx("Heal",1000,1,"i",playerid);//um health neu zu setzen
     return 1;
     }
    return 1;
     }



    413 is da wo /minigun is

  • if(strcmp("/minigun", cmdtext, true) == 0)
    {
    new
    str[64],
    name[16];
    GetPlayerName(playerid, name, sizeof(name));
    format(str, sizeof(str), "%s ist bei Minigun(/minigun)", name);
    SendClientMessageToAll(0xFF00FFFF, str);
    SetPlayerPos(playerid, 0.0254, 0.01386, 0.02174);
    GivePlayerWeapon(playerid, 38, 99999);
    SetPlayerHealth(playerid,200.0);
    SetPlayerArmour(playerid,20000.0);
    SetTimerEx("Heal",1000,1,"i",playerid);//um health neu zu setzen
    return true;
    }
    return 1;
    }

  • if(strcmp("/minigun", cmdtext, true) == 0)
    {
    new
    str[64],
    name[16];
    GetPlayerName(playerid, name, sizeof(name));
    format(str, sizeof(str), "%s ist bei Minigun(/minigun)", name);
    SendClientMessageToAll(0xFF00FFFF, str);
    SetPlayerPos(playerid, 0.0254, 0.01386, 0.02174);
    GivePlayerWeapon(playerid, 38, 99999);
    SetPlayerHealth(playerid,200.0);
    SetPlayerArmour(playerid,20000.0);
    SetTimerEx("Heal",1000,1,"i",playerid);//um health neu zu setzen
    return true;
    }


    bei mir kamen keine errors, sollte funktionieren

  • do.de - Domain-Offensive - Domains für alle und zu super Preisen