new Float:x,Float:y,Float:z;
GetPlayerPos(playerid,x,y,z);
SetPlayerPos(playerid,x,y,z+IncrementHere);
CMD:slap(playerid, params[])
{
if(IsPlayerAdmin(playerid))
{
new string[128], giveplayerid;
if(sscanf(params, "i", giveplayerid)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /slap [playerid]");
new Float:shealth;
new Float:slx, Float:sly, Float:slz;
if(IsPlayerConnected(giveplayerid))
{
GetPlayerHealth(giveplayerid, shealth);
SetPlayerHealth(giveplayerid, shealth-5);
GetPlayerPos(giveplayerid, slx, sly, slz);
SetPlayerPos(giveplayerid, slx, sly, slz+5);
PlayerPlaySound(giveplayerid, 1130, slx, sly, slz+5);
}
}
else
{
SendClientMessageEx(playerid, COLOR_GRAD1, "You are not authorized to use that command!");
}
return 1;
}
CMD:slap(playerid,params[]) { if(pInfo[playerid][pAdminLevel] >= 2 || IsPlayerAdmin(playerid)) { new targetid,string[128]; if(sscanf(params, "u", targetid)) return SendClientMessage(playerid,-1,""chat" /slap [playerid]"); if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid,-1,""chat" Player is not online"); new Float:posxx[3]; GetPlayerPos(targetid, posxx[0], posxx[1], posxx[2]); SetPlayerPos(targetid, posxx[0], posxx[1], posxx[2]+40); if(IsPlayerAdmin(playerid)) { format(string, sizeof(string), "*"COL_RED" RCON Admin has slapped %s",PlayerName(targetid)); SendMessageToAllAdmins(string,-1); } else { format(string, sizeof(string), "*"COL_RED" %s %s has slapped %s",GetAdminName(playerid),PlayerName(playerid),PlayerName(targetid)); SendMessageToAllAdmins(string,-1); } } else { SendClientMessage(playerid,-1,"*"COL_RED" You do not have the right admin permissions for this command!"); } return 1; }
CMD ![]() { new Float ![]() new str[128], id, reason[128]; if(PlayerAcc[playerid][Admin] >= 3)// replace this { if(sscanf(params, "u[128]", id, reason)) return SendClientMessage(playerid, COLOR_RED, "Slap: /slap (id) (reason)"); if(id == INVALID_PLAYER_ID) return ErrorMessages(playerid, 2); if(id == playerid) return ErrorMessages(playerid, 4); if(PlayerAcc[id][Jail] == 1) return SendClientMessage(playerid, COLOR_RED, "That player is in jail (Unable to slap!)");// replace this too GetPlayerPos(id, x, y, z); GetPlayerHealth(id, health); SetPlayerHealth(id, health-25); SetPlayerPos(id, x, y, z+5); format(str, sizeof(str), "%s(%d) has been slap by Admin %s(%d)", GetName(id), id, GetName(playerid), playerid, GetPlayerHealth(id, health)); SendClientMessageToAll(COLOR_GREEN, str); PlayerPlaySound(playerid, 1190, 0.0, 0.0, 0.0); PlayerPlaySound(id, 1190, 0.0, 0.0, 0.0); } return 1; } |
new Float:x,Float:y,Float:z; GetPlayerPos(playerid,x,y,z); SetPlayerPos(playerid,x,y,z+3);
CMD:slap(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pModerator] >= 1)
{
if(AdminDuty[playerid] != 1 && PlayerInfo[playerid][pAdmin] < 5)
{
SendClientMessage(playerid,COLOR_WHITE, "You're not on-duty as admin. To access your admin commands you must be on-duty. Type /aduty to go on-duty.");
return 1;
}
new string[128], giveplayerid;
if(sscanf(params, "u", giveplayerid)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /slap [playerid/partofname]");
if(PlayerInfo[giveplayerid][pAdmin] > PlayerInfo[playerid][pAdmin])
{
SendClientMessage(playerid,COLOR_WHITE, "You can't slap a higher admin.");
return 1;
}
new
Float:shealth;
if(IsPlayerConnected(giveplayerid)) {
GetPlayerHealth(giveplayerid, shealth);
SetPlayerHealth(giveplayerid, shealth-5);
GetPlayerPos(giveplayerid, PlayerInfo[giveplayerid][pPos_x], PlayerInfo[giveplayerid][pPos_y], PlayerInfo[giveplayerid][pPos_z]);
SetPlayerPos(giveplayerid, PlayerInfo[giveplayerid][pPos_x], PlayerInfo[giveplayerid][pPos_y], PlayerInfo[giveplayerid][pPos_z]+5);
PlayerPlaySound(giveplayerid, 1130, PlayerInfo[giveplayerid][pPos_x], PlayerInfo[giveplayerid][pPos_y], PlayerInfo[giveplayerid][pPos_z]+5);
format(string, sizeof(string), "AdmCmd: %s was slapped by %s",GetPlayerNameEx(giveplayerid), GetPlayerNameEx(playerid));
ABroadCast(COLOR_LIGHTRED,string,2);
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "You're not authorized to use that command!");
}
return 1;
}