Hay.
Ich habe das Problem das ich im Script einmal Hunger und einmal Harndrang habe.(Also die Reallife Leisten)
Bei mir wird aber immer nur eins angezeigt und zwar das letze was ich gescriptet habe(Hunger).
Wie kann ich beide anzeigen lassen?
So gescriptet:
//________________Harndrang_________________
forward Harndrangg(playerid);
forward HarndrangUpdate(playerid);
new Text:Harndrang;
//OnPlayerConnect
SetTimer("Harndrangg",1000,1);
SetTimer("HarndrangUpdate",30000,1);
public HarndrangUpdate(playerid)
{
if(GetPVarInt(playerid,"Harndrang") > 98)
{
new Float:hp,Float:HPP;
GetPlayerHealth(playerid,HPP);
hp = HPP-5;
SetPlayerHealth(playerid,hp);
SetPVarInt(playerid,"Harndrang",GetPVarInt(playerid,"Harndrang")+1);
return 1;
}
else if (GetPVarInt(playerid,"Harndrang") == 100)
{
SetPVarInt(playerid,"Harndrang",0);
SetPlayerHealth(playerid,0);
SendClientMessage(playerid,ORANGE,"Deine Blase ist geplatz und bist gestorben.");
}
else
{
SetPVarInt(playerid,"Harndrang",GetPVarInt(playerid,"Harndrang")+1);
}
return 1;
}
public Harndrangg(playerid)
{
TextDrawDestroy(Text:Harndrang);
new string[64],harn = GetPVarInt(playerid,"Harndrang");
format(string,64,"Harndrang: %i",harn);
Harndrang = TextDrawCreate(500,108,string);
TextDrawFont(Harndrang,2);
TextDrawLetterSize(Harndrang,0.4,2.8);
TextDrawColor(Harndrang,BLAU);
TextDrawSetOutline(Harndrang,0);
TextDrawSetProportional(Harndrang,1);
TextDrawSetShadow(Harndrang,1);
TextDrawShowForPlayer(playerid,Text:Harndrang);
return 1;
}
ocmd:pissen(playerid,params[])
{
if(IsPlayerInAnyVehicle(playerid))
{
return SendClientMessage(playerid,ROT,"Ist doch nicht dein Ernst oder?");
}
if(GetPVarInt(playerid,"Harndrang")==0)
{
return SendClientMessage(playerid,ROT,"Du musst nicht pissen.");
}
SetPVarInt(playerid,"Harndrang",0);
SendClientMessage(playerid,BLAU,"Du hast erfolgreiche gepisst, der Wind war auf deiner Seite xD");
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_PISSING);
return 1;
}
//_____________________Hunger____________________
forward Hungerr(playerid);
forward HungerUpdate(playerid);
new Text:Hunger;
//OnPlayerConnect
SetTimer("Hungerr",1000,1);
SetTimer("HungerUpdate",30000,1);
public HungerUpdate(playerid)
{
if(GetPVarInt(playerid,"Hunger") > 98)
{
new Float:hp,Float:HPP;
GetPlayerHealth(playerid,HPP);
hp = HPP-5;
SetPlayerHealth(playerid,hp);
SetPVarInt(playerid,"Hunger",GetPVarInt(playerid,"Hunger")+1);
return 1;
}
else if (GetPVarInt(playerid,"Hunger") == 100)
{
SetPVarInt(playerid,"Hunger",0);
SetPlayerHealth(playerid,0);
SendClientMessage(playerid,ORANGE,"Du hast dich verhungern lassen.");
}
else
{
SetPVarInt(playerid,"Hunger",GetPVarInt(playerid,"Hunger")+1);
}
return 1;
}
public Hungerr(playerid)
{
TextDrawDestroy(Text:Hunger);
new string[64],hung = GetPVarInt(playerid,"Hunger");
format(string,64,"Hunger: %i",hung);
Hunger = TextDrawCreate(500,150,string);
TextDrawFont(Harndrang,2);
TextDrawLetterSize(Harndrang,0.4,2.8);
TextDrawColor(Harndrang,ROT);
TextDrawSetOutline(Harndrang,0);
TextDrawSetProportional(Harndrang,1);
TextDrawSetShadow(Harndrang,1);
TextDrawShowForPlayer(playerid,Text:Hunger);
return 1;
}
Hoffe mir kann jemand helfen....
(Das unter ist richtig eingereit, nur hatte da so ein Unfall mit dem Pawno Queltext :D)