pawn Код:
COMMAND:tapa(playerid, params[])//OK
{
new Msg[128], PTName[24], AdminName[24], OtherPlayer, player1, Float:tapax, Float:tapay, Float:tapaz;
SendAdminText(playerid, "/tapa", params);
if (APlayerData[playerid][LoggedIn] == true)
{
if (APlayerData[playerid][PlayerLevel] >= 2)
{
if (sscanf(params, "u", OtherPlayer)) return SendClientMessage(playerid, 0xFF0000AA, "{FF0000}Use: /tapa [id]");
if (IsPlayerConnected(OtherPlayer))
{
GetPlayerName(playerid, AdminName, sizeof(AdminName));
GetPlayerName(OtherPlayer, PTName, sizeof(PTName));
player1 = OtherPlayer;
GetPlayerPos(player1, tapax, tapay, tapaz);
SetPlayerPos(player1, tapax, tapay, tapaz+10);
format(Msg, 128, "{FF0000}-| O Administrador %s deu um tapa em %s |-", AdminName, PTName);
SendClientMessageToAll(0xFFFFFFFF, Msg);
PlayerFile_Save(OtherPlayer);
}
else SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}Este jogador nгo se encontra online!");
}
else SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}Voce nao esta autorizado a usar esse comando!");
}
return 1;
}