habinabi
Active member
Hi, I need a script when when I press P I switch to ammo slot 3, regardless of whether I am sitting in a vehicle or a pedestrian.
Requires SAMPFUNCS and SAMP 0.3.7 R1Hi, I need a script when when I press P I switch to ammo slot 3, regardless of whether I am sitting in a vehicle or a pedestrian.
{$CLEO}
0000: Auto Weapon Slot 3 by ajom
repeat
wait 0
until 0AFA: is_samp_available
while true
wait 0
if and
8B21: not samp is_chat_opened
0ADC: test_cheat "P"
then
04B8: get_weapon_data_from_actor $PLAYER_ACTOR slot 3 weapon 0@ ammo 1@ model 2@
if 1@ > 0 // has ammo
then
0A96: 2@ = actor $PLAYER_ACTOR struct
0AA6: call_method 0x5E6280 struct 2@ params 1 pop 0 0@
end
end
end
script updated.Thank you, but it only works when I'm not in the vehicle, and I need it even when I'm a driver.
And if the script could be paused when writing to a chat or dialog table, it would be great.
What version of SAMPFUNCS you use?Could you please make the script pause whenever I write to a chat or dialog table?
When the chat is simply open so that the script does not shuffle the weapon.
Script Updated.SAMPFUNCS - 5.3.3
can you please modify this script for me so that when I have a chat turned on, the weapons are not shuffled, as you did above, but there are more slots, and would you not scratch it if I wanted to modify something or add a slot.
could you please write it directly into the code?8B21: not samp is_chat_opened