Hello,
I'm using the LAdmin filterscript: https://pastebin.com/raw/rAtMKpnc
The /slap command seems to display the issuing admin's name, rather than the player's name, in this message:
Does anyone know why this might be?
I'm using the LAdmin filterscript: https://pastebin.com/raw/rAtMKpnc
The /slap command seems to display the issuing admin's name, rather than the player's name, in this message:
Code:
format(string, sizeof(string), "You have slapped %s [%s] ", pName(playerid), reason);
Code:
CMD:slap(playerid, params[])
{
if(PlayerInfo[playerid][Level] < 2)
return SendClientMessage(playerid, red, "ERROR: You are not a high enough level admin to use this command.");
new player1, string[128], reason[64];
if(sscanf(params, "uS(no reason given)[64]", player1, reason))
return SendClientMessage(playerid, red, "USAGE: /slap [playerid] [reason/with]");
if(player1 == INVALID_PLAYER_ID)
return SendClientMessage(playerid, red, "ERROR: Player is not connected.");
if(PlayerInfo[player1][Level] == ServerInfo[MaxAdminLevel] && PlayerInfo[playerid][Level] != ServerInfo[MaxAdminLevel])
return SendClientMessage(playerid,red,"ERROR: You cannot use this command on this admin");
CMDMessageToAdmins(playerid, "SLAP");
new Float:Health, Float:x, Float:y, Float:z;
GetPlayerHealth(player1, Health);
SetPlayerHealth(player1, Health-25);
GetPlayerPos(player1, x, y, z);
SetPlayerPos(player1, x, y, z+5);
PlayerPlaySound(playerid, 1190, 0.0, 0.0, 0.0);
PlayerPlaySound(player1, 1190, 0.0, 0.0, 0.0);
format(string, sizeof(string), "You have been slapped by Administrator %s [%s] ", pName(playerid), reason);
SendClientMessage(player1, red, string);
format(string, sizeof(string), "You have slapped %s [%s] ", pName(playerid), reason);
SendClientMessage(playerid, yellow, string);
return 1;
}
Does anyone know why this might be?