- เครดิต
- 72
- ความรู้
-
- เงิน $
-
- ความดี
-
|
if(strcmp(cmd, "/fakeban", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /fakeban [playerid/PartOfName] [reason]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if (PlayerInfo[playerid][pINAdmin] >= 1)
{
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
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: /fakeban [playerid/PartOfName] [reason]");
return 1;
}
format(string, sizeof(string), "AdmCmd: %s ได้ถูกแบนโดย Admin %s สาเหตุ: %s", giveplayer, sendername, (result));
SendClientMessageToAll(COLOR_LIGHTRED, string);
SendClientMessage(giveplayerid, 0xFF9A00FF, "Server closed the connection."); // ทำเองหมดก็จริง แต่โค๊ตสี่นี่เอามาจากของ ADT
return 1;
}
}//not connected
}
else
{
format(string, sizeof(string), " %d ไม่ได้อยู่ในเกมส์.", giveplayerid);
SendClientMessage(playerid, COLOR_GRAD1, string);
}
}
return 1;
} |
|