Where I must put "{" and "}" to this code will work ? I have SetLocalVarInt etc.
Quote: void Dinamite(string &in asEntity, int alState)
{
if(GetLocalVarInt("Button") == 1)
if (alState == 1)
SetMessage("Messages", "Run", 3);
else if(GetLocalVarInt("Button") == 0)
if (alState == 1)
SetMessage("Messages", "test", 0);
AddQuest("button", "button");
}
Ok Problem is finished. Work code are
Quote:void Dinamite(string &in asEntity, int alState)
{
if(GetLocalVarInt("Button") == 1)
{
if (alState == 1)
SetMessage("Messages", "Run", 3);
GiveSanityDamage(10,true);
SetLocalVarInt("Button", 2);
return;
}
else if(GetLocalVarInt("Button") == 0)
{
if (alState == 1)
SetMessage("Messages", "test", 0);
AddQuest("button", "button");
}
}