21.06.2013, 13:24
Shit. I got no error codes but the overall code doesn't work :/
Does someone know an answer? The Textdraw just keeps on "/god: AUS" no matter what I do
Код:
new God[MAX_PLAYERS] = 0; new PlayerText:TD[MAX_PLAYERS]; //PlayerConnect { TD[playerid] = CreatePlayerTextDraw(playerid,3.666702, 281.659332, "/god:"); 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); new text[32]; switch(God[playerid]) { case 0: format(text, sizeof(text), "/god: AUS"); case 1: format(text, sizeof(text), "/god: AN"); } PlayerTextDrawSetString(playerid, TD[playerid], text); PlayerTextDrawShow(playerid, TD[playerid]); //PlayerSpawn God[playerid] = 1; //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; 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); return 1; }
![Sad](images/smilies/sad.gif)