21.06.2013, 09:02
(
Последний раз редактировалось PerformerFX; 06.07.2013 в 14:26.
)
Deleted
TD = CreatePlayerTextDraw(3.666702, 281.659332, "/god:");
// TO
TD[playerid] = CreatePlayerTextDraw(3.666702, 281.659332, "/god:");
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; }
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*/