Godmode

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
  • //edit, ups hab net richtig gelesen, ^^ ^^
    Hier:
    if (strcmp("/godemodeon", cmdtext, true, 10) == 0)
    {

    new playrname[MAX_PLAYER_NAME];
    new pname[MAX_PLAYER_NAME];
    new string[100];
    SetPlayerHealth(playerid, 0x7F800000);
    GetPlayerName(playerid, pname, sizeof(pname));
    format(string, sizeof(string), "%s Godmode: ON!", pname);
    SendClientMessageToAll(0xFFFF00AA, string);
    GetPlayerName(playerid, playrname, sizeof(playrname));
    return 1;
    }



    if (strcmp("/godemodeaus", cmdtext, true, 10) == 0)
    {
    new playrname[MAX_PLAYER_NAME];
    new pname[MAX_PLAYER_NAME];
    new string[100];
    SetPlayerHealth(playerid, 100);
    GetPlayerName(playerid, pname, sizeof(pname));
    format(string, sizeof(string), "%s Godmode: OFF!", pname);
    SendClientMessageToAll(0xFFFF00AA, string);
    GetPlayerName(playerid, playrname, sizeof(playrname));
    return 1;
    }

    :D Was schaut ihr mich alle an??? Ich bin auch nur eine Signatur :D

    Einmal editiert, zuletzt von Ghosty_101 ()

  • Was postest du denn da? O.o
    Wofür 2 mal getplayername? Was soll SetPlayerHealth(playerid, 0x7F800000) bewirken O.o und was hat das mit einem Godmode zu tun???


    Ungetestet:
    new GodMode[MAX_PLAYERS];
    COMMAND:godmode(playerid,params[])
    {
    #pragma unused params
    if(GetPVarInt(playerid,"GodMode")==0)
    {
    SendClientMessage(playerid,FARBE_GRÜN,"Godmode [AN]");
    SetPVarInt(playerid,"GodMode",1);
    GodMode[playerid] = SetTimerEx("GodModeDelay",1000,true,"i",playerid);
    }
    else
    {
    SendClientMessage(playerid,FARBE_ROT,"Godmode [AUS]");
    SetPVarInt(playerid,"GodMode",0);
    KillTimer(GodMode[playerid]);
    }
    return 1;
    }
    forward GodModeDelay(playerid);
    public GodModeDelay(playerid)
    {
    SetPlayerHealth(playerid, 100);
    }

    The fact is, I am right. And if you think I'm wrong, you are wrong.

  • if(strcmp("/godon",cmdtext,true) == 0)
    {
    new string[128];
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));
    format(string, sizeof(string), "Server: Player %s has activated the Godmode!",name);
    SendClientMessageToAll(COLOR_LIGHTRED, string);
    SetTimerEx("GodMod",250,true,"i",playerid)
    return 1;
    }


    if(strcmp("/godoff",cmdtext,true) == 0)
    {
    new string[128];
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));
    format(string, sizeof(string), "Server: Player %s has deactivated the Godmode!",name);
    SendClientMessageToAll(COLOR_LIGHTRED, string);
    KillTimer("GodMod");
    return 1;
    }



    forward GodMod(playerid);


    public GodMod(playerid);
    {
    SetPlayerHealth(playerid,1000);
    SetPlayerArmour(playerid,1000);
    return 1;
    }


    mfg ]B4E[kengston

  • xD^^


    hier noch ganz einfach! Das hält auch viel aus:


    if(strcmp("/godon",cmdtext,true) == 0)
    {
    SetPlayerHealth(playerid,999999999999999999999999999999999999.0);
    SendClientMessage(playerid,COLOR_LIGHTRED,"Server: Godmode activated!");
    return 1;
    }


    if(strcmp("/godoff",cmdtext,true) == 0)
    {
    SetPlayerHealth(playerid,100.0);
    SendClientMessage(playerid,COLOR_LIGHTRED,"Server: Godmode deactivated!");
    return 1;
    }

  • Vielen Dank funkts Super achja und das ist auch das einzigste was Funktioniert :D