23.10.2009, 21:36
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.
Maybe i made some mistake there? Or there are some other ways in disabling it?
Thanks.
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;
}
Thanks.