View Issue Details

IDProjectCategoryView StatusLast Update
0005225Multi Theft Auto : San AndreasScriptingpublic2010-03-21 12:09
ReporterR3mpAssigned ToFlobu 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version 
Target Version1.0.4Fixed in Version1.0.4 
Summary0005225: Binding to identical commands in different resources breaks the bind
Description

Only the first resource (on any server) that binds to the command will have a working bind
Any resources binding onto a command of the same name after this will only work as long as the original resource is running
If it is stopped (eg: the player changed server) all other binds onto commands of this name will stop working until mta is restarted

affects both clientside and serverside command binds, doesnt affect binding directly to functions

This causes especially visible problems with resources like dxscoreboard, with some servers calling it 'scoreboard' and others 'dxscoreboard' but both binding to the same command, resulting in only half the servers having a working scoreboard tab bind (depending on what the first server joined called it)

tested on 1.0.4-untested-16

Steps To Reproduce

Add the following code into 2 different resources (clientside):

addCommandHandler("testTheBinds",function()
outputChatBox("test the binds "..getResourceName(getThisResource()))
end)
bindKey("k","down","testTheBinds")

Join the server (with both resources stopped), start one resource and test the bind (the bind works)
start the second resource and test the bind again (both binds work)
stop the first resource and test the bind again (bind from second resource will not work)
start the first resource again and test the bind (both binds work)

Additional Information

additionally, if you bind onto different keys, while both the resources are running the key from the first will trigger both binds, despite no bindings to that key existing in the other resource

TagsNo tags attached.

Issue History

Date Modified Username Field Change