{"id":81736,"date":"2026-07-25T04:02:01","date_gmt":"2026-07-24T20:02:01","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/81736.html"},"modified":"2026-07-25T04:02:01","modified_gmt":"2026-07-24T20:02:01","slug":"%e9%9b%b6%e5%9f%ba%e7%a1%80openmp-samp-gtasa%e8%81%94%e6%9c%ba%e6%9c%8d%e5%8a%a1%e5%99%a8%e5%bc%80%e5%8f%91%e6%95%99%e7%a8%8b-%e7%ac%ac%e4%ba%8c%e7%ab%a0","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/81736.html","title":{"rendered":"\u96f6\u57fa\u7840openmp\/SAMP gtasa\u8054\u673a\u670d\u52a1\u5668\u5f00\u53d1\u6559\u7a0b - \u7b2c\u4e8c\u7ae0"},"content":{"rendered":"<h2>\u96f6\u57fa\u7840openmp\/SAMP gtasa\u8054\u673a\u670d\u52a1\u5668\u5f00\u53d1\u6559\u7a0b &#8211; \u7b2c\u4e8c\u7ae0<\/h2>\n<p>\u7f16\u5199&#xff1a;\u5c0f\u9e1f Github \u65f6\u95f4&#xff1a;2026\/03\/23<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260724200159-6a63c4b7b139f.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u672c\u6559\u7a0b\u9762\u5411\u5b8c\u5168\u96f6\u57fa\u7840\u7684\u65b0\u624b&#xff0c;\u6bcf\u4e00\u8282\u53ea\u8bb2\u4e00\u4e2a\u77e5\u8bc6\u70b9&#xff0c;\u5faa\u5e8f\u6e10\u8fdb\u3002<\/p>\n<p>\u672c\u7ae0\u8282\u5148\u4ee5\u5feb\u901f\u4e86\u89e3 Pawn \u8bed\u8a00\u548c openmp \u6e38\u620f\u5b9e\u9645\u5e94\u7528\u4e3a\u5f00\u7aef&#xff0c;\u8ba9\u65b0\u624b\u66f4\u5feb\u901a\u8fc7\u5b9e\u9645\u6e38\u620f\u8868\u73b0\u83b7\u5f97\u53cd\u9988&#xff0c;\u4ee5\u907f\u514d\u4e00\u5f00\u59cb\u5c31\u63a5\u89e6\u8fc7\u591a\u8bed\u6cd5&#xff0c;\u5efa\u8bae\u9605\u8bfb\u5b8c\u672c\u7ae0\u8282\u518d\u5f00\u59cb\u7b2c\u4e09\u7ae0\u5de9\u56fa\u8fdb\u9636\u7f16\u7a0b\u8bed\u8a00\u7ec6\u8282<\/p>\n<hr \/>\n<h3>\u76ee\u5f55<\/h3>\n<table>\n<tr>#\u7ae0\u8282<\/tr>\n<tbody>\n<tr>\n<td>1<\/td>\n<td>open.mp \u662f\u4ec0\u4e48<\/td>\n<\/tr>\n<tr>\n<td>2<\/td>\n<td>\u5f00\u542f\u670d\u52a1\u5668<\/td>\n<\/tr>\n<tr>\n<td>3<\/td>\n<td>\u7b2c\u4e00\u4e2a\u811a\u672c<\/td>\n<\/tr>\n<tr>\n<td>4<\/td>\n<td>\u6ce8\u91ca<\/td>\n<\/tr>\n<tr>\n<td>5<\/td>\n<td>\u53d8\u91cf<\/td>\n<\/tr>\n<tr>\n<td>6<\/td>\n<td>define<\/td>\n<\/tr>\n<tr>\n<td>7<\/td>\n<td>\u5b57\u7b26\u4e32\u4e0e format<\/td>\n<\/tr>\n<tr>\n<td>8<\/td>\n<td>\u8fd0\u7b97\u7b26<\/td>\n<\/tr>\n<tr>\n<td>9<\/td>\n<td>if \/ else \u5224\u65ad<\/td>\n<\/tr>\n<tr>\n<td>10<\/td>\n<td>switch \u591a\u5206\u652f<\/td>\n<\/tr>\n<tr>\n<td>11<\/td>\n<td>for \u5faa\u73af<\/td>\n<\/tr>\n<tr>\n<td>12<\/td>\n<td>while \u5faa\u73af<\/td>\n<\/tr>\n<tr>\n<td>13<\/td>\n<td>\u51fd\u6570<\/td>\n<\/tr>\n<tr>\n<td>14<\/td>\n<td>\u6570\u7ec4<\/td>\n<\/tr>\n<tr>\n<td>15<\/td>\n<td>\u56de\u8c03\u51fd\u6570&#xff08;Callback&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>16<\/td>\n<td>SendClientMessage \u2014 \u53d1\u6d88\u606f<\/td>\n<\/tr>\n<tr>\n<td>17<\/td>\n<td>GameText \u2014 \u5c4f\u5e55\u5927\u5b57<\/td>\n<\/tr>\n<tr>\n<td>18<\/td>\n<td>TextDraw \u2014 \u5c4f\u5e55 UI<\/td>\n<\/tr>\n<tr>\n<td>19<\/td>\n<td>Dialog \u2014 \u5bf9\u8bdd\u6846<\/td>\n<\/tr>\n<tr>\n<td>20<\/td>\n<td>Pickup \u2014 \u62fe\u53d6\u7269<\/td>\n<\/tr>\n<tr>\n<td>21<\/td>\n<td>Checkpoint \u2014 \u68c0\u67e5\u70b9<\/td>\n<\/tr>\n<tr>\n<td>22<\/td>\n<td>Vehicle \u2014 \u8f7d\u5177<\/td>\n<\/tr>\n<tr>\n<td>23<\/td>\n<td>Actor \u2014 NPC<\/td>\n<\/tr>\n<tr>\n<td>24<\/td>\n<td>Timer \u2014 \u8ba1\u65f6\u5668<\/td>\n<\/tr>\n<tr>\n<td>25<\/td>\n<td>Keys \u2014 \u6309\u952e\u68c0\u6d4b<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr \/>\n<h3>1. open.mp \u662f\u4ec0\u4e48<\/h3>\n<p>open.mp&#xff08;open multiplayer&#xff09;\u662f\u4e00\u4e2a\u5168\u65b0\u7684 \u4fa0\u76d7\u730e\u8f66\u624b&#xff1a;\u5723\u5b89\u5730\u5217\u65af \u7684\u591a\u4eba\u6e38\u620f\u670d\u52a1\u7aef&#xff0c;\u5b8c\u5168\u5411\u4e0b\u517c\u5bb9 SA-MP \u3002<\/p>\n<p>\u4f60\u53ef\u4ee5\u7528 Pawn \u811a\u672c\u8bed\u8a00 \u6765\u7f16\u5199\u6e38\u620f\u670d\u52a1\u5668\u7684\u903b\u8f91&#xff0c;\u6bd4\u5982&#xff1a;<\/p>\n<ul>\n<li>\u73a9\u5bb6\u52a0\u5165\u65f6\u663e\u793a\u6b22\u8fce\u6d88\u606f<\/li>\n<li>\u5728\u5730\u56fe\u4e0a\u653e\u7f6e NPC\u3001\u8f7d\u5177\u3001\u62fe\u53d6\u7269<\/li>\n<li>\u5236\u4f5c\u5546\u5e97\u3001\u4efb\u52a1\u3001\u89d2\u8272\u626e\u6f14\u7cfb\u7edf<\/li>\n<\/ul>\n<p>Pawn \u662f\u4e00\u95e8\u7c7b\u4f3c C \u8bed\u8a00\u7684\u811a\u672c\u8bed\u8a00&#xff0c;\u8bed\u6cd5\u7b80\u5355&#xff0c;\u975e\u5e38\u9002\u5408\u5165\u95e8\u3002<\/p>\n<p>open.mp vs SA-MP&#xff1a;\u4e24\u8005\u8bed\u6cd5\u5b8c\u5168\u4e00\u6837\u3002open.mp \u662f\u6d3b\u8dc3\u7ef4\u62a4\u7684\u73b0\u4ee3\u7248\u672c\u3002<\/p>\n<hr \/>\n<h3>2. \u5f00\u542f\u670d\u52a1\u5668<\/h3>\n<h4>\u7b2c\u4e00\u6b65&#xff1a;\u4e0b\u8f7d open.mp \u670d\u52a1\u7aef<\/h4>\n<p>\u524d\u5f80\u5b98\u7f51 https:\/\/www.open.mp \u4e0b\u8f7d\u6700\u65b0\u7248\u672c&#xff0c;\u89e3\u538b\u5230\u4efb\u610f\u6587\u4ef6\u5939\u3002<\/p>\n<p>\u89e3\u538b\u540e\u4f60\u4f1a\u770b\u5230\u8fd9\u6837\u7684\u76ee\u5f55\u7ed3\u6784&#xff1a;<\/p>\n<p>components: open.mp \u6838\u5fc3\u7ec4\u4ef6<br \/>\nfilterscripts: \u670d\u52a1\u5668\u811a\u672c\u6587\u4ef6&#xff08;\u8f85\u52a9\u811a\u672c&#xff09;<br \/>\ngamemodes: \u670d\u52a1\u5668\u6e38\u620f\u6a21\u5f0f\u6587\u4ef6&#xff08;\u4e3b\u56fe&#xff09;<br \/>\nmodels: \u670d\u52a1\u5668\u81ea\u5b9a\u4e49\u6a21\u578b&#xff08;\u7eb9\u7406 .txd .dff&#xff09;<br \/>\nplugins: \u670d\u52a1\u5668\u63d2\u4ef6\u6587\u4ef6&#xff08;\u4f20\u7edf\u63d2\u4ef6&#xff09;<br \/>\nqawno: Pawn \u7f16\u8f91\u5668\u7a0b\u5e8f\u53ca\u5305\u542b\u6587\u4ef6<br \/>\nscriptfiles: INI \u914d\u7f6e\u6587\u4ef6\u53ca\u5176\u4ed6\u8d44\u6e90<br \/>\nbans.json: \u5c01\u7981\u5217\u8868\u6587\u4ef6<br \/>\nconfig.json: \u670d\u52a1\u5668\u914d\u7f6e\u6587\u4ef6<br \/>\nomp-server.exe: open.mp \u670d\u52a1\u5668\u4e3b\u7a0b\u5e8f<\/p>\n<h4>\u7b2c\u4e8c\u6b65&#xff1a;\u914d\u7f6e config.json<\/h4>\n<p>\u6253\u5f00 config.json&#xff0c;\u627e\u5230 main_scripts \u8fd9\u4e00\u884c&#xff0c;\u6539\u6210\u4f60\u7684\u4e3b\u56fe\u540d\u79f0 mygamemode<\/p>\n<p>\u6839\u636e\u9700\u6c42\u8bbe\u7f6e\u7aef\u53e3 \u670d\u52a1\u5668\u540d\u79f0 \u9700\u8981\u6dfb\u52a0\u7684\u63d2\u4ef6 \u8f85\u52a9\u811a\u672c \u4fee\u6539\u9ad8\u5f3a\u5ea6\u7684rcon\u5bc6\u7801<\/p>\n<p><span class=\"token punctuation\">{<\/span><br \/>\n    <span class=\"token string-property property\">&#034;name&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token string\">&#034;\u6211\u7684\u670d\u52a1\u5668&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n    <span class=\"token string-property property\">&#034;network&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n        <span class=\"token string-property property\">&#034;port&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token number\">7777<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">,<\/span><br \/>\n    <span class=\"token string-property property\">&#034;max_bots&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token number\">0<\/span><span class=\"token punctuation\">,<\/span><br \/>\n    <span class=\"token string-property property\">&#034;max_players&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token number\">100<\/span><span class=\"token punctuation\">,<\/span><br \/>\n    <span class=\"token string-property property\">&#034;pawn&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n        <span class=\"token string-property property\">&#034;main_scripts&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token punctuation\">[<\/span><br \/>\n            <span class=\"token string\">&#034;mygamemode 1&#034;<\/span><br \/>\n        <span class=\"token punctuation\">]<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">,<\/span><br \/>\n    <span class=\"token string-property property\">&#034;rcon&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n        <span class=\"token string-property property\">&#034;password&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token string\">&#034;changeme1&#034;<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">,<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p>\u5173\u4e8econfig.json\u66f4\u591a\u8be6\u60c5\u53ef\u67e5\u9605 https:\/\/open.mp\/docs\/server\/config.json \u4f46\u51e0\u4e4e\u5927\u90e8\u5206\u8bbe\u7f6e\u4fdd\u6301\u9ed8\u8ba4\u5373\u53ef<\/p>\n<h4>\u7b2c\u4e09\u6b65&#xff1a;\u6253\u5f00 qawno \u7f16\u8f91\u5668<\/h4>\n<p>\u53cc\u51fb qawno\/qawno.exe&#xff0c;\u8fd9\u5c31\u662f\u4f60\u5199\u4ee3\u7801\u548c\u7f16\u8bd1\u811a\u672c\u7684\u5730\u65b9\u3002<\/p>\n<p>\u63d0\u793a&#xff1a;\u63a8\u8350\u4f7f\u7528 VSCode&#xff0c;\u4ee3\u7801\u8865\u5168\u66f4\u5f3a\u5927\u3002\u5165\u95e8\u9636\u6bb5\u7528 qawno \u5c31\u591f\u4e86\u3002<\/p>\n<hr \/>\n<h3>3. \u7b2c\u4e00\u4e2a\u811a\u672c<\/h3>\n<h4>\u521b\u5efa\u811a\u672c\u6587\u4ef6<\/h4>\n<p>\u5728 qawno \u4e2d&#xff0c;\u70b9\u51fb\u83dc\u5355 File \u2192 New Blank&#xff0c;\u7136\u540e\u8f93\u5165\u4ee5\u4e0b\u4ee3\u7801&#xff1a;<\/p>\n<p>#include &lt;open.mp&gt;<\/p>\n<p>main(){}<\/p>\n<p>public OnGameModeInit()<br \/>\n{<br \/>\n    SetGameModeText(&#034;\u6211\u7684\u7b2c\u4e00\u4e2aopen.mp\u670d\u52a1\u5668&#034;);<br \/>\n    AddPlayerClass(1, 2495.3547, -1688.2319, 13.6774, 351.1646, WEAPON_M4, 500, WEAPON_KNIFE, 1, WEAPON_COLORT45, 100);<br \/>\nAddStaticVehicle(522, 2493.7583, -1683.6482, 12.9099, 270.8069, -1, -1);<br \/>\n    return 1;<br \/>\n}<\/p>\n<h4>\u4fdd\u5b58\u5e76\u7f16\u8bd1<\/h4>\n<p>\u70b9\u51fb File \u2192 Save&#xff0c;\u4fdd\u5b58\u4e3a mygamemode.pwn&#xff0c;\u4fdd\u5b58\u5230 gamemodes\/ \u76ee\u5f55\u4e0b\u3002<\/p>\n<p>\u7136\u540e\u6309 F5 \u7f16\u8bd1\u3002<\/p>\n<p>\u7f16\u8bd1\u6210\u529f\u540e&#xff0c;\u5728\u540c\u76ee\u5f55\u4f1a\u751f\u6210 mygamemode.amx \u6587\u4ef6\u3002<\/p>\n<h4>\u542f\u52a8\u670d\u52a1\u5668<\/h4>\n<p>\u53cc\u51fb omp-server.exe&#xff0c;\u5c31\u6210\u529f\u542f\u52a8\u670d\u52a1\u5668\u4e86\u3002<\/p>\n<h4>\u4ee3\u7801\u89e3\u91ca<\/h4>\n<table>\n<tr>\u4ee3\u7801\u542b\u4e49<\/tr>\n<tbody>\n<tr>\n<td>#include &lt;open.mp&gt;<\/td>\n<td>\u5f15\u5165 open.mp \u7684\u6240\u6709\u51fd\u6570&#xff0c;\u5fc5\u987b\u5199\u5728\u7b2c\u4e00\u884c<\/td>\n<\/tr>\n<tr>\n<td>public OnGameModeInit()<\/td>\n<td>\u670d\u52a1\u5668\u542f\u52a8\u65f6\u81ea\u52a8\u6267\u884c\u7684\u51fd\u6570<\/td>\n<\/tr>\n<tr>\n<td>SetGameModeText(&#034;&#8230;&#034;)<\/td>\n<td>\u8bbe\u7f6e\u670d\u52a1\u5668\u6a21\u5f0f\u540d\u79f0&#xff08;\u663e\u793a\u5728\u670d\u52a1\u5668\u5217\u8868&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>AddPlayerClass(&#8230;)<\/td>\n<td>\u5728\u804c\u4e1a\u9009\u62e9\u4e2d\u6dfb\u52a0\u4e00\u4e2a\u804c\u4e1a \u7528\u4e8e\u8ba9\u73a9\u5bb6\u53ef\u4ee5\u4ee5\u81ea\u5df1\u9009\u62e9\u7684\u76ae\u80a4\u51fa\u751f<\/td>\n<\/tr>\n<tr>\n<td>AddStaticVehicle(&#8230;)<\/td>\n<td>\u5728\u6e38\u620f\u6a21\u5f0f\u4e2d\u6dfb\u52a0\u9759\u6001\u8f66\u8f86&#xff08;\u6a21\u578b\u4f1a\u9884\u52a0\u8f7d\u7ed9\u73a9\u5bb6&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>return 1;<\/td>\n<td>\u51fd\u6570\u7ed3\u675f&#xff0c;\u8fd4\u56de 1 \u8868\u793a\u6210\u529f<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u89c4\u5219&#xff1a;\u6bcf\u6761\u8bed\u53e5\u672b\u5c3e\u5fc5\u987b\u6709 \u5206\u53f7 ;&#xff0c;\u82b1\u62ec\u53f7 {} \u8868\u793a\u4ee3\u7801\u5757\u7684\u5f00\u59cb\u548c\u7ed3\u675f\u3002<\/p>\n<hr \/>\n<h3>4. \u6ce8\u91ca<\/h3>\n<p>\u6ce8\u91ca\u662f\u5199\u7ed9\u4eba\u770b\u7684\u8bf4\u660e\u6587\u5b57&#xff0c;\u7f16\u8bd1\u5668\u4f1a\u5b8c\u5168\u5ffd\u7565\u5b83&#xff0c;\u4e0d\u5f71\u54cd\u7a0b\u5e8f\u8fd0\u884c\u3002<\/p>\n<p>\u5199\u6ce8\u91ca\u7684\u597d\u5904\u662f\u4ee5\u540e\u56de\u770b\u4ee3\u7801\u65f6\u4f1a\u8f7b\u677e\u5f88\u591a\u3002<\/p>\n<h4>\u5355\u884c\u6ce8\u91ca<\/h4>\n<p>\u7528 \/\/ \u5f00\u5934&#xff0c;\u4ece\u8fd9\u91cc\u5230\u884c\u5c3e\u90fd\u662f\u6ce8\u91ca&#xff1a;<\/p>\n<p>\/\/ \u8fd9\u662f\u4e00\u884c\u6ce8\u91ca&#xff0c;\u4e0d\u4f1a\u88ab\u6267\u884c<br \/>\nSetGameModeText(&#034;\u6211\u7684\u7b2c\u4e00\u4e2aopen.mp\u670d\u52a1\u5668&#034;);  \/\/ \u4e5f\u53ef\u4ee5\u5199\u5728\u4ee3\u7801\u540e\u9762<\/p>\n<h4>\u591a\u884c\u6ce8\u91ca<\/h4>\n<p>\u7528 \/* &#8230; *\/ \u5305\u88f9&#xff0c;\u53ef\u4ee5\u8de8\u8d8a\u591a\u884c&#xff1a;<\/p>\n<p>\/*<br \/>\n    \u8fd9\u91cc\u662f\u591a\u884c\u6ce8\u91ca\u3002<br \/>\n    \u53ef\u4ee5\u5199\u5f88\u591a\u884c\u3002<br \/>\n    \u5e38\u7528\u4e8e\u8bf4\u660e\u3002<br \/>\n*\/<br \/>\npublic OnGameModeInit()<br \/>\n{<br \/>\n    return 1;<br \/>\n}<\/p>\n<p>\u5efa\u8bae&#xff1a;\u65b0\u624b\u53ef\u4ee5\u7ed9\u6bcf\u4e2a\u51fd\u6570\u5199\u4e00\u884c\u6ce8\u91ca\u8bf4\u660e\u5b83\u7684\u7528\u9014&#xff0c;\u7ed9\u590d\u6742\u903b\u8f91\u5199\u6ce8\u91ca\u8bf4\u660e\u601d\u8def\u3002<\/p>\n<hr \/>\n<h3>5. \u53d8\u91cf<\/h3>\n<p>\u53d8\u91cf\u662f\u7528\u6765\u5b58\u50a8\u6570\u636e\u7684\u5bb9\u5668&#xff0c;\u5c31\u50cf\u4e00\u4e2a\u8d34\u4e86\u6807\u7b7e\u7684\u76d2\u5b50\u3002<\/p>\n<h4>\u58f0\u660e\u53d8\u91cf<\/h4>\n<p>\u7528 new \u5173\u952e\u5b57\u58f0\u660e\u53d8\u91cf&#xff1a;<\/p>\n<p>new myScore;         \/\/ \u58f0\u660e\u4e00\u4e2a\u6574\u6570\u53d8\u91cf&#xff0c;\u521d\u59cb\u503c\u9ed8\u8ba4\u662f 0<br \/>\nnew myScore &#061; 10;    \/\/ \u58f0\u660e\u5e76\u8d4b\u521d\u59cb\u503c<\/p>\n<h4>\u53d8\u91cf\u7c7b\u578b<\/h4>\n<p>\u6574\u6570&#xff08;\u9ed8\u8ba4\u7c7b\u578b&#xff09;<\/p>\n<p>new myAge &#061; 25;<br \/>\nnew myGold &#061; 100;<br \/>\nnew myScore &#061; 0;<\/p>\n<p>\u6d6e\u70b9\u6570&#xff08;\u5c0f\u6570&#xff09;<\/p>\n<p>\u6d6e\u70b9\u6570\u9700\u8981\u5728\u53d8\u91cf\u540d\u524d\u52a0 Float: \u6807\u7b7e&#xff1a;<\/p>\n<p>new Float:myHealth &#061; 100.0;<br \/>\nnew Float:mySpeed  &#061; 3.14;<br \/>\nnew Float:myX      &#061; 1234.5;   \/\/ \u5750\u6807\u901a\u5e38\u662f\u6d6e\u70b9\u6570<\/p>\n<h4>\u53d8\u91cf\u547d\u540d\u89c4\u8303<\/h4>\n<p>\u53d8\u91cf\u540d\u53ea\u80fd\u5305\u542b\u5b57\u6bcd\u3001\u6570\u5b57\u3001\u4e0b\u5212\u7ebf&#xff0c;\u4e14\u4e0d\u80fd\u4ee5\u6570\u5b57\u5f00\u5934&#xff0c;\u63a8\u8350&#xff1a;g_ \u524d\u7f00\u8868\u793a\u5168\u5c40\u53d8\u91cf<\/p>\n<p>new g_Score &#061; 0;<br \/>\nnew g_Speed &#061; 0.0;<br \/>\nnew g_Name[32];<\/p>\n<p>\u8fd9\u79cd\u524d\u7f00\u547d\u540d\u6cd5\u4e0d\u662f\u5f3a\u5236\u8981\u6c42&#xff0c;\u4f46\u80fd\u8ba9\u4ee3\u7801\u66f4\u6613\u8bfb&#xff0c;\u867d\u7136\u4e0d\u662f\u4e3b\u6d41\u5b9e\u8df5&#xff0c;\u4f46\u6bd4\u8f83\u9002\u7528\u4e8epawn\u5f00\u53d1\u3002<\/p>\n<h4>\u5168\u5c40\u53d8\u91cf vs \u5c40\u90e8\u53d8\u91cf<\/h4>\n<p>\/\/ \u5168\u5c40\u53d8\u91cf&#xff1a;\u5199\u5728\u6240\u6709\u51fd\u6570\u5916\u9762&#xff0c;\u6574\u4e2a\u811a\u672c\u90fd\u80fd\u8bbf\u95ee&#xff0c;g_ \u524d\u7f00\u8868\u793a\u5168\u5c40&#xff08;global&#xff09;<br \/>\nnew g_PlayerScore[MAX_PLAYERS];<\/p>\n<p>public OnPlayerConnect(playerid)<br \/>\n{<br \/>\n    \/\/ \u5c40\u90e8\u53d8\u91cf&#xff1a;\u5199\u5728\u51fd\u6570\u5185\u90e8&#xff0c;\u53ea\u5728\u8fd9\u4e2a\u51fd\u6570\u91cc\u6709\u6548&#xff0c;\u9a7c\u5cf0\u547d\u540d\u6cd5\u200c&#xff08;camelCase&#xff09;&#xff1a;\u9996\u8bcd\u5c0f\u5199&#xff0c;\u540e\u7eed\u5927\u5199<br \/>\n    new defaultScore &#061; 50;<br \/>\n    g_PlayerScore[playerid] &#061; defaultScore;<br \/>\n    return 1;<br \/>\n}<\/p>\n<hr \/>\n<h3>6. define<\/h3>\n<p>\u5b83\u672c\u8d28\u4e0a\u662f\u4e00\u4e2a\u6587\u672c\u66ff\u6362\u7b26\u53f7&#xff0c;\u800c\u4e0d\u662f\u4e00\u4e2a\u771f\u6b63\u7684\u53d8\u91cf\u6216\u5e38\u91cf&#xff0c;\u4ece\u4f7f\u7528\u6548\u679c\u770b&#xff0c;\u5b83\u8868\u73b0\u5f97\u50cf\u4e00\u4e2a\u5e38\u91cf&#xff08;\u8fd0\u884c\u8fc7\u7a0b\u4e2d\u4e0d\u80fd\u6539\u53d8\u5176\u6570\u503c&#xff09;&#xff0c;\u5728\u7f16\u8bd1\u65f6\u76f4\u63a5\u66ff\u6362&#xff0c;\u4e0d\u5360\u7528\u5185\u5b58<\/p>\n<p>\u5e38\u91cf\u5e38\u7528\u4e8e\u66ff\u4ee3\u9b54\u6cd5\u6570\u5b57&#xff0c;\u4f7f\u4ee3\u7801\u66f4\u5177\u53ef\u8bfb\u6027\u548c\u53ef\u7ef4\u62a4\u6027&#xff0c;\u5728\u8fd9\u7bc7\u6559\u7a0b\u4e2d\u6211\u4eec\u6682\u65f6\u79f0\u5b83\u4e3a\u5e38\u91cf\u3002<\/p>\n<h4>\u5b9a\u4e49\u5e38\u91cf<\/h4>\n<p>#define SERVER_NAME     &#034;\u6211\u7684\u7b2c\u4e00\u4e2aopen.mp\u670d\u52a1\u5668&#034;<br \/>\n#define MAX_GOLD        999<br \/>\n#define START_GOLD      50<br \/>\n#define PI              3.14159<\/p>\n<h4>\u5982\u4f55\u4f7f\u7528<\/h4>\n<p>public OnGameModeInit()<br \/>\n{<br \/>\n    SetGameModeText(SERVER_NAME);   \/\/ \u7b49\u540c\u4e8e SetGameModeText(&#034;\u6211\u7684\u7b2c\u4e00\u4e2aopen.mp\u670d\u52a1\u5668&#034;);<br \/>\n    return 1;<br \/>\n}<\/p>\n<p>public OnPlayerConnect(playerid)<br \/>\n{<br \/>\n    g_Gold[playerid] &#061; START_GOLD;  \/\/ \u7b49\u540c\u4e8e g_Gold[playerid] &#061; 50;<br \/>\n    return 1;<br \/>\n}<\/p>\n<p>\u89c4\u8303&#xff1a;\u5168\u90e8\u5927\u5199&#xff0c;\u5355\u8bcd\u95f4\u7528\u4e0b\u5212\u7ebf\u5206\u9694&#xff0c;\u4f8b\u5982 MAX_PLAYERS\u3001SKIN_NORMAL\u3002<\/p>\n<hr \/>\n<h3>7. \u5b57\u7b26\u4e32\u4e0e format<\/h3>\n<p>\u5b57\u7b26\u4e32\u5c31\u662f\u4e00\u6bb5\u6587\u5b57\u3002\u5728 Pawn \u4e2d&#xff0c;\u5b57\u7b26\u4e32\u7528\u5b57\u7b26\u6570\u7ec4\u5b58\u50a8\u3002<\/p>\n<h4>\u58f0\u660e\u5b57\u7b26\u4e32<\/h4>\n<p>new g_Name[32];                 \/\/ \u6700\u591a\u5b58 31 \u4e2a\u5b57\u7b26&#xff08;\u7559\u4e00\u4f4d\u7ed9\u7ed3\u675f\u7b26&#xff09;<br \/>\nnew g_Msg[128];                 \/\/ \u6d88\u606f\u901a\u5e38\u7528 128 \u6216 256<br \/>\nnew g_Name[MAX_PLAYER_NAME];   \/\/ \u7528\u5185\u7f6e\u5e38\u91cf&#xff0c;\u7b49\u540c\u4e8e g_Name[24]<\/p>\n<h4>\u83b7\u53d6\u73a9\u5bb6\u540d\u5b57<\/h4>\n<p>new g_Name[MAX_PLAYER_NAME];<br \/>\nGetPlayerName(playerid, g_Name, sizeof(g_Name)); \/\/ sizeof(g_Name) \u81ea\u52a8\u8ba1\u7b97\u6570\u7ec4\u5927\u5c0f&#xff0c;\u4e0d\u9700\u8981\u624b\u52a8\u586b\u6570\u5b57<\/p>\n<h4>format \u2014 \u683c\u5f0f\u5316\u5b57\u7b26\u4e32<\/h4>\n<p>format \u53ef\u4ee5\u628a\u53d8\u91cf\u7684\u503c\u62fc\u8fdb\u5b57\u7b26\u4e32\u91cc&#xff0c;\u7c7b\u4f3c\u5176\u4ed6\u8bed\u8a00\u7684\u5b57\u7b26\u4e32\u6a21\u677f&#xff1a;<\/p>\n<p>new string[128];<br \/>\nnew name[MAX_PLAYER_NAME];<br \/>\nnew gold &#061; 100;<\/p>\n<p>GetPlayerName(playerid, name, sizeof(name));<\/p>\n<p>format(string, sizeof(string), &#034;\u4f60\u597d&#xff0c;%s&#xff01;\u4f60\u6709 %d \u679a\u91d1\u5e01\u3002&#034;, name, gold);<br \/>\n\/\/ \u7ed3\u679c&#xff1a;&#034;\u4f60\u597d&#xff0c;CJ&#xff01;\u4f60\u6709 100 \u679a\u91d1\u5e01\u3002&#034;<\/p>\n<h4>\u683c\u5f0f\u5360\u4f4d\u7b26<\/h4>\n<table>\n<tr>\u5360\u4f4d\u7b26\u542b\u4e49\u793a\u4f8b<\/tr>\n<tbody>\n<tr>\n<td>%s<\/td>\n<td>\u5b57\u7b26\u4e32<\/td>\n<td>&#034;Hello, %s&#034;<\/td>\n<\/tr>\n<tr>\n<td>%d<\/td>\n<td>\u6574\u6570<\/td>\n<td>&#034;\u91d1\u5e01&#xff1a;%d&#034;<\/td>\n<\/tr>\n<tr>\n<td>%f<\/td>\n<td>\u6d6e\u70b9\u6570<\/td>\n<td>&#034;\u8840\u91cf&#xff1a;%.1f&#034;<\/td>\n<\/tr>\n<tr>\n<td>%i<\/td>\n<td>\u6574\u6570&#xff08;\u540c %d&#xff09;<\/td>\n<td>&#034;\u7b49\u7ea7&#xff1a;%i&#034;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>%.1f \u8868\u793a\u4fdd\u7559 1 \u4f4d\u5c0f\u6570&#xff0c;%.2f \u4fdd\u7559 2 \u4f4d&#xff0c;\u4ee5\u6b64\u7c7b\u63a8\u3002<\/p>\n<hr \/>\n<h3>8. \u8fd0\u7b97\u7b26<\/h3>\n<h4>\u7b97\u672f\u8fd0\u7b97\u7b26<\/h4>\n<p>new a &#061; 10;<br \/>\nnew b &#061; 3;<\/p>\n<p>new add  &#061; a &#043; b;   \/\/ 13  \u52a0<br \/>\nnew sub  &#061; a &#8211; b;   \/\/ 7   \u51cf<br \/>\nnew mul  &#061; a * b;   \/\/ 30  \u4e58<br \/>\nnew div  &#061; a \/ b;   \/\/ 3   \u9664&#xff08;\u6574\u6570\u9664\u6cd5&#xff0c;\u820d\u53bb\u5c0f\u6570&#xff09;<br \/>\nnew mod  &#061; a % b;   \/\/ 1   \u53d6\u4f59&#xff08;10 \u9664\u4ee5 3 \u4f59 1&#xff09;<\/p>\n<h4>\u5feb\u6377\u8d4b\u503c<\/h4>\n<p>new gold &#061; 100;<br \/>\ngold &#043;&#061; 50;   \/\/ \u7b49\u540c\u4e8e gold &#061; 100 &#043; 50  \u2192  150<br \/>\ngold -&#061; 20;   \/\/ \u7b49\u540c\u4e8e gold &#061; 100 &#8211; 20  \u2192  80<br \/>\ngold *&#061; 2;    \/\/ \u7b49\u540c\u4e8e gold &#061; 100 * 2   \u2192  200<br \/>\ngold \/&#061; 4;    \/\/ \u7b49\u540c\u4e8e gold &#061; 100 \/ 4   \u2192  25<\/p>\n<h4>\u81ea\u589e \/ \u81ea\u51cf<\/h4>\n<p>new i &#061; 0;<br \/>\ni&#043;&#043;;    \/\/ i \u53d8\u6210 1&#xff0c;\u7b49\u540c\u4e8e i &#061; i &#043; 1<br \/>\ni&#8211;;    \/\/ i \u53d8\u6210 0&#xff0c;\u7b49\u540c\u4e8e i &#061; i &#8211; 1<\/p>\n<h4>\u6bd4\u8f83\u8fd0\u7b97\u7b26&#xff08;\u8fd4\u56de\u771f\/\u5047&#xff09;<\/h4>\n<table>\n<tr>\u8fd0\u7b97\u7b26\u542b\u4e49<\/tr>\n<tbody>\n<tr>\n<td>&#061;&#061;<\/td>\n<td>\u7b49\u4e8e<\/td>\n<\/tr>\n<tr>\n<td>!&#061;<\/td>\n<td>\u4e0d\u7b49\u4e8e<\/td>\n<\/tr>\n<tr>\n<td>&gt;<\/td>\n<td>\u5927\u4e8e<\/td>\n<\/tr>\n<tr>\n<td>&lt;<\/td>\n<td>\u5c0f\u4e8e<\/td>\n<\/tr>\n<tr>\n<td>&gt;&#061;<\/td>\n<td>\u5927\u4e8e\u7b49\u4e8e<\/td>\n<\/tr>\n<tr>\n<td>&lt;&#061;<\/td>\n<td>\u5c0f\u4e8e\u7b49\u4e8e<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>new gold &#061; 100;<\/p>\n<p>if(gold &#061;&#061; 100)  { \/* \u5982\u679cgold\u7b49\u4e8e100 \u5219\u6210\u7acb *\/ }<br \/>\nif(gold &gt; 50)    { \/* \u5982\u679cgold\u5927\u4e8e50 \u5219\u6210\u7acb *\/ }<br \/>\nif(gold !&#061; 0)    { \/* \u5982\u679cgold\u4e0d\u7b49\u4e8e0 \u5219\u6210\u7acb *\/ }<\/p>\n<p>\u5e38\u89c1\u9519\u8bef&#xff1a;\u5224\u65ad\u7528 &#061;&#061;&#xff08;\u4e24\u4e2a\u7b49\u53f7&#xff09;&#xff0c;\u8d4b\u503c\u7528 &#061;&#xff08;\u4e00\u4e2a\u7b49\u53f7&#xff09;\u3002\u5199\u6210 if(gold &#061; 100) \u662f\u8d4b\u503c&#xff0c;\u4e0d\u662f\u5224\u65ad&#xff01;<\/p>\n<h4>\u903b\u8f91\u8fd0\u7b97\u7b26<\/h4>\n<table>\n<tr>\u8fd0\u7b97\u7b26\u542b\u4e49\u793a\u4f8b<\/tr>\n<tbody>\n<tr>\n<td>&amp;&amp;<\/td>\n<td>\u4e14&#xff08;\u4e24\u4e2a\u90fd\u6210\u7acb&#xff09;<\/td>\n<td>gold &gt; 0 &amp;&amp; isAlive<\/td>\n<\/tr>\n<tr>\n<td>||<\/td>\n<td>\u6216&#xff08;\u4efb\u610f\u4e00\u4e2a\u6210\u7acb&#xff09;<\/td>\n<td>isAdmin || isVIP<\/td>\n<\/tr>\n<tr>\n<td>!<\/td>\n<td>\u975e&#xff08;\u53d6\u53cd&#xff09;<\/td>\n<td>!IsPlayerConnected(i)<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr \/>\n<h3>9. if \/ else \u5224\u65ad<\/h3>\n<p>if \/ else \u6839\u636e\u6761\u4ef6\u51b3\u5b9a\u6267\u884c\u54ea\u6bb5\u4ee3\u7801\u3002<\/p>\n<h4>\u57fa\u7840\u7528\u6cd5<\/h4>\n<p>new gold &#061; 80;<\/p>\n<p>\/\/ \u5982\u679c\u91d1\u5e01\u5927\u4e8e100<br \/>\nif(gold &gt;&#061; 100)<br \/>\n{<br \/>\n    SendClientMessage(playerid, 0xFFFF00FF, &#034;\u91d1\u5e01\u5145\u8db3&#xff0c;\u53ef\u4ee5\u8d2d\u4e70&#xff01;&#034;);<br \/>\n}<br \/>\n\/\/ \u5426\u5219<br \/>\nelse<br \/>\n{<br \/>\n    SendClientMessage(playerid, 0xFF4444FF, &#034;\u91d1\u5e01\u4e0d\u8db3&#xff01;&#034;);<br \/>\n}<\/p>\n<h4>if \/ else if \/ else<\/h4>\n<p>new myLevel &#061; 5;<\/p>\n<p>if(myLevel &gt;&#061; 10)<br \/>\n{<br \/>\n    SendClientMessage(playerid, -1, &#034;\u4f60\u662f\u9ad8\u7ea7\u73a9\u5bb6&#xff01;&#034;);<br \/>\n}<br \/>\nelse if(myLevel &gt;&#061; 5)<br \/>\n{<br \/>\n    SendClientMessage(playerid, -1, &#034;\u4f60\u662f\u4e2d\u7ea7\u73a9\u5bb6\u3002&#034;);<br \/>\n}<br \/>\nelse<br \/>\n{<br \/>\n    SendClientMessage(playerid, -1, &#034;\u4f60\u662f\u65b0\u624b\u3002&#034;);<br \/>\n}<\/p>\n<hr \/>\n<h3>10. switch \u591a\u5206\u652f<\/h3>\n<p>\u5f53\u4f60\u9700\u8981\u6839\u636e\u4e00\u4e2a\u53d8\u91cf\u7684\u591a\u4e2a\u5177\u4f53\u503c\u505a\u4e0d\u540c\u5904\u7406\u65f6&#xff0c;switch \u6bd4\u4e00\u5806 else if \u66f4\u6e05\u6670\u3002<\/p>\n<h4>\u57fa\u7840\u7528\u6cd5<\/h4>\n<p>new g_Class &#061; 2;<\/p>\n<p>switch(g_Class)<br \/>\n{<br \/>\n    case 0:<br \/>\n    {<br \/>\n        SendClientMessage(playerid, -1, &#034;\u4f60\u9009\u62e9\u4e86&#xff1a;\u519c\u6c11&#034;);<br \/>\n        SetPlayerSkin(playerid, 86);<br \/>\n    }<br \/>\n    case 1:<br \/>\n    {<br \/>\n        SendClientMessage(playerid, -1, &#034;\u4f60\u9009\u62e9\u4e86&#xff1a;\u9a91\u58eb&#034;);<br \/>\n        SetPlayerSkin(playerid, 287);<br \/>\n    }<br \/>\n    case 2:<br \/>\n    {<br \/>\n        SendClientMessage(playerid, -1, &#034;\u4f60\u9009\u62e9\u4e86&#xff1a;\u5546\u4eba&#034;);<br \/>\n        SetPlayerSkin(playerid, 19);<br \/>\n    }<br \/>\n    default:<br \/>\n    {<br \/>\n        \/\/ \u4ee5\u4e0a\u90fd\u4e0d\u5339\u914d\u65f6<br \/>\n        SendClientMessage(playerid, -1, &#034;\u672a\u77e5\u804c\u4e1a&#034;);<br \/>\n    }<br \/>\n}<\/p>\n<h4>\u5b9e\u9645\u5e94\u7528&#xff1a;\u5904\u7406\u5bf9\u8bdd\u6846\u54cd\u5e94<\/h4>\n<p>public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])<br \/>\n{<br \/>\n    if(dialogid &#061;&#061; DIALOG_SHOP)<br \/>\n    {<br \/>\n        if(!response) return 1;   \/\/ \u70b9\u4e86\u53d6\u6d88&#xff0c;\u4e0d\u5904\u7406&#xff0c;\u7b49\u540c\u4e8eif(response &#061;&#061; false)<\/p>\n<p>        switch(listitem)<br \/>\n        {<br \/>\n            case 0: SetPlayerSkin(playerid, 86);   \/\/ \u9009\u62e9\u4e86\u5bf9\u8bdd\u6846\u7684\u7b2c\u4e00\u4e2a\u9009\u9879<br \/>\n            case 1: SetPlayerSkin(playerid, 287);  \/\/ \u9009\u62e9\u4e86\u5bf9\u8bdd\u6846\u7684\u7b2c\u4e8c\u4e2a\u9009\u9879<br \/>\n            case 2: SetPlayerSkin(playerid, 19);   \/\/ \u9009\u62e9\u4e86\u5bf9\u8bdd\u6846\u7684\u7b2c\u4e09\u4e2a\u9009\u9879<br \/>\n        }<br \/>\n    }<br \/>\n    return 1;<br \/>\n}<\/p>\n<p>switch \u4e2d\u6bcf\u4e2a case \u540e\u9762\u7684\u503c\u5fc5\u987b\u662f\u6574\u6570\u6216\u5e38\u91cf&#xff0c;\u4e0d\u80fd\u662f\u5b57\u7b26\u4e32\u6216\u6d6e\u70b9\u6570\u3002<\/p>\n<hr \/>\n<h3>11. for \u5faa\u73af<\/h3>\n<p>\u5f53\u4f60\u9700\u8981\u91cd\u590d\u6267\u884c\u67d0\u6bb5\u4ee3\u7801\u65f6&#xff0c;\u7528\u5faa\u73af\u3002<\/p>\n<p>for \u5faa\u73af\u9002\u5408\u5df2\u77e5\u91cd\u590d\u6b21\u6570\u7684\u573a\u666f\u3002<\/p>\n<h4>\u57fa\u7840\u7ed3\u6784<\/h4>\n<p>\/\/   \u521d\u59cb\u503c; \u6761\u4ef6; \u6bcf\u6b21\u5faa\u73af\u540e\u6267\u884c<br \/>\nfor(new i &#061; 0; i &lt; 5; i&#043;&#043;)<br \/>\n{<br \/>\n    \/\/ \u8fd9\u91cc\u7684\u4ee3\u7801\u4f1a\u6267\u884c 5 \u6b21&#xff08;i &#061; 0, 1, 2, 3, 4&#xff09;<br \/>\n    print(&#034;\u5faa\u73af\u4e2d&#8230;(\u5df2\u5faa\u73af%d\u6b21)&#034;, i &#043; 1);<br \/>\n}<\/p>\n<h4>\u904d\u5386\u6240\u6709\u5728\u7ebf\u73a9\u5bb6<\/h4>\n<p>\/\/ \u7ed9\u6240\u6709\u5728\u7ebf\u73a9\u5bb6\u53d1\u9001\u6d88\u606f<br \/>\nfor(new i &#061; 0; i &lt; MAX_PLAYERS; i&#043;&#043;)<br \/>\n{<br \/>\n    if(IsPlayerNPC(i) &#061;&#061; false &amp;&amp; inGame[i] &#061;&#061; true)<br \/>\n    {<br \/>\n        SendClientMessage(i, 0xFFFF00FF, &#034;[\u516c\u544a] \u6bd4\u8d5b\u5f00\u59cb&#xff01;&#034;);<br \/>\n        GivePlayerWeapon(i, WEAPON_AK47, 1500);<br \/>\n        SetPlayerPos(i, 0.0, 0.0, 2.5);<br \/>\n        \/\/ \u7ed9\u6240\u6709\u73a9\u5bb6\u52a0\u91d1\u5e01<br \/>\n        g_Gold[i] &#043;&#061; 10;<br \/>\n    }<br \/>\n}<\/p>\n<p>\u4f46\u901a\u5e38\u5386\u904d\u73a9\u5bb6\u6211\u4eec\u4f1a\u9009\u62e9foreach\u5e93&#xff0c;\u66f4\u9ad8\u6548\u3002 \u6ce8\u610f&#xff1a;i &lt; MAX_PLAYERS \u4e0d\u80fd\u5199\u6210 i &lt;&#061; MAX_PLAYERS&#xff0c;\u5426\u5219\u4f1a\u8d8a\u754c\u3002 MAX_PLAYERS \u662f\u6700\u5927\u73a9\u5bb6\u6570&#xff0c;\u6709\u6548\u7684 playerid \u662f 0 \u5230 MAX_PLAYERS &#8211; 1\u3002<\/p>\n<hr \/>\n<h3>12. while \u5faa\u73af<\/h3>\n<p>while \u5faa\u73af\u9002\u5408\u4e0d\u77e5\u9053\u8981\u5faa\u73af\u591a\u5c11\u6b21\u3001\u53ea\u77e5\u9053\u5faa\u73af\u6761\u4ef6\u7684\u573a\u666f\u3002<\/p>\n<h4>\u57fa\u7840\u7ed3\u6784<\/h4>\n<p>new i &#061; 0;<br \/>\nwhile(i &lt; 5)<br \/>\n{<br \/>\n    print(&#034;\u6267\u884c\u4e2d&#8230;&#034;);<br \/>\n    i&#043;&#043;;     \/\/ \u4e00\u5b9a\u8981\u8bb0\u5f97\u8ba9\u6761\u4ef6\u5411\u7ec8\u6b62\u9760\u8fd1&#xff0c;\u5426\u5219\u4f1a\u5bfc\u81f4\u65e0\u9650\u6b7b\u5faa\u73af&#xff01;<br \/>\n}<\/p>\n<h4>while vs for<\/h4>\n<table>\n<tr>\u573a\u666f\u63a8\u8350<\/tr>\n<tbody>\n<tr>\n<td>\u56fa\u5b9a\u6b21\u6570\u7684\u91cd\u590d&#xff08;\u5982\u904d\u5386\u6240\u6709\u73a9\u5bb6&#xff09;<\/td>\n<td>for<\/td>\n<\/tr>\n<tr>\n<td>\u6761\u4ef6\u4e0d\u6ee1\u8db3\u5c31\u4e00\u76f4\u5faa\u73af&#xff08;\u5982\u7b49\u5f85\u67d0\u4e2a\u72b6\u6001&#xff09;<\/td>\n<td>while<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u8b66\u544a&#xff1a;\u5faa\u73af\u4f53\u5185\u4e00\u5b9a\u8981\u6709\u8ba9\u6761\u4ef6\u53d8\u5316\u7684\u8bed\u53e5&#xff0c;\u5426\u5219\u4f1a\u8fdb\u5165\u6b7b\u5faa\u73af&#xff0c;\u5bfc\u81f4\u670d\u52a1\u5668\u5361\u6b7b\u3002<\/p>\n<hr \/>\n<h3>13. \u51fd\u6570<\/h3>\n<p>\u51fd\u6570\u662f\u628a\u4e00\u6bb5\u4ee3\u7801\u6253\u5305\u8d77\u6765\u547d\u540d&#xff0c;\u65b9\u4fbf\u91cd\u590d\u8c03\u7528&#xff0c;\u907f\u514d\u91cd\u590d\u5199\u540c\u6837\u7684\u4ee3\u7801\u3002<\/p>\n<h4>\u5b9a\u4e49\u51fd\u6570<\/h4>\n<p>\/\/ \u51fd\u6570\u540d(\u53c2\u6570\u5217\u8868)<br \/>\n\/\/ {<br \/>\n\/\/     \u4ee3\u7801\u5185\u5bb9<br \/>\n\/\/     return \u8fd4\u56de\u503c;<br \/>\n\/\/ }<\/p>\n<p>GiveGold(playerid, amount)<br \/>\n{<br \/>\n    g_Gold[playerid] &#043;&#061; amount;<br \/>\n    SendClientMessage(playerid, 0xFFDD44FF, &#034;\u4f60\u83b7\u5f97\u4e86\u91d1\u5e01&#xff01;&#034;);<br \/>\n    return 1;<br \/>\n}<\/p>\n<h4>\u8c03\u7528\u51fd\u6570<\/h4>\n<p>public OnPlayerConnect(playerid)<br \/>\n{<br \/>\n    GiveGold(playerid, 50);    \/\/ \u73a9\u5bb6\u8fde\u5165\u65f6\u7ed9 50 \u91d1\u5e01<br \/>\n    return 1;<br \/>\n}<\/p>\n<h4>\u5e26\u7279\u5b9a\u8fd4\u56de\u503c\u7684\u51fd\u6570<\/h4>\n<p>\/\/ \u68c0\u67e5\u73a9\u5bb6\u91d1\u5e01\u662f\u5426\u8db3\u591f&#xff0c;\u8fd4\u56de true&#xff08;\u8db3\u591f&#xff09;\u6216 false&#xff08;\u4e0d\u8db3&#xff09;<br \/>\nbool:HasEnoughGold(playerid, cost)<br \/>\n{<br \/>\n    if(g_Gold[playerid] &gt;&#061; cost)<br \/>\n    {<br \/>\n        return true;   \/\/ \u8db3\u591f<br \/>\n    }<br \/>\n    return false;       \/\/ \u4e0d\u8db3<br \/>\n}<\/p>\n<p>\/\/ \u4f7f\u7528&#xff1a;<br \/>\nif(HasEnoughGold(playerid, 100) &#061;&#061; true)<br \/>\n{<br \/>\n    SendClientMessage(playerid, -1, &#034;\u53ef\u4ee5\u8d2d\u4e70&#xff01;&#034;);<br \/>\n}<\/p>\n<h4>\u4e0d\u9700\u8981\u5e26\u4efb\u4f55\u8fd4\u56de\u503c\u7684\u51fd\u6570<\/h4>\n<p>void:ResetGold(playerid)<br \/>\n{<br \/>\n    g_Gold[playerid] &#061; 0;<br \/>\n    SendClientMessage(playerid, 0xFFDD44FF, &#034;\u4f60\u7684\u91d1\u5e01\u88ab\u6e05\u7a7a\u4e86&#034;);<br \/>\n}<\/p>\n<h4>stock \u51fd\u6570<\/h4>\n<p>\u5728 Pawn \u4e2d&#xff0c;\u5982\u679c\u4f60\u5b9a\u4e49\u4e86\u51fd\u6570\u4f46\u67d0\u4e9b\u60c5\u51b5\u4e0b\u6ca1\u7528\u5230&#xff0c;\u7f16\u8bd1\u5668\u4f1a\u53d1\u51fa\u8b66\u544a\u3002 \u52a0\u4e0a stock \u5173\u952e\u5b57\u53ef\u4ee5\u6d88\u9664\u8fd9\u4e2a\u8b66\u544a&#xff1a;<\/p>\n<p>stock GetPlayerGold(playerid)<br \/>\n{<br \/>\n    return g_Gold[playerid];<br \/>\n}<\/p>\n<p>\u539f\u5219&#xff1a;\u628a\u91cd\u590d\u7528\u5230 3 \u6b21\u4ee5\u4e0a\u7684\u4ee3\u7801\u5c01\u88c5\u6210\u51fd\u6570\u3002\u51fd\u6570\u540d\u9700\u8981\u6e05\u6670\u63cf\u8ff0\u5b83\u505a\u4ec0\u4e48&#xff0c;\u4f8b\u5982 GiveGold\u3001ShowShop\u3001KickPlayer\u3002<\/p>\n<hr \/>\n<h3>14. \u6570\u7ec4<\/h3>\n<p>\u6570\u7ec4\u662f\u4e00\u7ec4\u540c\u7c7b\u578b\u6570\u636e\u7684\u96c6\u5408&#xff0c;\u7528\u4e00\u4e2a\u540d\u5b57\u8bbf\u95ee\u591a\u4e2a\u503c\u3002<\/p>\n<h4>\u58f0\u660e\u6570\u7ec4<\/h4>\n<p>new g_Scores[10];           \/\/ \u5b58 10 \u4e2a\u6574\u6570<br \/>\nnew Float:g_Positions[3];   \/\/ \u5b58 3 \u4e2a\u6d6e\u70b9\u6570&#xff08;X, Y, Z&#xff09;<br \/>\nnew g_Name[MAX_PLAYER_NAME]; \/\/ \u5b57\u7b26\u4e32\u672c\u8d28\u4e5f\u662f\u5b57\u7b26\u6570\u7ec4<\/p>\n<h4>\u8bbf\u95ee\u6570\u7ec4\u5143\u7d20<\/h4>\n<p>\u6570\u7ec4\u4e0b\u6807\u4ece 0 \u5f00\u59cb&#xff1a;<\/p>\n<p>new g_Scores[5];<\/p>\n<p>g_Scores[0] &#061; 100;   \/\/ \u7b2c 1 \u4e2a\u5143\u7d20<br \/>\ng_Scores[1] &#061; 85;    \/\/ \u7b2c 2 \u4e2a\u5143\u7d20<br \/>\ng_Scores[4] &#061; 60;    \/\/ \u7b2c 5 \u4e2a&#xff08;\u6700\u540e\u4e00\u4e2a&#xff09;<br \/>\n\/\/ g_Scores[5]  \u2190 \u8d8a\u754c&#xff01;\u4e0d\u80fd\u8bbf\u95ee&#xff0c;\u4f1a\u62a5\u9519<\/p>\n<h4>\u6700\u5e38\u89c1&#xff1a;\u6bcf\u4e2a\u73a9\u5bb6\u5b58\u4e00\u4efd\u6570\u636e<\/h4>\n<p>\/\/ \u5168\u5c40\u58f0\u660e&#xff1a;\u6bcf\u4e2a\u73a9\u5bb6 ID \u5bf9\u5e94\u4e00\u4e2a\u503c<br \/>\nnew g_Gold[MAX_PLAYERS];<br \/>\nnew g_Level[MAX_PLAYERS];<br \/>\nnew g_Skin[MAX_PLAYERS];<\/p>\n<p>\/\/ \u4f7f\u7528 playerid \u4f5c\u4e3a\u4e0b\u6807\u8bbf\u95ee\u5bf9\u5e94\u73a9\u5bb6\u7684\u6570\u636e<br \/>\npublic OnPlayerConnect(playerid)<br \/>\n{<br \/>\n    g_Gold[playerid]  &#061; 50;<br \/>\n    g_Level[playerid] &#061; 1;<br \/>\n    g_Skin[playerid]  &#061; 86;<br \/>\n    return 1;<br \/>\n}<\/p>\n<h4>\u4e8c\u7ef4\u6570\u7ec4<\/h4>\n<p>\/\/ \u5b58 5 \u4e2a\u68c0\u67e5\u70b9\u7684\u5750\u6807&#xff08;\u6bcf\u4e2a\u5750\u6807\u6709 X\u3001Y\u3001Z \u4e09\u4e2a\u503c&#xff09;<br \/>\nnew Float:g_CpPos[5][3] &#061; {<br \/>\n    {100.0, 200.0, 10.0},   \/\/ \u68c0\u67e5\u70b9 0<br \/>\n    {150.0, 220.0, 10.0},   \/\/ \u68c0\u67e5\u70b9 1<br \/>\n    {200.0, 240.0, 10.0},   \/\/ \u68c0\u67e5\u70b9 2<br \/>\n    {250.0, 260.0, 10.0},   \/\/ \u68c0\u67e5\u70b9 3<br \/>\n    {300.0, 280.0, 10.0}    \/\/ \u68c0\u67e5\u70b9 4<br \/>\n};<\/p>\n<p>\/\/ \u8bbf\u95ee\u68c0\u67e5\u70b9 2 \u7684 Y \u5750\u6807&#xff1a;<br \/>\nnew Float:y &#061; g_CpPos[2][1];   \/\/ 240.0<\/p>\n<hr \/>\n<h3>15. \u56de\u8c03\u51fd\u6570&#xff08;Callback&#xff09;<\/h3>\n<p>\u56de\u8c03\u51fd\u6570\u662f open.mp \u670d\u52a1\u7aef\u81ea\u52a8\u8c03\u7528\u7684\u7279\u6b8a\u51fd\u6570\u3002<\/p>\n<p>\u4f60\u4e0d\u9700\u8981\u624b\u52a8\u8c03\u7528\u5b83\u4eec&#xff0c;\u53ea\u9700\u8981\u5728\u811a\u672c\u91cc\u5b9a\u4e49\u5b83\u4eec&#xff0c;\u5f53\u5bf9\u5e94\u4e8b\u4ef6\u53d1\u751f\u65f6&#xff0c;\u670d\u52a1\u7aef\u4f1a\u81ea\u52a8\u6267\u884c\u3002<\/p>\n<h4>\u89c4\u5f8b<\/h4>\n<p>\u6240\u6709\u56de\u8c03\u51fd\u6570\u90fd\u4ee5 public On \u5f00\u5934&#xff1a;<\/p>\n<p>public OnGameModeInit()      \/\/ \u670d\u52a1\u5668\u542f\u52a8\u65f6<br \/>\npublic OnGameModeExit()      \/\/ \u670d\u52a1\u5668\u5173\u95ed\u65f6<br \/>\npublic OnPlayerConnect()     \/\/ \u73a9\u5bb6\u8fdb\u5165\u670d\u52a1\u5668\u65f6<br \/>\npublic OnPlayerDisconnect()  \/\/ \u73a9\u5bb6\u79bb\u5f00\u670d\u52a1\u5668\u65f6<br \/>\npublic OnPlayerSpawn()       \/\/ \u73a9\u5bb6\u51fa\u751f\u65f6<br \/>\npublic OnPlayerDeath()       \/\/ \u73a9\u5bb6\u6b7b\u4ea1\u65f6<br \/>\npublic OnPlayerText()        \/\/ \u73a9\u5bb6\u53d1\u9001\u804a\u5929\u6d88\u606f\u65f6<\/p>\n<h4>\u793a\u4f8b&#xff1a;\u5b8c\u6574\u7684\u73a9\u5bb6\u8fde\u5165\/\u65ad\u5f00\u6d41\u7a0b<\/h4>\n<p>public OnPlayerConnect(playerid)<br \/>\n{<br \/>\n    new name[MAX_PLAYER_NAME];<br \/>\n    GetPlayerName(playerid, name, sizeof(name));<\/p>\n<p>    SendClientMessageToAll(0x88FF88FF, &#034;[\u670d\u52a1\u5668] %s \u52a0\u5165\u4e86\u6e38\u620f&#034;, name);<br \/>\n    return 1;<br \/>\n}<\/p>\n<p>public OnPlayerDisconnect(playerid, reason)<br \/>\n{<br \/>\n    \/\/ reason: 0&#061;\u8d85\u65f6  1&#061;\u4e3b\u52a8\u9000\u51fa  2&#061;\u88ab\u8e22<br \/>\n    new name[MAX_PLAYER_NAME];<br \/>\n    GetPlayerName(playerid, name, sizeof(name));<\/p>\n<p>    SendClientMessageToAll(0xAAAAAAFF, &#034;[\u670d\u52a1\u5668] %s \u79bb\u5f00\u4e86\u6e38\u620f&#034;, name);<br \/>\n    return 1;<br \/>\n}<\/p>\n<p>\u8fd4\u56de\u503c&#xff1a;\u5927\u591a\u6570\u56de\u8c03\u51fd\u6570\u8fd4\u56de 1 \u8868\u793a\u6b63\u5e38\u5904\u7406\u3002\u8fd4\u56de 0 \u5728\u67d0\u4e9b\u56de\u8c03\u91cc\u6709\u7279\u6b8a\u542b\u4e49&#xff08;\u5982\u963b\u6b62\u67d0\u4e9b\u884c\u4e3a&#xff09;<\/p>\n<hr \/>\n<h3>16. SendClientMessage \u2014 \u53d1\u6d88\u606f<\/h3>\n<p>SendClientMessage \u662f\u5411\u73a9\u5bb6\u7684\u804a\u5929\u6846\u53d1\u9001\u6d88\u606f&#xff0c;\u662f\u6700\u57fa\u7840\u7684\u901a\u77e5\u624b\u6bb5\u3002<\/p>\n<p>\u6ce8\u610f&#xff1a;SendClientMessage \u652f\u6301\u4e2d\u6587&#xff0c;\u4e0d\u652f\u6301 emoji \u8868\u60c5\u7b26\u53f7\u3002<\/p>\n<h4>\u8bed\u6cd5<\/h4>\n<p>SendClientMessage(playerid, color, &#034;\u6d88\u606f\u5185\u5bb9&#034;);<\/p>\n<h4>\u989c\u8272\u683c\u5f0f&#xff08;RGBA&#xff09;<\/h4>\n<p>\u989c\u8272\u7528 8 \u4f4d\u5341\u516d\u8fdb\u5236\u6570\u8868\u793a&#xff1a;0xRRGGBBAA<\/p>\n<table>\n<tr>\u53c2\u6570\u542b\u4e49<\/tr>\n<tbody>\n<tr>\n<td>RR<\/td>\n<td>\u7ea2\u8272\u5206\u91cf&#xff08;00~FF&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>GG<\/td>\n<td>\u7eff\u8272\u5206\u91cf&#xff08;00~FF&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>BB<\/td>\n<td>\u84dd\u8272\u5206\u91cf&#xff08;00~FF&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>AA<\/td>\n<td>\u900f\u660e\u5ea6&#xff08;FF &#061; \u5b8c\u5168\u4e0d\u900f\u660e&#xff09;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>SendClientMessage(playerid, 0xFFFFFFFF, &#034;\u767d\u8272\u6d88\u606f&#034;);<br \/>\nSendClientMessage(playerid, 0xFF4444FF, &#034;\u7ea2\u8272\u6d88\u606f&#034;);<br \/>\nSendClientMessage(playerid, 0x44FF44FF, &#034;\u7eff\u8272\u6d88\u606f&#034;);<br \/>\nSendClientMessage(playerid, 0xFFDD44FF, &#034;\u91d1\u9ec4\u8272\u6d88\u606f&#034;);<br \/>\nSendClientMessage(playerid, -1,         &#034;\u4e5f\u662f\u767d\u8272&#xff08;-1 \u662f\u5feb\u6377\u5199\u6cd5&#xff09;&#034;);<\/p>\n<h4>\u989c\u8272\u5e38\u91cf&#xff08;\u63a8\u8350\u5b9a\u4e49&#xff09;<\/h4>\n<p>\/\/ \u5728\u811a\u672c\u9876\u90e8\u5b9a\u4e49\u5e38\u7528\u989c\u8272<br \/>\n#define COLOR_WHITE   0xFFFFFFFF<br \/>\n#define COLOR_RED     0xFF4444FF<br \/>\n#define COLOR_GREEN   0x44FF44FF<br \/>\n#define COLOR_YELLOW  0xFFDD44FF<br \/>\n#define COLOR_GRAY    0xAAAAAAFF<\/p>\n<p>\/\/ \u4f7f\u7528\u65f6\u66f4\u76f4\u89c2<br \/>\nSendClientMessage(playerid, COLOR_GREEN, &#034;[\u5546\u5e97] \u8d2d\u4e70\u6210\u529f&#xff01;&#034;);<br \/>\nSendClientMessage(playerid, COLOR_RED,   &#034;[\u5546\u5e97] \u91d1\u5e01\u4e0d\u8db3&#xff01;&#034;);<\/p>\n<h4>\u53d1\u7ed9\u6240\u6709\u73a9\u5bb6<\/h4>\n<p>SendClientMessageToAll(COLOR_YELLOW, &#034;[\u516c\u544a] \u670d\u52a1\u5668\u5c06\u5728 5 \u5206\u949f\u540e\u91cd\u542f\u3002&#034;);<\/p>\n<h4>\u5728\u6d88\u606f\u91cc\u5d4c\u5165\u53d8\u91cf<\/h4>\n<p>SendClientMessage(playerid, COLOR_GREEN, &#034;[\u5546\u5e97] \u8d2d\u4e70\u6210\u529f&#xff01;\u5269\u4f59\u91d1\u5e01&#xff1a;%d \u679a&#034;, g_Gold[playerid]);<\/p>\n<hr \/>\n<h3>17. GameText \u2014 \u5c4f\u5e55\u5927\u5b57<\/h3>\n<p>GameText \u5728\u73a9\u5bb6\u5c4f\u5e55\u663e\u793a\u6587\u5b57&#xff0c;\u4f1a\u81ea\u52a8\u6d88\u5931\u3002 \u9002\u5408\u7528\u4e8e&#xff1a;\u91cd\u8981\u4e8b\u4ef6\u63d0\u793a\u3001\u533a\u57df\u540d\u79f0\u3001\u5012\u8ba1\u65f6\u3002<\/p>\n<p>\u6ce8\u610f&#xff1a;GameText \u4e0d\u652f\u6301\u4e2d\u6587&#xff0c;\u53ea\u80fd\u5199\u82f1\u6587\u548c\u7b26\u53f7\u3002<\/p>\n<h4>\u8bed\u6cd5<\/h4>\n<p>GameTextForPlayer(playerid, &#034;\u6587\u5b57\u5185\u5bb9&#034;, \u6301\u7eed\u6beb\u79d2, \u6837\u5f0f);<br \/>\nGameTextForAll(&#034;\u6587\u5b57\u5185\u5bb9&#034;, \u6301\u7eed\u6beb\u79d2, \u6837\u5f0f);   \/\/ \u5bf9\u6240\u6709\u73a9\u5bb6\u663e\u793a<\/p>\n<h4>\u989c\u8272\u6807\u7b7e<\/h4>\n<p>\u5728\u6587\u5b57\u4e2d\u63d2\u5165\u989c\u8272\u6807\u7b7e\u6539\u53d8\u989c\u8272&#xff1a;<\/p>\n<p>~w~  \u767d\u8272      ~r~  \u7ea2\u8272      ~g~  \u7eff\u8272<br \/>\n~b~  \u84dd\u8272      ~y~  \u9ec4\u8272      ~p~  \u7d2b\u8272<br \/>\n~n~  \u6362\u884c      ~h~  \u52a0\u4eae<\/p>\n<h4>\u6837\u5f0f\u901f\u67e5<\/h4>\n<p>https:\/\/open.mp\/docs\/scripting\/resources\/gametextstyles<\/p>\n<h4>\u793a\u4f8b<\/h4>\n<p>\/\/ \u8fdb\u5165\u533a\u57df\u65f6\u63d0\u793a<br \/>\nGameTextForPlayer(playerid, &#034;~y~Town Market&#034;, 3000, 3);<\/p>\n<p>\/\/ \u7ec4\u5408\u989c\u8272\u4e0e\u6362\u884c<br \/>\nGameTextForPlayer(playerid, &#034;~g~Quest Complete!~n~~w~Reward: 100 Gold&#034;, 4000, 3);<\/p>\n<p>\/\/ \u5168\u670d\u516c\u544a<br \/>\nGameTextForAll(&#034;~r~Pirates~w~ are attacking!&#034;, 5000, 3);<\/p>\n<hr \/>\n<h3>18. TextDraw \u2014 \u5c4f\u5e55 UI<\/h3>\n<p>TextDraw \u662f\u56fa\u5b9a\u663e\u793a\u5728\u5c4f\u5e55\u4e0a\u7684\u6587\u5b57&#xff0c;\u4e0d\u50cf GameText \u90a3\u6837\u4f1a\u6d88\u5931\u3002 \u5e38\u7528\u4e8e&#xff1a;\u670d\u52a1\u5668 Logo\u3001\u8840\u91cf HUD\u3001\u5206\u6570\u663e\u793a\u3002<\/p>\n<h4>\u8be6\u7ec6\u8d44\u6599<\/h4>\n<p>https:\/\/open.mp\/docs\/scripting\/resources\/TextDraws<\/p>\n<h4>\u521b\u5efa\u4e00\u4e2a\u53f3\u4e0a\u89d2 Logo<\/h4>\n<p>\u7b2c\u4e00\u6b65&#xff1a;\u58f0\u660e\u53d8\u91cf<\/p>\n<p>new Text:g_MyText;   \/\/ Text: \u662f TextDraw \u7684\u7c7b\u578b\u6807\u7b7e<\/p>\n<p>\u7b2c\u4e8c\u6b65&#xff1a;\u5728 OnGameModeInit \u91cc\u521b\u5efa<\/p>\n<p>public OnGameModeInit()<br \/>\n{<br \/>\n    \/\/ x, y\u5750\u6807\u662f\u57fa\u4e8e640&#215;480\u753b\u5e03&#xff08;\u4e0e\u5c4f\u5e55\u5206\u8fa8\u7387\u65e0\u5173&#xff09;<br \/>\n    g_MyText &#061; TextDrawCreate(240.0, 580.0, &#034;Welcome to my OPEN.MP server&#034;);<br \/>\n    return 1;<br \/>\n}<\/p>\n<p>\u7b2c\u4e09\u6b65&#xff1a;\u5728 OnPlayerSpawn \u91cc\u663e\u793a\u7ed9\u73a9\u5bb6<\/p>\n<p>public OnPlayerSpawn(playerid)<br \/>\n{<br \/>\n    TextDrawShowForPlayer(playerid, g_MyText);<br \/>\n    return 1;<br \/>\n}<\/p>\n<p>\u73a9\u5bb6\u65ad\u5f00\u65f6\u9690\u85cf<\/p>\n<p>public OnPlayerDisconnect(playerid, reason)<br \/>\n{<br \/>\n    TextDrawHideForPlayer(playerid, g_MyText);<br \/>\n    return 1;<br \/>\n}<\/p>\n<h4>\u5b57\u4f53\u6837\u5f0f\u8bf4\u660e<\/h4>\n<p>https:\/\/open.mp\/docs\/scripting\/functions\/TextDrawFont<\/p>\n<hr \/>\n<h3>19. Dialog \u2014 \u5bf9\u8bdd\u6846<\/h3>\n<p>Dialog \u662f\u5f39\u51fa\u5728\u73a9\u5bb6\u5c4f\u5e55\u4e0a\u7684\u4ea4\u4e92\u7a97\u53e3&#xff0c;\u662f\u6700\u6838\u5fc3\u7684 UI \u4ea4\u4e92\u65b9\u5f0f\u3002<\/p>\n<h4>\u5bf9\u8bdd\u6846\u7c7b\u578b<\/h4>\n<p>https:\/\/open.mp\/docs\/scripting\/resources\/dialogstyles<\/p>\n<h4>\u7b2c\u4e00\u6b65&#xff1a;\u5b9a\u4e49\u5bf9\u8bdd\u6846 ID<\/h4>\n<p>\/\/ \u6bcf\u4e2a\u5bf9\u8bdd\u6846\u9700\u8981\u4e00\u4e2a\u552f\u4e00 ID&#xff0c;\u7528\u5e38\u91cf\u7ba1\u7406<br \/>\n#define DIALOG_NULL 0<br \/>\n#define DIALOG_LOGIN 1<br \/>\n#define DIALOG_WELCOME 2<br \/>\n#define DIALOG_WEAPONS 3<\/p>\n<p>\/\/ \u4f60\u4e5f\u53ef\u4ee5\u7528\u679a\u4e3e&#xff0c;\u4ed6\u4f1a\u81ea\u52a8\u5206\u914dID&#xff0c;\u7b2c\u4e00\u4e2a\u662f0 \u540e\u9762\u81ea\u52a8\u9012\u589e<br \/>\nenum {<br \/>\n    DIALOG_NULL,        \/\/ 0<br \/>\n    DIALOG_LOGIN,       \/\/ 1<br \/>\n    DIALOG_WELCOME,     \/\/ 2<br \/>\n    DIALOG_WEAPONS      \/\/ 3<br \/>\n}<\/p>\n<h4>\u7b2c\u4e8c\u6b65&#xff1a;\u663e\u793a\u5bf9\u8bdd\u6846<\/h4>\n<p>\/\/ ShowPlayerDialog(\u73a9\u5bb6ID, \u5bf9\u8bdd\u6846ID, \u6837\u5f0f, \u6807\u9898, \u5185\u5bb9, \u6309\u94ae1, \u6309\u94ae2)<br \/>\n\/\/ \u5bf9\u8bdd\u6846\u6837\u5f0f\u793a\u4f8b: DIALOG_STYLE_MSGBOX:<br \/>\nShowPlayerDialog(playerid, DIALOG_WELCOME, DIALOG_STYLE_MSGBOX, &#034;\u63d0\u793a&#034;, &#034;\u4f60\u5df2\u8fdb\u5165\u670d\u52a1\u5668&#034;, &#034;\u5173\u95ed&#034;, &#034;&#034;);<\/p>\n<p>\/\/ \u5bf9\u8bdd\u6846\u6837\u5f0f\u793a\u4f8b: DIALOG_STYLE_INPUT:<br \/>\nShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, &#034;\u767b\u5f55&#034;, &#034;\u8bf7\u5728\u4e0b\u65b9\u8f93\u5165\u5bc6\u7801\u767b\u9646\u670d\u52a1\u5668:&#034;, &#034;\u767b\u5f55&#034;, &#034;\u53d6\u6d88&#034;);<\/p>\n<p>\/\/ \u5bf9\u8bdd\u6846\u6837\u5f0f\u793a\u4f8b: DIALOG_STYLE_LIST:<br \/>\nShowPlayerDialog(playerid, DIALOG_WEAPONS, DIALOG_STYLE_LIST, &#034;\u6b66\u5668&#034;, &#034;AK47\\\\nM4\\\\n\u72d9\u51fb\u67aa&#034;, &#034;\u9009\u62e9&#034;, &#034;\u5173\u95ed&#034;);<\/p>\n<p>\/\/ \u5bf9\u8bdd\u6846\u6837\u5f0f\u793a\u4f8b: DIALOG_STYLE_PASSWORD:<br \/>\nShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, &#034;\u767b\u5f55&#034;, &#034;\u8bf7\u5728\u4e0b\u65b9\u8f93\u5165\u5bc6\u7801\u767b\u9646\u670d\u52a1\u5668:&#034;, &#034;\u767b\u5f55&#034;, &#034;\u53d6\u6d88&#034;);<\/p>\n<p>\/\/ \u5bf9\u8bdd\u6846\u6837\u5f0f\u793a\u4f8b: DIALOG_STYLE_TABLIST:<br \/>\nShowPlayerDialog(playerid, DIALOG_WEAPONS, DIALOG_STYLE_TABLIST, &#034;\u6b66\u5668\u5546\u5e97&#034;, &#034;\u6c99\u9e70\\\\t$5000\\\\t100\\\\n\u77ed\u7ba1\u6563\u5f39\u67aa\\\\t$5000\\\\t100\\\\n\u624b\u67aa\\\\t$1000\\\\t50&#034;, &#034;\u8d2d\u4e70&#034;, &#034;\u53d6\u6d88&#034;);<\/p>\n<p>\/\/ \u5bf9\u8bdd\u6846\u6837\u5f0f\u793a\u4f8b: DIALOG_STYLE_TABLIST_HEADERS:<br \/>\nShowPlayerDialog(playerid, DIALOG_WEAPONS, DIALOG_STYLE_TABLIST_HEADERS, &#034;\u6b66\u5668\u5546\u5e97&#034;, &#034;\u6b66\u5668\\\\t\u4ef7\u683c\\\\t\u5f39\u836f\u6570\u91cf\\\\n\u6c99\u9e70\\\\t$5000\\\\t100\\\\n\u77ed\u7ba1\u6563\u5f39\u67aa\\\\t$5000\\\\t100\\\\n\u624b\u67aa\\\\t$1000\\\\t50&#034;, &#034;\u8d2d\u4e70&#034;, &#034;\u53d6\u6d88&#034;);<\/p>\n<p>\\\\n \u662f\u6362\u884c\u7b26&#xff0c;\u5728 DIALOG_STYLE_LIST \u91cc\u6bcf\u4e2a \\\\n \u5206\u9694\u4e00\u4e2a\u9009\u9879\u3002<\/p>\n<h4>\u7b2c\u4e09\u6b65&#xff1a;\u5904\u7406\u73a9\u5bb6\u7684\u54cd\u5e94<\/h4>\n<p>public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])<br \/>\n{<br \/>\n    \/\/ response  &#061; 1 \u70b9\u4e86\u5de6\u8fb9\u6309\u94ae<br \/>\n    \/\/           &#061; 0 \u70b9\u4e86\u53f3\u8fb9\u6309\u94ae\u6216\u6309\u4e86 ESC<br \/>\n    \/\/ listitem  &#061; \u73a9\u5bb6\u9009\u7684\u662f\u7b2c\u51e0\u884c&#xff08;\u4ece 0 \u5f00\u59cb&#xff09;<br \/>\n    \/\/ inputtext &#061; \u73a9\u5bb6\u8f93\u5165\u7684\u6587\u5b57<\/p>\n<p>    if (dialogid &#061;&#061; DIALOG_RULES)<br \/>\n    {<br \/>\n        if (response) \/\/ \u5982\u679c\u73a9\u5bb6\u70b9\u51fb\u4e86\u5de6\u8fb9\u7684\u6309\u94ae<br \/>\n        {<br \/>\n            SendClientMessage(playerid, COLOR_GREEN, &#034;\u4f60\u70b9\u51fb\u4e86\u5de6\u8fb9\u7684\u6309\u94ae!&#034;);<br \/>\n        }<br \/>\n        else \/\/ \u5426\u5219(\u73a9\u5bb6\u70b9\u51fb\u4e86\u53f3\u8fb9\u7684\u6309\u94ae\u6216\u6309\u4e0bESC\u952e)<br \/>\n        {<br \/>\n            SendClientMessage(playerid, COLOR_GREEN, &#034;\u4f60\u70b9\u51fb\u4e86\u53f3\u8fb9\u7684\u6309\u94ae!&#034;);<br \/>\n        }<br \/>\n        return 1; \/\/ \u8fd4\u56de\u505c\u6b62\u540e\u7eed\u4ee3\u7801\u7684\u6267\u884c<br \/>\n    }<br \/>\n    return 0;<br \/>\n}<\/p>\n<hr \/>\n<h3>20. Pickup \u2014 \u62fe\u53d6\u7269<\/h3>\n<p>Pickup \u662f\u653e\u5728\u5730\u56fe\u4e0a\u7684\u53ef\u89e6\u53d1\u62fe\u53d6\u7269&#xff0c;\u73a9\u5bb6\u8d70\u89e6\u78b0\u5230\u4e4b\u540e\u4f1a\u81ea\u52a8\u89e6\u53d1&#xff0c;\u4e0d\u9700\u8981\u6309\u952e\u3002 \u5e38\u7528\u4e8e&#xff1a;\u91d1\u5e01\u3001\u9053\u5177\u3001\u4efb\u52a1\u89e6\u53d1\u70b9\u3001\u5546\u5e97\u5165\u53e3\u3002<\/p>\n<h4>\u521b\u5efa Pickup<\/h4>\n<p>new g_pickupGold;   \/\/ \u4fdd\u5b58 pickup \u7684 ID&#xff0c;\u54cd\u5e94\u65f6\u7528\u6765\u5224\u65ad<\/p>\n<p>public OnGameModeInit()<br \/>\n{<br \/>\n    \/\/ CreatePickup(\u6a21\u578bID, \u7c7b\u578b, X, Y, Z, \u865a\u62df\u4e16\u754c)<br \/>\n    \/\/ \u7c7b\u578b 2 &#061; \u62fe\u53d6\u540e\u6d88\u5931&#xff0c;15 \u79d2\u540e\u91cd\u751f<br \/>\n    g_pickupGold &#061; CreatePickup(1274, 2, 2009.8658, 1220.0293, 10.8206, -1);<br \/>\n    \/\/                          \u2191\u6a21\u578b \u2191\u7c7b\u578b   \u2191\u5750\u6807                     \u2191-1&#061;\u6240\u6709\u4e16\u754c\u53ef\u89c1<\/p>\n<p>    return 1;<br \/>\n}<\/p>\n<h4>\u5e38\u7528\u6a21\u578b ID<\/h4>\n<table>\n<tr>\u6a21\u578b ID\u5916\u89c2<\/tr>\n<tbody>\n<tr>\n<td>1210<\/td>\n<td>\u516c\u6587\u5305<\/td>\n<\/tr>\n<tr>\n<td>1212<\/td>\n<td>\u91d1\u94b1<\/td>\n<\/tr>\n<tr>\n<td>1239<\/td>\n<td>\u4fe1\u606f<\/td>\n<\/tr>\n<tr>\n<td>1240<\/td>\n<td>\u7231\u5fc3<\/td>\n<\/tr>\n<tr>\n<td>1273<\/td>\n<td>\u7eff\u8272\u623f\u5b50<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u66f4\u591a\u53ef\u67e5\u9605: https:\/\/open.mp\/docs\/scripting\/resources\/pickupids<\/p>\n<h4>\u54cd\u5e94\u62fe\u53d6\u4e8b\u4ef6<\/h4>\n<p>public OnPlayerPickUpPickup(playerid, pickupid)<br \/>\n{<br \/>\n    if(pickupid &#061;&#061; g_pickupGold)<br \/>\n    {<br \/>\n        g_Gold[playerid] &#043;&#061; 20;<br \/>\n        SendClientMessage(playerid, COLOR_YELLOW, &#034;\u6361\u5230\u4e86\u91d1\u5e01&#xff01;&#043;20&#034;);<br \/>\n        GameTextForPlayer(playerid, &#034;~y~&#043;20 Gold&#034;, 1500, 5);<br \/>\n    }<br \/>\n    return 1;<br \/>\n}<\/p>\n<h4>Pickup \u7c7b\u578b\u8bf4\u660e<\/h4>\n<table>\n<tr>\u7c7b\u578b\u503c\u884c\u4e3a<\/tr>\n<tbody>\n<tr>\n<td>0<\/td>\n<td>\u65e0\u7279\u6b8a\u5c5e\u6027&#xff0c;\u4e0d\u53ef\u88ab\u62fe\u53d6<\/td>\n<\/tr>\n<tr>\n<td>1<\/td>\n<td>\u6c38\u4e45\u5b58\u5728 \u4ec5\u5141\u8bb8\u811a\u672c\u63a7\u5236<\/td>\n<\/tr>\n<tr>\n<td>14<\/td>\n<td>\u4ec5\u9650\u8f66\u8f86\u62fe\u53d6&#xff0c;\u89e6\u53d1\u68c0\u67e5\u70b9\u97f3\u6548\u540e\u6d88\u5931<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u66f4\u591a\u7c7b\u578b\u53ef\u67e5\u9605: https:\/\/open.mp\/docs\/scripting\/resources\/pickuptypes<\/p>\n<hr \/>\n<h3>21. Checkpoint \u2014 \u68c0\u67e5\u70b9<\/h3>\n<p>Checkpoint \u662f\u5730\u56fe\u4e0a\u7684\u7ea2\u8272\u53d1\u5149\u5706\u67f1\u533a\u57df&#xff0c;\u73a9\u5bb6\u8d70\u8fdb\u53bb\u81ea\u52a8\u89e6\u53d1\u3002 \u5e38\u7528\u4e8e&#xff1a;\u4efb\u52a1\u76ee\u6807\u70b9\u3001\u533a\u57df\u8fdb\u5165\u89e6\u53d1\u3001\u5f15\u5bfc\u65b0\u73a9\u5bb6&#xff0c;\u6bcf\u4e2a\u73a9\u5bb6\u6700\u591a\u53ea\u80fd\u663e\u793a\u4e00\u4e2a\u68c0\u67e5\u70b9\u3002<\/p>\n<p>\u5f53\u73a9\u5bb6\u8fdb\u5165\u68c0\u67e5\u70b9\u65f6&#xff0c;\u4f1a\u8c03\u7528 OnPlayerEnterCheckpoint \u56de\u8c03<\/p>\n<h4>\u8bbe\u7f6e\u68c0\u67e5\u70b9<\/h4>\n<p>\/\/ \u6bcf\u4e2a\u73a9\u5bb6\u540c\u65f6\u53ea\u80fd\u6709\u4e00\u4e2a\u6d3b\u52a8\u7684 Checkpoint<br \/>\n\/\/ SetPlayerCheckpoint(\u73a9\u5bb6ID, X, Y, Z, \u68c0\u67e5\u70b9\u5c3a\u5bf8\u534a\u5f84)<br \/>\nSetPlayerCheckpoint(playerid, 1982.6150, -220.6680, -0.2432, 3.0);<\/p>\n<h4>\u54cd\u5e94\u8fdb\u5165\u4e8b\u4ef6<\/h4>\n<p>public OnPlayerEnterCheckpoint(playerid)<br \/>\n{<br \/>\n    SendClientMessage(playerid, COLOR_GREEN, &#034;\u5230\u8fbe\u76ee\u6807\u5730\u70b9&#xff01;&#034;);<\/p>\n<p>    \/\/ \u89e6\u53d1\u540e\u901a\u5e38\u9700\u8981\u6e05\u9664&#xff0c;\u907f\u514d\u53cd\u590d\u89e6\u53d1<br \/>\n    DisablePlayerCheckpoint(playerid);<\/p>\n<p>    \/\/ \u5728\u8fd9\u91cc\u505a\u4f60\u60f3\u505a\u7684\u4e8b&#xff0c;\u6bd4\u5982\u7ed9\u4e0e\u73a9\u5bb6\u91d1\u94b1<br \/>\n    GivePlayerMoney(playerid, 1000);<\/p>\n<p>    return 1;<br \/>\n}<\/p>\n<h4>RaceCheckpoint \u2014 \u6bd4\u8d5b\u68c0\u67e5\u70b9<\/h4>\n<p>\u5f53\u73a9\u5bb6\u8fdb\u5165\u65f6&#xff0c;\u4f1a\u8c03\u7528 OnPlayerEnterRaceCheckPoint \u56de\u8c03<\/p>\n<p>\/\/ SetPlayerRaceCheckpoint(\u73a9\u5bb6ID, \u7c7b\u578b, \u5f53\u524dX,Y,Z, \u4e0b\u4e00\u76ee\u6807X,Y,Z, \u534a\u5f84)<br \/>\nSetPlayerRaceCheckpoint(playerid, CP_TYPE_GROUND_NORMAL, 644.3091, 1767.0223, 4.9970, 650.6734, 1812.0367, 4.9970, 3.0);<\/p>\n<p>public OnPlayerEnterRaceCheckpoint(playerid)<br \/>\n{<br \/>\n    DisablePlayerRaceCheckpoint(playerid);<br \/>\n    SendClientMessage(playerid, COLOR_GREEN, &#034;\u5230\u8fbe&#xff01;&#034;);<br \/>\n    return 1;<br \/>\n}<\/p>\n<hr \/>\n<h3>22. Vehicle \u2014 \u8f7d\u5177<\/h3>\n<h4>\u521b\u5efa\u8f7d\u5177<\/h4>\n<p>\/\/ CreateVehicle(\u6a21\u578b, X, Y, Z, \u89d2\u5ea6, \u989c\u82721, \u989c\u82722, \u91cd\u751f\u5ef6\u8fdf\u79d2)<br \/>\nnew vehicleid &#061; CreateVehicle(411, 100.0, 200.0, 10.0, 90.0, -1, -1, 60);<br \/>\n\/\/ -1 &#061; \u968f\u673a\u989c\u8272&#xff0c;60 &#061; \u65e0\u4eba\u4f7f\u7528 60 \u79d2\u540e\u91cd\u751f<\/p>\n<h4>\u8ba9\u73a9\u5bb6\u8fdb\u5165\u8f7d\u5177<\/h4>\n<p>\/\/ PutPlayerInVehicle(\u73a9\u5bb6ID, \u8f7d\u5177ID, \u5ea7\u4f4d)<br \/>\n\/\/ \u5ea7\u4f4d 0 &#061; \u9a7e\u9a76\u5ea7&#xff0c;1 &#061; \u526f\u9a7e\u9a76&#xff0c;2\/3 &#061; \u540e\u6392<br \/>\nPutPlayerInVehicle(playerid, vehicleid, 0);<\/p>\n<h4>\u8f7d\u5177\u6a21\u578b ID<\/h4>\n<p>\u8bf7\u67e5\u9605: https:\/\/open.mp\/docs\/scripting\/resources\/vehicleid<\/p>\n<h4>\u8fdb\u51fa\u8f7d\u5177\u56de\u8c03<\/h4>\n<p>public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)<br \/>\n{<br \/>\n    \/\/ ispassenger: 0 &#061; \u9a7e\u9a76\u5ea7&#xff0c;1 &#061; \u4e58\u5ba2<br \/>\n    if(!ispassenger)<br \/>\n    {<br \/>\n        SendClientMessage(playerid, COLOR_WHITE, &#034;\u4f60\u6b63\u5728\u8fdb\u5165\u8f7d\u5177\u7684\u9a7e\u9a76\u4f4d\u3002&#034;);<br \/>\n    }<br \/>\n    return 1;<br \/>\n}<\/p>\n<p>public OnPlayerExitVehicle(playerid, vehicleid)<br \/>\n{<br \/>\n    SendClientMessage(playerid, COLOR_WHITE, &#034;\u4f60\u6b63\u5728\u79bb\u5f00\u8f7d\u5177&#034;);<br \/>\n    return 1;<br \/>\n}<\/p>\n<hr \/>\n<h3>23. Actor \u2014 NPC<\/h3>\n<p>Actor \u662f\u7ad9\u5728\u4e16\u754c\u91cc\u7684\u9759\u6001 NPC \u89d2\u8272&#xff0c;\u53ef\u4ee5\u8bbe\u7f6e\u5916\u89c2\u548c\u52a8\u4f5c\u52a8\u753b&#xff0c;\u4f46\u4e0d\u4f1a\u79fb\u52a8&#xff0c;\u4f46\u529f\u80fd\u6709\u9650<\/p>\n<h4>\u521b\u5efa Actor<\/h4>\n<p>new g_ActorSmith;   \/\/ \u4fdd\u5b58 actor ID<\/p>\n<p>public OnGameModeInit()<br \/>\n{<br \/>\n    \/\/ CreateActor(\u76ae\u80a4ID, X, Y, Z, \u671d\u5411\u89d2\u5ea6)<br \/>\n    g_ActorSmith &#061; CreateActor(179, 316.1, -134.0, 999.6, 90.0);<\/p>\n<p>    return 1;<br \/>\n}<\/p>\n<h4>\u7ed9 Actor \u64ad\u653e\u52a8\u753b<\/h4>\n<p>\/\/ ApplyActorAnimation(actorID, \u52a8\u753b\u5e93, \u52a8\u753b\u540d, \u901f\u5ea6, \u5faa\u73af, lockX, lockY, \u51bb\u7ed3, \u65f6\u957f)<br \/>\nApplyActorAnimation(g_ActorSmith, &#034;DEALER&#034;, &#034;shop_pay&#034;, 4.1, false, false, false, false, 0);<\/p>\n<h4>\u73a9\u5bb6\u9760\u8fd1\u65f6\u6309\u952e\u4ea4\u4e92<\/h4>\n<p>\/\/ \u5de5\u5177\u51fd\u6570&#xff1a;\u8ba1\u7b97\u73a9\u5bb6\u5230 Actor \u7684\u8ddd\u79bb<br \/>\nstock Float:DistToActor(playerid, actorid)<br \/>\n{<br \/>\n    new Float:px, Float:py, Float:pz;<br \/>\n    new Float:ax, Float:ay, Float:az;<br \/>\n    GetPlayerPos(playerid, px, py, pz);<br \/>\n    GetActorPos(actorid, ax, ay, az);<br \/>\n    return floatsqroot((px-ax)*(px-ax)&#043;(py-ay)*(py-ay)&#043;(pz-az)*(pz-az));<br \/>\n}<\/p>\n<p>\/\/ \u5728\u6309\u952e\u56de\u8c03\u91cc\u68c0\u6d4b\u8ddd\u79bb\u5e76\u89e6\u53d1\u5bf9\u8bdd<br \/>\npublic OnPlayerKeyStateChange(playerid, KEY:newkeys, KEY:oldkeys)<br \/>\n{<br \/>\n    if(PRESSED(KEY_YES))<br \/>\n    {<br \/>\n        if(DistToActor(playerid, g_ActorSmith) &lt; 3.0)<br \/>\n        {<br \/>\n            ShowPlayerDialog(playerid, DIALOG_SMITH, DIALOG_STYLE_MSGBOX,<br \/>\n                &#034;[ \u6b66\u5668\u5546\u4eba ]&#034;,<br \/>\n                &#034;\u6b22\u8fce&#xff01;\u6211\u80fd\u4e3a\u4f60\u63d0\u4f9b\u7cbe\u826f\u7684\u6b66\u5668\u3002&#034;,<br \/>\n                &#034;\u597d\u7684&#034;, &#034;&#034;<br \/>\n            );<br \/>\n        }<br \/>\n    }<br \/>\n    return 1;<br \/>\n}<\/p>\n<h4>\u670d\u52a1\u5668\u5173\u95ed\u65f6\u6e05\u7406<\/h4>\n<p>public OnGameModeExit()<br \/>\n{<br \/>\n    DestroyActor(g_ActorSmith);<br \/>\n    return 1;<br \/>\n}<\/p>\n<hr \/>\n<h3>24. Timer \u2014 \u8ba1\u65f6\u5668<\/h3>\n<p>Timer \u7528\u4e8e\u5ef6\u8fdf\u6267\u884c\u6216\u5b9a\u671f\u6267\u884c\u67d0\u4e2a\u51fd\u6570&#xff0c;\u662f\u5b9e\u73b0\u6e38\u620f\u4e8b\u4ef6\u3001\u51b7\u5374\u65f6\u95f4\u3001\u5012\u8ba1\u65f6\u7684\u57fa\u7840\u5de5\u5177\u3002<\/p>\n<h4>\u521b\u5efa\u8ba1\u65f6\u5668<\/h4>\n<p>\/\/ \u4e00\u6b21\u6027&#xff1a;2000 \u6beb\u79d2&#xff08;2 \u79d2&#xff09;\u540e\u6267\u884c&#xff0c;false &#061; \u4e0d\u91cd\u590d<br \/>\nSetTimer(&#034;MyFunction&#034;, 2000, false);<\/p>\n<p>\/\/ \u91cd\u590d&#xff1a;\u6bcf 5000 \u6beb\u79d2&#xff08;5 \u79d2&#xff09;\u6267\u884c\u4e00\u6b21&#xff0c;true &#061; \u91cd\u590d<br \/>\nnew g_Timer &#061; SetTimer(&#034;MyRepeatFunc&#034;, 5000, true);<\/p>\n<p>\/\/ \u505c\u6b62\u8ba1\u65f6\u5668&#xff08;\u9700\u8981\u63d0\u524d\u4fdd\u5b58\u5b83\u7684 ID&#xff09;<br \/>\nKillTimer(g_Timer);<\/p>\n<h4>\u5e26\u53c2\u6570\u7684\u8ba1\u65f6\u5668<\/h4>\n<p>\/\/ SetTimerEx(&#034;\u51fd\u6570\u540d&#034;, \u95f4\u9694ms, \u662f\u5426\u91cd\u590d, &#034;\u53c2\u6570\u683c\u5f0f&#034;, \u53c2\u6570\u503c&#8230;)<br \/>\nSetTimerEx(&#034;SendDelayedMsg&#034;, 3000, false, &#034;i&#034;, playerid);<\/p>\n<p>\/\/ \u5bf9\u5e94\u51fd\u6570\u5fc5\u987b\u5148\u7528 forward \u58f0\u660e<br \/>\nforward SendDelayedMsg(playerid);<br \/>\npublic SendDelayedMsg(playerid)<br \/>\n{<br \/>\n    if(!IsPlayerConnected(playerid)) return 0;<br \/>\n    GameTextForPlayer(playerid, &#034;~w~Welcome to~n~~y~Island Town!&#034;, 3000, 3);<br \/>\n    return 1;<br \/>\n}<\/p>\n<h4>\u53c2\u6570\u683c\u5f0f\u5b57\u7b26<\/h4>\n<table>\n<tr>\u683c\u5f0f\u7b26\u542b\u4e49<\/tr>\n<tbody>\n<tr>\n<td>i<\/td>\n<td>\u6574\u6570&#xff08;int&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>f<\/td>\n<td>\u6d6e\u70b9\u6570&#xff08;float&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>s<\/td>\n<td>\u5b57\u7b26\u4e32<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>\u5b9e\u9645\u5e94\u7528&#xff1a;\u6bcf 60 \u79d2\u64ad\u62a5\u968f\u673a\u4e8b\u4ef6<\/h4>\n<p>new g_EventTimer;<\/p>\n<p>public OnGameModeInit()<br \/>\n{<br \/>\n    g_EventTimer &#061; SetTimer(&#034;IslandEvent&#034;, 60000, true);<br \/>\n    return 1;<br \/>\n}<\/p>\n<p>public OnGameModeExit()<br \/>\n{<br \/>\n    KillTimer(g_EventTimer);   \/\/ \u670d\u52a1\u5668\u5173\u95ed\u65f6\u8bb0\u5f97\u505c\u6b62<br \/>\n    return 1;<br \/>\n}<\/p>\n<p>forward IslandEvent();<br \/>\npublic IslandEvent()<br \/>\n{<br \/>\n    switch(random(3))<br \/>\n    {<br \/>\n        case 0: SendClientMessageToAll(COLOR_ORANGE, &#034;[\u5c0f\u9547] \u5e02\u96c6\u5f00\u653e&#xff01;\u6765\u5e7f\u573a\u901b\u901b\u3002&#034;);<br \/>\n        case 1: SendClientMessageToAll(COLOR_RED,    &#034;[\u5c0f\u9547] \u6d77\u6e7e\u53d1\u73b0\u6d77\u76d7\u8239&#xff01;&#034;);<br \/>\n        case 2: SendClientMessageToAll(COLOR_GREEN,  &#034;[\u5c0f\u9547] \u4eca\u65e5\u597d\u5929\u6c14&#xff0c;\u6e14\u83b7\u7ffb\u500d&#xff01;&#034;);<br \/>\n    }<br \/>\n    return 1;<br \/>\n}<\/p>\n<p>\u6ce8\u610f&#xff1a;\u4f7f\u7528 SetTimerEx \u7684\u51fd\u6570\u5fc5\u987b\u5728\u4f7f\u7528\u524d\u52a0 forward \u58f0\u660e&#xff0c;\u5426\u5219\u7f16\u8bd1\u4f1a\u62a5\u9519\u6216\u8fd0\u884c\u5f02\u5e38\u3002<\/p>\n<hr \/>\n<h3>25. Keys \u2014 \u6309\u952e\u68c0\u6d4b<\/h3>\n<p>OnPlayerKeyStateChange \u5728\u73a9\u5bb6\u6309\u4e0b\u6216\u677e\u5f00\u6309\u952e\u65f6\u89e6\u53d1&#xff0c;\u7528\u4e8e\u5b9e\u73b0\u4ea4\u4e92\u64cd\u4f5c\u3002<\/p>\n<p>\u5b98\u65b9\u6587\u6863: https:\/\/open.mp\/docs\/scripting\/callbacks\/OnPlayerKeyStateChange<\/p>\n<h4>\u57fa\u7840\u5b8f\u5b9a\u4e49<\/h4>\n<p>\/\/ \u5728\u811a\u672c\u9876\u90e8\u5b9a\u4e49\u8fd9\u4e24\u4e2a\u5b8f&#xff0c;\u540e\u9762\u5224\u65ad\u6309\u952e\u65f6\u66f4\u65b9\u4fbf<br \/>\n#define PRESSED(%0)  (((newkeys) &amp; (%0)) &amp;&amp; !((oldkeys) &amp; (%0)))<br \/>\n#define RELEASED(%0) (!((newkeys) &amp; (%0)) &amp;&amp; ((oldkeys) &amp; (%0)))<\/p>\n<h4>\u57fa\u7840\u7528\u6cd5<\/h4>\n<p>public OnPlayerKeyStateChange(playerid, KEY:newkeys, KEY:oldkeys)<br \/>\n{<br \/>\n    \/\/ PRESSED &#061; \u521a\u6309\u4e0b&#xff08;\u672c\u5e27\u6309\u7740&#xff0c;\u4e0a\u5e27\u6ca1\u6309&#xff09;<br \/>\n    if(PRESSED(KEY_FIRE))<br \/>\n    {<br \/>\n        SendClientMessage(playerid, COLOR_WHITE, &#034;\u4f60\u6309\u4e86\u9f20\u6807\u5de6\u952e&#034;);<br \/>\n    }<\/p>\n<p>    \/\/ RELEASED &#061; \u521a\u677e\u5f00<br \/>\n    if(RELEASED(KEY_FIRE))<br \/>\n    {<br \/>\n        SendClientMessage(playerid, COLOR_WHITE, &#034;\u4f60\u677e\u5f00\u4e86\u9f20\u6807\u5de6\u952e&#034;);<br \/>\n    }<\/p>\n<p>    return 1;<br \/>\n}<\/p>\n<h4>\u6309\u952e\u5e38\u91cf<\/h4>\n<p>\u8bf7\u67e5\u9605: https:\/\/open.mp\/docs\/scripting\/resources\/keys<\/p>\n<h4>\u5b8c\u6574\u4ea4\u4e92\u793a\u4f8b&#xff1a;\u6309 Y\u952e \u4e0e NPC \u5bf9\u8bdd<\/h4>\n<p>#define PRESSED(%0) (((newkeys) &amp; (%0)) &amp;&amp; !((oldkeys) &amp; (%0)))<\/p>\n<p>public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)<br \/>\n{<br \/>\n    if(PRESSED(KEY_YES))<br \/>\n    {<br \/>\n        \/\/ \u68c0\u67e5\u73a9\u5bb6\u662f\u5426\u9760\u8fd1\u94c1\u5320 NPC<br \/>\n        if(DistToActor(playerid, g_ActorSmith) &lt; 3.0)<br \/>\n        {<br \/>\n            ShowPlayerDialog(playerid, DIALOG_SMITH, DIALOG_STYLE_MSGBOX,<br \/>\n                &#034;[ \u6b66\u5668\u5546\u4eba ]&#034;,<br \/>\n                &#034;\u4f60\u597d&#xff0c;\u65c5\u4eba&#xff01;\u9700\u8981\u6b66\u5668\u5417&#xff1f;&#034;,<br \/>\n                &#034;\u9700\u8981&#034;, &#034;\u4e0d\u4e86&#034;<br \/>\n            );<br \/>\n        }<br \/>\n    }<br \/>\n    return 1;<br \/>\n}<\/p>\n<hr \/>\n<p>#GTA# #\u5723\u5b89\u5730\u5217\u65af# #\u4fa0\u76d7\u730e\u8f66\u624b# #\u5723\u5b89\u5730\u5217\u65af\u8054\u673a# #samp# #gta\u8054\u673a# #gtasa\u8054\u673a# #openmp# #omp# #open.mp# #gtasa#<\/p>\n<p>\u793e\u533a\u4ea4\u6d41\u7fa4: 673335567<\/p>\n<p>\u8bba\u575b: https:\/\/open-mp.cn\/<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u96f6\u57fa\u7840openmp\/SAMP gtasa\u8054\u673a\u670d\u52a1\u5668\u5f00\u53d1\u6559\u7a0b &#8211; \u7b2c\u4e8c\u7ae0<br \/>\n\u7f16\u5199&#xff1a;\u5c0f\u9e1f Github \u65f6\u95f4&#xff1a;2026\/03\/23 \u672c\u6559\u7a0b\u9762\u5411\u5b8c\u5168\u96f6\u57fa\u7840\u7684\u65b0\u624b&#xff0c;\u6bcf\u4e00\u8282\u53ea\u8bb2\u4e00\u4e2a\u77e5\u8bc6\u70b9&#xff0c;\u5faa\u5e8f\u6e10\u8fdb\u3002 \u672c\u7ae0\u8282\u5148\u4ee5\u5feb\u901f\u4e86\u89e3 Pawn \u8bed\u8a00\u548c openmp \u6e38\u620f\u5b9e\u9645\u5e94\u7528\u4e3a\u5f00\u7aef&#xff0c;\u8ba9\u65b0\u624b\u66f4\u5feb\u901a\u8fc7\u5b9e\u9645\u6e38\u620f\u8868\u73b0\u83b7\u5f97\u53cd\u9988&#xff0c;\u4ee5\u907f\u514d\u4e00\u5f00\u59cb\u5c31\u63a5\u89e6\u8fc7\u591a\u8bed\u6cd5&#xff0c;\u5efa\u8bae\u9605\u8bfb\u5b8c\u672c\u7ae0\u8282\u518d\u5f00\u59cb\u7b2c\u4e09\u7ae0\u5de9\u56fa\u8fdb\u9636\u7f16\u7a0b\u8bed\u8a00\u7ec6\u8282 \u76ee\u5f55 <\/p>\n","protected":false},"author":2,"featured_media":81735,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[174,43,248],"topic":[],"class_list":["post-81736","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-c","tag-43","tag-248"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u96f6\u57fa\u7840openmp\/SAMP gtasa\u8054\u673a\u670d\u52a1\u5668\u5f00\u53d1\u6559\u7a0b - \u7b2c\u4e8c\u7ae0 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/81736.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u96f6\u57fa\u7840openmp\/SAMP gtasa\u8054\u673a\u670d\u52a1\u5668\u5f00\u53d1\u6559\u7a0b - \u7b2c\u4e8c\u7ae0 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u96f6\u57fa\u7840openmp\/SAMP gtasa\u8054\u673a\u670d\u52a1\u5668\u5f00\u53d1\u6559\u7a0b - \u7b2c\u4e8c\u7ae0 \u7f16\u5199&#xff1a;\u5c0f\u9e1f Github \u65f6\u95f4&#xff1a;2026\/03\/23 \u672c\u6559\u7a0b\u9762\u5411\u5b8c\u5168\u96f6\u57fa\u7840\u7684\u65b0\u624b&#xff0c;\u6bcf\u4e00\u8282\u53ea\u8bb2\u4e00\u4e2a\u77e5\u8bc6\u70b9&#xff0c;\u5faa\u5e8f\u6e10\u8fdb\u3002 \u672c\u7ae0\u8282\u5148\u4ee5\u5feb\u901f\u4e86\u89e3 Pawn \u8bed\u8a00\u548c openmp \u6e38\u620f\u5b9e\u9645\u5e94\u7528\u4e3a\u5f00\u7aef&#xff0c;\u8ba9\u65b0\u624b\u66f4\u5feb\u901a\u8fc7\u5b9e\u9645\u6e38\u620f\u8868\u73b0\u83b7\u5f97\u53cd\u9988&#xff0c;\u4ee5\u907f\u514d\u4e00\u5f00\u59cb\u5c31\u63a5\u89e6\u8fc7\u591a\u8bed\u6cd5&#xff0c;\u5efa\u8bae\u9605\u8bfb\u5b8c\u672c\u7ae0\u8282\u518d\u5f00\u59cb\u7b2c\u4e09\u7ae0\u5de9\u56fa\u8fdb\u9636\u7f16\u7a0b\u8bed\u8a00\u7ec6\u8282 \u76ee\u5f55\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/81736.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-07-24T20:02:01+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260724200159-6a63c4b7b139f.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"10 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/81736.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/81736.html\",\"name\":\"\u96f6\u57fa\u7840openmp\/SAMP gtasa\u8054\u673a\u670d\u52a1\u5668\u5f00\u53d1\u6559\u7a0b - \u7b2c\u4e8c\u7ae0 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-07-24T20:02:01+00:00\",\"dateModified\":\"2026-07-24T20:02:01+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/81736.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/81736.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/81736.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u96f6\u57fa\u7840openmp\/SAMP gtasa\u8054\u673a\u670d\u52a1\u5668\u5f00\u53d1\u6559\u7a0b - \u7b2c\u4e8c\u7ae0\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u96f6\u57fa\u7840openmp\/SAMP gtasa\u8054\u673a\u670d\u52a1\u5668\u5f00\u53d1\u6559\u7a0b - \u7b2c\u4e8c\u7ae0 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/81736.html","og_locale":"zh_CN","og_type":"article","og_title":"\u96f6\u57fa\u7840openmp\/SAMP gtasa\u8054\u673a\u670d\u52a1\u5668\u5f00\u53d1\u6559\u7a0b - \u7b2c\u4e8c\u7ae0 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u96f6\u57fa\u7840openmp\/SAMP gtasa\u8054\u673a\u670d\u52a1\u5668\u5f00\u53d1\u6559\u7a0b - \u7b2c\u4e8c\u7ae0 \u7f16\u5199&#xff1a;\u5c0f\u9e1f Github \u65f6\u95f4&#xff1a;2026\/03\/23 \u672c\u6559\u7a0b\u9762\u5411\u5b8c\u5168\u96f6\u57fa\u7840\u7684\u65b0\u624b&#xff0c;\u6bcf\u4e00\u8282\u53ea\u8bb2\u4e00\u4e2a\u77e5\u8bc6\u70b9&#xff0c;\u5faa\u5e8f\u6e10\u8fdb\u3002 \u672c\u7ae0\u8282\u5148\u4ee5\u5feb\u901f\u4e86\u89e3 Pawn \u8bed\u8a00\u548c openmp \u6e38\u620f\u5b9e\u9645\u5e94\u7528\u4e3a\u5f00\u7aef&#xff0c;\u8ba9\u65b0\u624b\u66f4\u5feb\u901a\u8fc7\u5b9e\u9645\u6e38\u620f\u8868\u73b0\u83b7\u5f97\u53cd\u9988&#xff0c;\u4ee5\u907f\u514d\u4e00\u5f00\u59cb\u5c31\u63a5\u89e6\u8fc7\u591a\u8bed\u6cd5&#xff0c;\u5efa\u8bae\u9605\u8bfb\u5b8c\u672c\u7ae0\u8282\u518d\u5f00\u59cb\u7b2c\u4e09\u7ae0\u5de9\u56fa\u8fdb\u9636\u7f16\u7a0b\u8bed\u8a00\u7ec6\u8282 \u76ee\u5f55","og_url":"https:\/\/www.wsisp.com\/helps\/81736.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-07-24T20:02:01+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260724200159-6a63c4b7b139f.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"10 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/81736.html","url":"https:\/\/www.wsisp.com\/helps\/81736.html","name":"\u96f6\u57fa\u7840openmp\/SAMP gtasa\u8054\u673a\u670d\u52a1\u5668\u5f00\u53d1\u6559\u7a0b - \u7b2c\u4e8c\u7ae0 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-07-24T20:02:01+00:00","dateModified":"2026-07-24T20:02:01+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/81736.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/81736.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/81736.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u96f6\u57fa\u7840openmp\/SAMP gtasa\u8054\u673a\u670d\u52a1\u5668\u5f00\u53d1\u6559\u7a0b - \u7b2c\u4e8c\u7ae0"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/81736","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=81736"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/81736\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/81735"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=81736"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=81736"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=81736"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=81736"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}