{"action":"created","issue":{"url":"https://api.github.com/repos/oscar-broman/SKY/issues/10","labels_url":"https://api.github.com/repos/oscar-broman/SKY/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/oscar-broman/SKY/issues/10/comments","events_url":"https://api.github.com/repos/oscar-broman/SKY/issues/10/events","html_url":"https://github.com/oscar-broman/SKY/issues/10","id":110594207,"number":10,"title":"Hooks.cpp player hooking.. setting keys after the packet went thru","user":{"login":"JernejL","id":1741375,"avatar_url":"https://avatars.githubusercontent.com/u/1741375?v=3","gravatar_id":"","url":"https://api.github.com/users/JernejL","html_url":"https://github.com/JernejL","followers_url":"https://api.github.com/users/JernejL/followers","following_url":"https://api.github.com/users/JernejL/following{/other_user}","gists_url":"https://api.github.com/users/JernejL/gists{/gist_id}","starred_url":"https://api.github.com/users/JernejL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JernejL/subscriptions","organizations_url":"https://api.github.com/users/JernejL/orgs","repos_url":"https://api.github.com/users/JernejL/repos","events_url":"https://api.github.com/users/JernejL/events{/privacy}","received_events_url":"https://api.github.com/users/JernejL/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":17,"created_at":"2015-10-09T06:12:42Z","updated_at":"2015-10-29T09:21:04Z","closed_at":null,"body":"if possible, i would like to adapt this plugin to produce some kind of \"setplayerkeys\" functionality to desync key input depending on script's wishes (inside gamemode's onplayerupdate). \r\n \r\nThe main problem i have right now is, the current functionality in hooks.cpp can do it it when the packet arrives, but i need to do it after the packet is in sa-mp. \r\n \r\nMy pathetic and failed attempt was to do the following. I called this within onplayerupdate and it seemed to have no effect: \r\n \r\nstatic cell AMX_NATIVE_CALL Natives::ClearPlayerKeys(AMX* amx, cell* params)\r\n{\r\n\tCHECK_PARAMS(1, \"ClearPlayerKeys\");\r\n\r\n\tint playerid = (int)params[1];\r\n\t\r\n\tpNetGame->pPlayerPool->pPlayer[playerid]->dwKeys = 0;\r\n\tpNetGame->pPlayerPool->pPlayer[playerid]->dwOldKeys = 0;\r\n\r\n\treturn 1;\r\n}\r\n "},"comment":{"url":"https://api.github.com/repos/oscar-broman/SKY/issues/comments/152124377","html_url":"https://github.com/oscar-broman/SKY/issues/10#issuecomment-152124377","issue_url":"https://api.github.com/repos/oscar-broman/SKY/issues/10","id":152124377,"user":{"login":"JernejL","id":1741375,"avatar_url":"https://avatars.githubusercontent.com/u/1741375?v=3","gravatar_id":"","url":"https://api.github.com/users/JernejL","html_url":"https://github.com/JernejL","followers_url":"https://api.github.com/users/JernejL/followers","following_url":"https://api.github.com/users/JernejL/following{/other_user}","gists_url":"https://api.github.com/users/JernejL/gists{/gist_id}","starred_url":"https://api.github.com/users/JernejL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JernejL/subscriptions","organizations_url":"https://api.github.com/users/JernejL/orgs","repos_url":"https://api.github.com/users/JernejL/repos","events_url":"https://api.github.com/users/JernejL/events{/privacy}","received_events_url":"https://api.github.com/users/JernejL/received_events","type":"User","site_admin":false},"created_at":"2015-10-29T09:21:04Z","updated_at":"2015-10-29T09:21:04Z","body":"I will wait for the commit fix. \r\n "}}