Stupid textdraws...
#10

pawn Код:
new God[MAX_PLAYERS] = 0;
new PlayerText:TD[MAX_PLAYERS];


//PlayerSpawn

TD[playerid] = CreatePlayerTextDraw(playerid,3.666702, 281.659332, "/god: AUS");
PlayerTextDrawLetterSize(playerid,TD[playerid], 0.285999, 1.371851);
PlayerTextDrawAlignment(playerid,TD[playerid], 1);
PlayerTextDrawColor(playerid,TD[playerid], -1);
PlayerTextDrawSetShadow(playerid,TD[playerid], 2);
PlayerTextDrawSetOutline(playerid,TD[playerid], 0);
PlayerTextDrawBackgroundColor(playerid,TD[playerid], 51);
PlayerTextDrawFont(playerid,TD[playerid], 2);
PlayerTextDrawSetProportional(playerid,TD[playerid], 1);
PlayerTextDrawShow(playerid, TD[playerid]);

/*When player spawns it will show the textdraw "/god: AUS" (god mode off)*/

//Playercommand

if(strcmp("/god", cmdtext, true, 10) == 0)
    {
        if (God[playerid] == 1)
        {
            SendClientMessage(playerid, Rot, "God Modus aus. Du bist nun Verwundbar!");
            SetPlayerHealth(playerid, 100);
            SetPlayerArmour(playerid, 100);
            God[playerid] = 0;
            new text[32];
            format(text, sizeof(text), "/god: AUS");
            PlayerTextDrawSetString(playerid, TD[playerid], text);
            return 1
        }
        else if(God[playerid] == 0)
        {
            SendClientMessage(playerid, Hellblau, "God Modus an. Du bist nun Unverwundbar.");
            God[playerid] = 1;
            SetPlayerArmour(playerid, 10000);
            SetPlayerHealth(playerid, 10000);
            new text[32];
            format(text, sizeof(text), "/god: AN");
            PlayerTextDrawSetString(playerid, TD[playerid], text);
            return 1;
        }
/*Textdraw will be updated with text of current god mode status*/
I hope I got the idea right.
Reply


Messages In This Thread
Stupid textdraws... - by PerformerFX - 21.06.2013, 09:02
Re: Stupid textdraws... - by Vince - 21.06.2013, 09:09
Re: Stupid textdraws... - by Antonio144 - 21.06.2013, 09:09
AW: Re: Stupid textdraws... - by PerformerFX - 21.06.2013, 09:24
Re: Stupid textdraws... - by RedFusion - 21.06.2013, 09:40
AW: Stupid textdraws... - by PerformerFX - 21.06.2013, 09:54
AW: Stupid textdraws... - by PerformerFX - 21.06.2013, 13:24
Re: Stupid textdraws... - by Antonio144 - 21.06.2013, 17:17
AW: Stupid textdraws... - by PerformerFX - 22.06.2013, 15:38
Re: Stupid textdraws... - by Antonio144 - 22.06.2013, 20:51

Forum Jump:


Users browsing this thread: 2 Guest(s)