Код HTML:
CMD:sonnenbrille(playerid,params[])
{
new randShit = random(sizeof(RandomBacon));
if(GetPVarInt(playerid, "Bacon") == 0)
{
SendClientMessage(playerid,0x21DD00FF, RandomBacon[randShit]);
SetPVarInt(playerid, "Bacon", 1);
ApplyAnimation(playerid,"RIOT","RIOT_shout",2.0,0,0,0,0,0);
TextDrawBoxColor(SunGlasses, 0x00000040);
TextDrawShowForPlayer(playerid, SunGlasses);
SetPlayerAttachedObject(playerid,0,19022,2,0.1,0.04,0.0,60.0,85.0,25.0,1.0,1.0,1.0);
}
else
{
SetPVarInt(playerid, "Bacon", 0);
TextDrawHideForPlayer(playerid, SunGlasses);
ApplyAnimation(playerid,"RIOT","RIOT_shout",2.0,0,0,0,0,0);
RemovePlayerAttachedObject(playerid, 0);
SendClientMessage(playerid,FARBE_WEISS,"Du hast deine Sonnenbrille abgesetzt.");
}
return 1;
}
CMD:helligkeit(playerid,params[])
{
if(GetPVarInt(playerid, "Bacon") == 0) return SendClientMessage(playerid,FARBE_ROT,"Du hast keine Sonnenbrille aufgesetzt! (/sonnenbrille)");
ShowPlayerDialog(playerid,668,DIALOG_STYLE_INPUT,"Sonnenbrillen-System","Stell deine Helligkeit ein:\nhell\nnormal\ndunkel\nam dunkelsten","Aufsetzen","Abbrechen");
return 1;
}