{"action":"created","comment":{"url":"https://api.github.com/repos/alliedmodders/amxmodx/pulls/comments/35993073","id":35993073,"diff_hunk":"@@ -154,6 +155,18 @@ public stock const Float:NULL_VECTOR[3];\n #define CSW_VEST            31  // Custom\n #define CSW_VESTHELM        32  // Custom\n #define CSW_SHIELDGUN       99\n+#define CSW_LAST_WEAPON     CSW_P90\n+\n+stock const CSW_ALL_WEAPONS      = (~(1<<CSW_VEST));","path":"plugins/include/amxconst.inc","position":14,"original_position":14,"commit_id":"47ec6245de7d028e70bcf151d7753c00373dda73","original_commit_id":"63edf98ee0d0a8d13c52e6ee2a03a1273b6be430","user":{"login":"Arkshine","id":360640,"avatar_url":"https://avatars.githubusercontent.com/u/360640?v=3","gravatar_id":"","url":"https://api.github.com/users/Arkshine","html_url":"https://github.com/Arkshine","followers_url":"https://api.github.com/users/Arkshine/followers","following_url":"https://api.github.com/users/Arkshine/following{/other_user}","gists_url":"https://api.github.com/users/Arkshine/gists{/gist_id}","starred_url":"https://api.github.com/users/Arkshine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Arkshine/subscriptions","organizations_url":"https://api.github.com/users/Arkshine/orgs","repos_url":"https://api.github.com/users/Arkshine/repos","events_url":"https://api.github.com/users/Arkshine/events{/privacy}","received_events_url":"https://api.github.com/users/Arkshine/received_events","type":"User","site_admin":false},"body":"Well, you have native like `get_user_weapon` in core which doesn't need cstrike be included and I thought that it's too late to move them, since some old plugins could fail to be recompiled.\r\nWe could `cstrike_const.inc` could be included in this file, so sure if it makes sense though.","created_at":"2015-07-31T17:04:05Z","updated_at":"2015-07-31T17:04:05Z","html_url":"https://github.com/alliedmodders/amxmodx/pull/278#discussion_r35993073","pull_request_url":"https://api.github.com/repos/alliedmodders/amxmodx/pulls/278","_links":{"self":{"href":"https://api.github.com/repos/alliedmodders/amxmodx/pulls/comments/35993073"},"html":{"href":"https://github.com/alliedmodders/amxmodx/pull/278#discussion_r35993073"},"pull_request":{"href":"https://api.github.com/repos/alliedmodders/amxmodx/pulls/278"}}},"pull_request":{"url":"https://api.github.com/repos/alliedmodders/amxmodx/pulls/278","id":41344699,"html_url":"https://github.com/alliedmodders/amxmodx/pull/278","diff_url":"https://github.com/alliedmodders/amxmodx/pull/278.diff","patch_url":"https://github.com/alliedmodders/amxmodx/pull/278.patch","issue_url":"https://api.github.com/repos/alliedmodders/amxmodx/issues/278","number":278,"state":"open","locked":false,"title":"[WIP] Update cstrike module - 2","user":{"login":"Arkshine","id":360640,"avatar_url":"https://avatars.githubusercontent.com/u/360640?v=3","gravatar_id":"","url":"https://api.github.com/users/Arkshine","html_url":"https://github.com/Arkshine","followers_url":"https://api.github.com/users/Arkshine/followers","following_url":"https://api.github.com/users/Arkshine/following{/other_user}","gists_url":"https://api.github.com/users/Arkshine/gists{/gist_id}","starred_url":"https://api.github.com/users/Arkshine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Arkshine/subscriptions","organizations_url":"https://api.github.com/users/Arkshine/orgs","repos_url":"https://api.github.com/users/Arkshine/repos","events_url":"https://api.github.com/users/Arkshine/events{/privacy}","received_events_url":"https://api.github.com/users/Arkshine/received_events","type":"User","site_admin":false},"body":"\r\nThis patch does the following\r\n* Added some known constants from CS, a `cstrike_const.inc` has been created for the occasion.\r\n* Added `cs_get_item_id` native to get a `CSI_` value from a given alias, `weapon_` or `item_`\r\n* Added `cs_get_translated_item_alias()` native to get an item name (classname) from a given alias\r\n* Added `CS_OnGetItemPrice` forward to be called after an user bought an item and got it, but before money is used. That's it, you can change the original price value. This param by ref could have been implemented in `CS_OnBuy` but for practical, design, and technical reasons, this is a bad idea.\r\n* Fixed an issue with `CS_OnBuy`, while testing buying ammos, I've noticed forward would be called only one time and not for all ammos given. It's because the first time forward is triggered by the command, but afterwards game is looping internally to give as much as possible.\r\n* Added `cs_get_weapon_info()` native which gives various information about a weapon (only), like weapon/clip cost, clip size on buy, clip size of gun, max rounds and ammo type. It's likely not worth to add a set_ version since such data comes from a static array used for alias command only.\r\n* Added `cs_find_ent_by_owner()` native because the engine version is used often and this makes sense we add the same for CS.\r\n* Added `cs_get_weapon_class()` and `cs_is_valid_itemid()` stocks for convenience\r\n\r\nI need to check/test this more, especially the around the alias to make sure values are correct, but created PR in hoping my retardness will be caught and fixed.  ","created_at":"2015-07-31T14:29:07Z","updated_at":"2015-07-31T17:04:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bc05c399cd978aeccc53c1747ed336dd2de32870","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/alliedmodders/amxmodx/pulls/278/commits","review_comments_url":"https://api.github.com/repos/alliedmodders/amxmodx/pulls/278/comments","review_comment_url":"https://api.github.com/repos/alliedmodders/amxmodx/pulls/comments{/number}","comments_url":"https://api.github.com/repos/alliedmodders/amxmodx/issues/278/comments","statuses_url":"https://api.github.com/repos/alliedmodders/amxmodx/statuses/47ec6245de7d028e70bcf151d7753c00373dda73","head":{"label":"Arkshine:feature/cstrike-update-2","ref":"feature/cstrike-update-2","sha":"47ec6245de7d028e70bcf151d7753c00373dda73","user":{"login":"Arkshine","id":360640,"avatar_url":"https://avatars.githubusercontent.com/u/360640?v=3","gravatar_id":"","url":"https://api.github.com/users/Arkshine","html_url":"https://github.com/Arkshine","followers_url":"https://api.github.com/users/Arkshine/followers","following_url":"https://api.github.com/users/Arkshine/following{/other_user}","gists_url":"https://api.github.com/users/Arkshine/gists{/gist_id}","starred_url":"https://api.github.com/users/Arkshine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Arkshine/subscriptions","organizations_url":"https://api.github.com/users/Arkshine/orgs","repos_url":"https://api.github.com/users/Arkshine/repos","events_url":"https://api.github.com/users/Arkshine/events{/privacy}","received_events_url":"https://api.github.com/users/Arkshine/received_events","type":"User","site_admin":false},"repo":{"id":19425647,"name":"amxmodx","full_name":"Arkshine/amxmodx","owner":{"login":"Arkshine","id":360640,"avatar_url":"https://avatars.githubusercontent.com/u/360640?v=3","gravatar_id":"","url":"https://api.github.com/users/Arkshine","html_url":"https://github.com/Arkshine","followers_url":"https://api.github.com/users/Arkshine/followers","following_url":"https://api.github.com/users/Arkshine/following{/other_user}","gists_url":"https://api.github.com/users/Arkshine/gists{/gist_id}","starred_url":"https://api.github.com/users/Arkshine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Arkshine/subscriptions","organizations_url":"https://api.github.com/users/Arkshine/orgs","repos_url":"https://api.github.com/users/Arkshine/repos","events_url":"https://api.github.com/users/Arkshine/events{/privacy}","received_events_url":"https://api.github.com/users/Arkshine/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Arkshine/amxmodx","description":"AMX Mod X - Half-Life 1 Scripting and Administration","fork":true,"url":"https://api.github.com/repos/Arkshine/amxmodx","forks_url":"https://api.github.com/repos/Arkshine/amxmodx/forks","keys_url":"https://api.github.com/repos/Arkshine/amxmodx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Arkshine/amxmodx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Arkshine/amxmodx/teams","hooks_url":"https://api.github.com/repos/Arkshine/amxmodx/hooks","issue_events_url":"https://api.github.com/repos/Arkshine/amxmodx/issues/events{/number}","events_url":"https://api.github.com/repos/Arkshine/amxmodx/events","assignees_url":"https://api.github.com/repos/Arkshine/amxmodx/assignees{/user}","branches_url":"https://api.github.com/repos/Arkshine/amxmodx/branches{/branch}","tags_url":"https://api.github.com/repos/Arkshine/amxmodx/tags","blobs_url":"https://api.github.com/repos/Arkshine/amxmodx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Arkshine/amxmodx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Arkshine/amxmodx/git/refs{/sha}","trees_url":"https://api.github.com/repos/Arkshine/amxmodx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Arkshine/amxmodx/statuses/{sha}","languages_url":"https://api.github.com/repos/Arkshine/amxmodx/languages","stargazers_url":"https://api.github.com/repos/Arkshine/amxmodx/stargazers","contributors_url":"https://api.github.com/repos/Arkshine/amxmodx/contributors","subscribers_url":"https://api.github.com/repos/Arkshine/amxmodx/subscribers","subscription_url":"https://api.github.com/repos/Arkshine/amxmodx/subscription","commits_url":"https://api.github.com/repos/Arkshine/amxmodx/commits{/sha}","git_commits_url":"https://api.github.com/repos/Arkshine/amxmodx/git/commits{/sha}","comments_url":"https://api.github.com/repos/Arkshine/amxmodx/comments{/number}","issue_comment_url":"https://api.github.com/repos/Arkshine/amxmodx/issues/comments{/number}","contents_url":"https://api.github.com/repos/Arkshine/amxmodx/contents/{+path}","compare_url":"https://api.github.com/repos/Arkshine/amxmodx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Arkshine/amxmodx/merges","archive_url":"https://api.github.com/repos/Arkshine/amxmodx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Arkshine/amxmodx/downloads","issues_url":"https://api.github.com/repos/Arkshine/amxmodx/issues{/number}","pulls_url":"https://api.github.com/repos/Arkshine/amxmodx/pulls{/number}","milestones_url":"https://api.github.com/repos/Arkshine/amxmodx/milestones{/number}","notifications_url":"https://api.github.com/repos/Arkshine/amxmodx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Arkshine/amxmodx/labels{/name}","releases_url":"https://api.github.com/repos/Arkshine/amxmodx/releases{/id}","created_at":"2014-05-04T12:04:06Z","updated_at":"2015-04-22T18:37:48Z","pushed_at":"2015-07-31T16:56:19Z","git_url":"git://github.com/Arkshine/amxmodx.git","ssh_url":"git@github.com:Arkshine/amxmodx.git","clone_url":"https://github.com/Arkshine/amxmodx.git","svn_url":"https://github.com/Arkshine/amxmodx","homepage":"http://www.amxmodx.org/","size":162451,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"alliedmodders:master","ref":"master","sha":"6d7daf787dbbdf271b9706653edf68f8a70baf06","user":{"login":"alliedmodders","id":6601917,"avatar_url":"https://avatars.githubusercontent.com/u/6601917?v=3","gravatar_id":"","url":"https://api.github.com/users/alliedmodders","html_url":"https://github.com/alliedmodders","followers_url":"https://api.github.com/users/alliedmodders/followers","following_url":"https://api.github.com/users/alliedmodders/following{/other_user}","gists_url":"https://api.github.com/users/alliedmodders/gists{/gist_id}","starred_url":"https://api.github.com/users/alliedmodders/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alliedmodders/subscriptions","organizations_url":"https://api.github.com/users/alliedmodders/orgs","repos_url":"https://api.github.com/users/alliedmodders/repos","events_url":"https://api.github.com/users/alliedmodders/events{/privacy}","received_events_url":"https://api.github.com/users/alliedmodders/received_events","type":"Organization","site_admin":false},"repo":{"id":16622063,"name":"amxmodx","full_name":"alliedmodders/amxmodx","owner":{"login":"alliedmodders","id":6601917,"avatar_url":"https://avatars.githubusercontent.com/u/6601917?v=3","gravatar_id":"","url":"https://api.github.com/users/alliedmodders","html_url":"https://github.com/alliedmodders","followers_url":"https://api.github.com/users/alliedmodders/followers","following_url":"https://api.github.com/users/alliedmodders/following{/other_user}","gists_url":"https://api.github.com/users/alliedmodders/gists{/gist_id}","starred_url":"https://api.github.com/users/alliedmodders/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alliedmodders/subscriptions","organizations_url":"https://api.github.com/users/alliedmodders/orgs","repos_url":"https://api.github.com/users/alliedmodders/repos","events_url":"https://api.github.com/users/alliedmodders/events{/privacy}","received_events_url":"https://api.github.com/users/alliedmodders/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/alliedmodders/amxmodx","description":"AMX Mod X - Half-Life 1 Scripting and Administration","fork":false,"url":"https://api.github.com/repos/alliedmodders/amxmodx","forks_url":"https://api.github.com/repos/alliedmodders/amxmodx/forks","keys_url":"https://api.github.com/repos/alliedmodders/amxmodx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alliedmodders/amxmodx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alliedmodders/amxmodx/teams","hooks_url":"https://api.github.com/repos/alliedmodders/amxmodx/hooks","issue_events_url":"https://api.github.com/repos/alliedmodders/amxmodx/issues/events{/number}","events_url":"https://api.github.com/repos/alliedmodders/amxmodx/events","assignees_url":"https://api.github.com/repos/alliedmodders/amxmodx/assignees{/user}","branches_url":"https://api.github.com/repos/alliedmodders/amxmodx/branches{/branch}","tags_url":"https://api.github.com/repos/alliedmodders/amxmodx/tags","blobs_url":"https://api.github.com/repos/alliedmodders/amxmodx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alliedmodders/amxmodx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alliedmodders/amxmodx/git/refs{/sha}","trees_url":"https://api.github.com/repos/alliedmodders/amxmodx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alliedmodders/amxmodx/statuses/{sha}","languages_url":"https://api.github.com/repos/alliedmodders/amxmodx/languages","stargazers_url":"https://api.github.com/repos/alliedmodders/amxmodx/stargazers","contributors_url":"https://api.github.com/repos/alliedmodders/amxmodx/contributors","subscribers_url":"https://api.github.com/repos/alliedmodders/amxmodx/subscribers","subscription_url":"https://api.github.com/repos/alliedmodders/amxmodx/subscription","commits_url":"https://api.github.com/repos/alliedmodders/amxmodx/commits{/sha}","git_commits_url":"https://api.github.com/repos/alliedmodders/amxmodx/git/commits{/sha}","comments_url":"https://api.github.com/repos/alliedmodders/amxmodx/comments{/number}","issue_comment_url":"https://api.github.com/repos/alliedmodders/amxmodx/issues/comments{/number}","contents_url":"https://api.github.com/repos/alliedmodders/amxmodx/contents/{+path}","compare_url":"https://api.github.com/repos/alliedmodders/amxmodx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alliedmodders/amxmodx/merges","archive_url":"https://api.github.com/repos/alliedmodders/amxmodx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alliedmodders/amxmodx/downloads","issues_url":"https://api.github.com/repos/alliedmodders/amxmodx/issues{/number}","pulls_url":"https://api.github.com/repos/alliedmodders/amxmodx/pulls{/number}","milestones_url":"https://api.github.com/repos/alliedmodders/amxmodx/milestones{/number}","notifications_url":"https://api.github.com/repos/alliedmodders/amxmodx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alliedmodders/amxmodx/labels{/name}","releases_url":"https://api.github.com/repos/alliedmodders/amxmodx/releases{/id}","created_at":"2014-02-07T17:32:31Z","updated_at":"2015-07-30T06:47:16Z","pushed_at":"2015-07-31T16:56:20Z","git_url":"git://github.com/alliedmodders/amxmodx.git","ssh_url":"git@github.com:alliedmodders/amxmodx.git","clone_url":"https://github.com/alliedmodders/amxmodx.git","svn_url":"https://github.com/alliedmodders/amxmodx","homepage":"http://www.amxmodx.org/","size":218095,"stargazers_count":79,"watchers_count":79,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":45,"mirror_url":null,"open_issues_count":7,"forks":45,"open_issues":7,"watchers":79,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/alliedmodders/amxmodx/pulls/278"},"html":{"href":"https://github.com/alliedmodders/amxmodx/pull/278"},"issue":{"href":"https://api.github.com/repos/alliedmodders/amxmodx/issues/278"},"comments":{"href":"https://api.github.com/repos/alliedmodders/amxmodx/issues/278/comments"},"review_comments":{"href":"https://api.github.com/repos/alliedmodders/amxmodx/pulls/278/comments"},"review_comment":{"href":"https://api.github.com/repos/alliedmodders/amxmodx/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/alliedmodders/amxmodx/pulls/278/commits"},"statuses":{"href":"https://api.github.com/repos/alliedmodders/amxmodx/statuses/47ec6245de7d028e70bcf151d7753c00373dda73"}}}}