Gethere & Slap Command?
#5

use this one:
pawn Код:
dcmd_slap(playerid,params[]) {
    if(IsPlayerCommandLevel(playerid,"slap")) {
        if(!strlen(params)) return SendClientMessage(playerid,red,"Syntax Error: \"* Faisal_khan slaps <NICK OR ID> around a bit with a large trout.\".");
        new id; if(!IsNumeric(params)) id = ReturnPlayerID(params); else id = strval(params);
        if(IsPlayerConnected(id) && id != INVALID_PLAYER_ID && id != playerid) {
            SendCommandMessageToAdmins(playerid,"SLAP");
            new string[256],name[24],ActionName[24]; GetPlayerName(playerid,name,24); GetPlayerName(id,ActionName,24);
            format(string,256,"Administrator \"%s\" has bitch-slapped \"%s\".",name,ActionName); SendClientMessageToAll(yellow,string);
            new Float:Health; GetPlayerHealth(id,Health); return SetPlayerHealth(id,Health-Config[SlapDecrement]);
        } else return SendClientMessage(playerid,red,"ERROR: You can not slap yourself or a disconnected player.");
    } else return SendLevelErrorMessage(playerid,"slap");
}
Reply


Messages In This Thread
Gethere & Slap Command? - by NTS - 10.03.2012, 14:49
Re: Gethere & Slap Command? - by [XST]O_x - 10.03.2012, 15:37
Re: Gethere & Slap Command? - by NTS - 10.03.2012, 16:03
Re: Gethere & Slap Command? - by NTS - 11.03.2012, 10:08
Re: Gethere & Slap Command? - by Faisal_khan - 11.03.2012, 10:16

Forum Jump:


Users browsing this thread: 1 Guest(s)