View Issue Details

IDProjectCategoryView StatusLast Update
0006447Multi Theft Auto : San AndreasServerpublic2012-02-15 12:16
ReporterGrimReaperAssigned Tokevuwk 
PrioritynormalSeveritytweakReproducibilityalways
Status resolvedResolutionfixed 
Product Version 
Target VersionFixed in Version1.3.1 
Summary0006447: giveWeapon triggers onPlayerWeaponSwitch with setAsCurrent=false
Description

when calling giveWeapon with the setAsCurrent argument set to false, it will trigger the onPlayerWeaponSwitch event for that player that received the weapon.

Steps To Reproduce

function switched(previous, current)
outputChatBox(tostring(getPedWeaponSlot(source)).." "..tostring(previous).." "..tostring(current))
end
addEventHandler("onPlayerWeaponSwitch", root, switched)

function test(player)
giveWeapon(player, 31, 500, false)
end
addCommandHandler("test", test)

the outputChatBox function will output the weapon slot of the weapon the player currently holds, the id of the currently held weapon and the id of the weapon that was given to the player, when the test command is used

TagsNo tags attached.

Activities

Ca11um

2011-10-29 04:18

reporter   ~~0015149

http://ks26288.kimsufi.com/mta/Patches/C++/giveWeapon.patch

kevuwk

2012-02-15 12:16

administrator   ~~0016077

no longer triggers onPlayerWeaponSwitch with setAsCurrent=false

Issue History

Date Modified Username Field Change