just small code/fix
#2

pawn Код:
#define CMDLEVEL(%0) if(PlayerInfo[playerid][pAdmin] < %0) SendClientMessageEx(playerid, COLOR_GRAD1, "You are not authorized to use that command.");

CMD:aslap(playerid, params[])
{
    CMDLEVEL(2);

    if(!PlayerInfo[playerid][pAdminDuty]) return SendClientMessageEx(playerid, COLOR_GRAD2, "You can't do this whilst your off Duty!");

    new giveplayerid;
    if(sscanf(params, "u", giveplayerid)) return SendClientMessageEx(playerid, COLOR_GREY, "USAGE: /aslap [player]");

    if(IsPlayerConnected(giveplayerid))
    {
        new string[128], Float:shealth, Float:slx, Float:sly, Float:slz;
        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);
        format(string, sizeof(string), "AdmCmd: %s was slapped by %s",GetPlayerNameEx(giveplayerid), GetPlayerNameEx(playerid));
        ABroadCast(COLOR_LIGHTRED,string,2);
    }
    return 1;
}
Reply


Messages In This Thread
!-Solved-! !-Thanks-! - by Joe_Goro - 17.11.2013, 06:51
Re: just small code/fix - by Pottus - 17.11.2013, 06:57
Re: just small code/fix - by Joe_Goro - 17.11.2013, 07:01
Re: just small code/fix - by Pottus - 17.11.2013, 07:02
Re: just small code/fix - by Joe_Goro - 17.11.2013, 07:06
Solved - Working - by Joe_Goro - 17.11.2013, 07:20

Forum Jump:


Users browsing this thread: 3 Guest(s)