21.10.2015, 13:22
You're doing it wrong. Where is 'cmd' defined? Exactly, nowhere in that callback. Commands in that form are used in the OnPlayerCommandText callback and not the OnPlayerKeyStateChange callback as Kevln already implied.
WIKI page for the OnPlayerCommandText: https://sampwiki.blast.hk/wiki/OnPlayerCommandText
WIKI page for the OnPlayerKeyStateChange: https://sampwiki.blast.hk/wiki/OnPlayerKeyStateChange
Read about it, then try.
WIKI page for the OnPlayerCommandText: https://sampwiki.blast.hk/wiki/OnPlayerCommandText
WIKI page for the OnPlayerKeyStateChange: https://sampwiki.blast.hk/wiki/OnPlayerKeyStateChange
Read about it, then try.

