disallow minigun in duel
#1

Hi I have here a minigun sciprt which every 1 hour it spawn minigun and it gives to all players online. But the problem is that when im in a duel fighing seriously with my tough friend, suddenly the minigun spawned. So it interrupts my concentration and our match.

So is there any way not spawn the minigun in a duel match?


Код:
public Minigunz()
{
	for(new i; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i))
	{
		GivePlayerWeapon(i, WEAPON_MINIGUN, MINIGUN_AMMO);
		GameTextForPlayer(i, "~w~Minigun~n~~r~Madness!", 2000, 3);
	}
	DelayTimer = SetTimer("StopMinigunz", SINTERVAL, 0);
	return 1;
}
Reply
#2

make it like that:

pawn Код:
new InDuel[MAX_PLAYERS];
And then in your duel command add:
pawn Код:
InDuel[playerid] = 1;
And then:
pawn Код:
public Minigunz()
{
    if(InDuel[playerid] == 1) return 0;
    for(new i; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i))
    {
        GivePlayerWeapon(i, WEAPON_MINIGUN, MINIGUN_AMMO);
        GameTextForPlayer(i, "~w~Minigun~n~~r~Madness!", 2000, 3);
    }
    DelayTimer = SetTimer("StopMinigunz", SINTERVAL, 0);
    return 1;
}
FIXED !
Reply
#3

Thanks alot I will try this. But anyway, new InDuel; without [max_players]

Also duel filterscript and the minigun is in different filterscript. What should I do?
Reply
#4

Ups, fixed now.
Reply
#5

Quote:
Originally Posted by Areax
Посмотреть сообщение
Ups, fixed now.
Man please kindly read.

Quote:

Thanks alot I will try this. But anyway, new InDuel; without [max_players]

Also duel filterscript and the minigun is in different filterscript. What should I do?

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)