- เครดิต
- 773
- ความรู้
-
- เงิน $
-
- ความดี
-
|
แก้ไขครั้งสุดท้ายโดย ton503 เมื่อ 2011-10-18 05:11
แก้ไขครั้งสุดท้ายโดย ton503 เมื่อ 2011-1-11 21:23 - if(strcmp(cmd, "/fakesays", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if(PlayerInfo[playerid][pLevel] > 5)
- {
- SendClientMessage(playerid, COLOR_GRAD1, "¤Ø³àÅàÇÅàÂÍÐáÅéÇäÁè¤Çþٴâ¡Ë¡");
- return 1;
- }
- GetPlayerName(playerid, sendername, sizeof(sendername));
- new length = strlen(cmdtext);
- while ((idx < length) && (cmdtext[idx] <= ' '))
- {
- idx++;
- }
- new offset = idx;
- new result[64];
- while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
- {
- result[idx - offset] = cmdtext[idx];
- idx++;
- }
- result[idx - offset] = EOS;
- if(!strlen(result))
- {
- SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /fakesays [text]");
- return 1;
- }
- format(string, sizeof(string), "%s", result);
- SendClientMessageToAll(0xF60000AA, string);
- }
- return 1;
- }
คัดลอกไปที่คลิปบอร์ด หลังจากหายไปหลายปีผมก็กลับมาพร้อมคำอธิบายสั้นๆครับ
ก็ถ้าเรากด /fakesay มันจะขึ้น ooc แต่มันจะไม่มีชื่อเราขึ้นมันจะขึ้นตามที่เราเขียนทุกอย่างเช่น
/fakesay หวัดดีครับ ใน ooc ก็จะขึ้นแต่ หวัดดีครับถ้าเรากด /o หวัดดีครับ มันก็จะขึ้นไอดี ชื่อ แล้วก็ หวัดดีครับ
แค่นี้แหละครับ
ผมก็ลองเขียนขึ้นมานะครับยังไม่ได้ทดลองใช้แต่คอมผ่านครับ
ปล.ควร Backup สคริปไว้ก่อนนะครับ
|
|