Quick Switch
#2

You can't block weapon changing, but you can use SetPlayerArmedWeapon in timer or OnPlayerUpdate. Save player weapon and time in variables.

Код:
new theWeapon[MAX_PLAYERS], theTime[MAX_PLAYERS];

public OnPlayerWeaponShot(...)
{
	theWeapon[playerid] = weaponid;
	theTime[playerid] = gettime() + 3;
	return 1;
}

public OnPlayerUpdate(playerid)
{
	if(theTime[playerid] >= gettime())
	{
		SetPlayerArmedWeapon(playerid, theWeapon[playerid]);
	}
	return 1;
}
Something like this.
Reply


Messages In This Thread
Quick Switch - by bigboy81 - 18.01.2015, 17:23
Re: Quick Switch - by ball - 18.01.2015, 18:59
Re: Quick Switch - by bigboy81 - 18.01.2015, 19:20
Re: Quick Switch - by ball - 18.01.2015, 19:24
Re: Quick Switch - by Schneider - 18.01.2015, 19:28
Re: Quick Switch - by bigboy81 - 18.01.2015, 19:41
Re: Quick Switch - by Sime30 - 18.01.2015, 19:43
Re: Quick Switch - by ball - 18.01.2015, 19:44
Re: Quick Switch - by bigboy81 - 18.01.2015, 19:46
Re: Quick Switch - by Schneider - 18.01.2015, 19:55

Forum Jump:


Users browsing this thread: 1 Guest(s)