SA-MP Forums Archive
HappyHour Help Needed - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: HappyHour Help Needed (/showthread.php?tid=428699)



HappyHour Help Needed - speediekiller2 - 06.04.2013

how can i make a good Happhour that the players only can spawn a hydra on happyhour?

i have this

Код:
forward Happyday(playerid);

public OnPlayerCommandText(playerid, cmdtext[])
{
        if(!strcmp("/happyhour", cmdtext, true))
	{
		if(IsPlayerAdmin(playerid) == 1)
		{
		    SetTimerEx("Happyday",240000,1,"d",playerid);
			SendClientMessageToAll(0x050CFAFF, "HAPPYHOUR!");
			return 1;
		}
	}
	return 0;
}

public Happyday(playerid)
{
	return 1;
}



Re: HappyHour Help Needed - Edvin - 06.04.2013

What should players do on that "happy hour" ?

Use variables. For exemple:
Код:
if ( HappyHour == 1 )
{
    //Some codes
}
else
{
    //HappyHour = 0 & other codes
}



Re: HappyHour Help Needed - speediekiller2 - 06.04.2013

they must can spawn a hydra or hunter only in happyhour


Re: HappyHour Help Needed - speediekiller2 - 07.04.2013

i needed help with this so fast as possible


Re: HappyHour Help Needed - dusk - 07.04.2013

[pawn]forward Happyday(playerid);
new bool:HappyHour;

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
        if(!strcmp("/happyhour", cmdtext, true))
    {
        if(IsPlayerAdmin(playerid) == 1)
        {
            SetTimerEx("Happyday",240000,1,"d",playerid);
                         HappyHour=true;
            SendClientMessageToAll(0x050CFAFF, "HAPPYHOUR!");
            return 1;
        }
    }
    return 0;
}
pawn Код:
public Happyday(playerid)
{
        HappyHour=false;
    return 1;
}
And when they try to spawn a hydra
pawn Код:
if(HappyHour==true)
{
//let them
}
else
{
//not happyhour no hydra
}



Re: HappyHour Help Needed - speediekiller2 - 07.04.2013

THANKYOU SO MUCH MY FRIEND