- เครดิต
- 6
- ความรู้
-
- เงิน $
-
- ความดี
-
|
if(strcmp(cmd, "/asay", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (PlayerInfo[playerid][pAdmin] == 0)
{
SendClientMessage(playerid, COLOR_GRAD5,"คุณไม่ใช่แอดมิน !");
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: /asay [text]");
return 1;
}
format(string, sizeof(string), "Admin %s(%d): %s", sendername, playerid, result);
SendClientMessageToAll(0xFF0000FF, string);
}
return 1;
} |
|