{"action":"created","issue":{"url":"https://api.github.com/repos/Zeex/sampgdk/issues/158","repository_url":"https://api.github.com/repos/Zeex/sampgdk","labels_url":"https://api.github.com/repos/Zeex/sampgdk/issues/158/labels{/name}","comments_url":"https://api.github.com/repos/Zeex/sampgdk/issues/158/comments","events_url":"https://api.github.com/repos/Zeex/sampgdk/issues/158/events","html_url":"https://github.com/Zeex/sampgdk/issues/158","id":133528090,"number":158,"title":"I try to create streamer api","user":{"login":"eXeGOODER","id":6906042,"avatar_url":"https://avatars.githubusercontent.com/u/6906042?v=3","gravatar_id":"","url":"https://api.github.com/users/eXeGOODER","html_url":"https://github.com/eXeGOODER","followers_url":"https://api.github.com/users/eXeGOODER/followers","following_url":"https://api.github.com/users/eXeGOODER/following{/other_user}","gists_url":"https://api.github.com/users/eXeGOODER/gists{/gist_id}","starred_url":"https://api.github.com/users/eXeGOODER/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eXeGOODER/subscriptions","organizations_url":"https://api.github.com/users/eXeGOODER/orgs","repos_url":"https://api.github.com/users/eXeGOODER/repos","events_url":"https://api.github.com/users/eXeGOODER/events{/privacy}","received_events_url":"https://api.github.com/users/eXeGOODER/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-14T10:28:46Z","updated_at":"2016-02-14T12:05:37Z","closed_at":null,"body":"```c++\r\n#include \"sampgdk.h\"\r\n\r\ncell Invoke(const char *name, const char *format, ...) {\r\n\tva_list args;\r\n\tva_start(args, format);\r\n\tAMX_NATIVE native = sampgdk_FindNative(name);\r\n\tcell result = sampgdk_InvokeNative(native, format, args);\r\n\tva_end(args);\r\n\treturn result;\r\n}\r\n\r\ncell CreateDynamicObject(int modelid, float x, float y, float z, float rx, float ry, float rz, int worldid = -1, int interiorid = -1, int playerid = -1, float streamdistance = 300.0, float drawdistance = 0.0)\r\n{\r\n\tcell result = Invoke(\"CreateDynamicObject\", \"iffffffiiiff\", modelid, x, y, z, rx, ry, rz, worldid, interiorid, playerid, streamdistance, drawdistance);\r\n\tsampgdk_logprintf(\"Created dynamic object : %d\", result);\r\n\treturn result;\r\n}\r\n```\r\nUsing:\r\n```pawn\r\nCreateDynamicObject(18769, 1500.0, -1500.0, 500.0, 0.0, 0.0, 0.0);\r\nCreateDynamicObject(18769, -1500.0, -1500.0, 500.0, 0.0, 0.0, 0.0);\r\nCreateDynamicObject(18769, 1500.0, 1500.0, 500.0, 0.0, 0.0, 0.0);\r\nCreateDynamicObject(18769, -1500.0, 1500.0, 500.0, 0.0, 0.0, 0.0);\r\n```\r\nConsole:\r\n> Created dynamic object : 1\r\nCreated dynamic object : 2\r\nCreated dynamic object : 3\r\nCreated dynamic object : 4\r\n\r\n<hr/>\r\nObjects aren't found\r\nPerhaps, I made somewhere a mistake\r\nI apologize, I am a beginner"},"comment":{"url":"https://api.github.com/repos/Zeex/sampgdk/issues/comments/183880388","html_url":"https://github.com/Zeex/sampgdk/issues/158#issuecomment-183880388","issue_url":"https://api.github.com/repos/Zeex/sampgdk/issues/158","id":183880388,"user":{"login":"WopsS","id":3403191,"avatar_url":"https://avatars.githubusercontent.com/u/3403191?v=3","gravatar_id":"","url":"https://api.github.com/users/WopsS","html_url":"https://github.com/WopsS","followers_url":"https://api.github.com/users/WopsS/followers","following_url":"https://api.github.com/users/WopsS/following{/other_user}","gists_url":"https://api.github.com/users/WopsS/gists{/gist_id}","starred_url":"https://api.github.com/users/WopsS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WopsS/subscriptions","organizations_url":"https://api.github.com/users/WopsS/orgs","repos_url":"https://api.github.com/users/WopsS/repos","events_url":"https://api.github.com/users/WopsS/events{/privacy}","received_events_url":"https://api.github.com/users/WopsS/received_events","type":"User","site_admin":false},"created_at":"2016-02-14T12:05:37Z","updated_at":"2016-02-14T12:05:37Z","body":"You don't need to create a custom function for **Invoke**. You can do this\r\n```cpp\r\ncell CreateDynamicObject(int modelid, float x, float y, float z, float rx, float ry, float rz, int worldid = -1, int interiorid = -1, int playerid = -1, float streamdistance = 300.0, float drawdistance = 0.0)\r\n{\r\n\tstatic AMX_NATIVE Native = sampgdk::FindNative(\"CreateDynamicObject\");\r\n\treturn sampgdk::InvokeNative(Native, \"iffffffiiiff\", modelid, x, y, z, rx, ry, rz, worldid, interiorid, playerid, streamdistance, drawdistance);\r\n}\r\n```"}}