Disabling the MP5 jump on bicycles.
#1

Hi,

I've been scripting for 2 days and got this problem:

I need to disable the MP5 jump on bicycles, and i tried to do that in many ways. I tried to make a script which sets the armed weapon to 0 OnPlayerGetInVehicle, OnPlayerChangeState and many others, but the UZI stays equipped.
pawn Код:
public OnPlayerStateChange(playerid,newstate,oldstate)
{
  new weap = GetPlayerWeapon(playerid);
  if (oldstate == PLAYER_STATE_ONFOOT)
  if (newstate == PLAYER_STATE_DRIVER)
  {
    if(weap == 32 || weap == 28 || weap == 29)
    {
      SendClientMessage(playerid, 0xFFFF00AA, "Driving a vehicle/bicycle, weapon switched to fists.");
      SetPlayerArmedWeapon(playerid, 0);
      return 1;
    }
    return 1;
  }
  return 1;
}
Maybe i made some mistake there? Or there are some other ways in disabling it?

Thanks.
Reply


Messages In This Thread
Disabling the MP5 jump on bicycles. - by CaHbKo - 23.10.2009, 21:36
Re: Disabling the MP5 jump on bicycles. - by Malice - 23.10.2009, 21:44
Re: Disabling the MP5 jump on bicycles. - by dice7 - 23.10.2009, 21:47
Re: Disabling the MP5 jump on bicycles. - by CaHbKo - 23.10.2009, 22:40

Forum Jump:


Users browsing this thread: 1 Guest(s)