HELP xD
#4

Quote:
Originally Posted by [M.A]Angel[M.A]
Посмотреть сообщение
slap player
pawn Код:
if(strcmp(cmd, "/slap", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_RED, "USAGE: /slap [playerid/PartOfName]");
                return 1;
            }
            new playa;
            new Float:slx, Float:sly, Float:slz;
            playa = ReturnUser(tmp);
            if (PlayerInfo[playerid][pAdmin] >= 1  || IsPlayerAdmin(playerid))
            {
                if(IsPlayerConnected(playa))
                {
                    if(playa != INVALID_PLAYER_ID)
                    {
                        new targetlevel = PlayerInfo[playa][pAdmin];
                        new playerlevel = PlayerInfo[playerid][pAdmin];
                        if(targetlevel > playerlevel) return SendClientMessage(playerid, COLOR_GREY, "* You can not slap People that is higher Than You!");
                        GetPlayerName(playa, giveplayer, sizeof(giveplayer));
                        GetPlayerPos(playa, slx, sly, slz);
                        PlayerPlaySound(playa, 1190, slx, sly, slz+8);
                        new y, m, d;
                        new h,mi,s;
                        getdate(y,m,d);
                        gettime(h,mi,s);
                        format(string, sizeof(string), "[Info:] You slaped %s",GetPlayerNameEx(playa));
                        SendClientMessage(playerid,COLOR_ADMINCMD,string);
                        format(string, sizeof(string), "[Info:] You have been slapped by %s",GetPlayerNameEx(playerid));
                        SendClientMessage(playa,COLOR_WHITE,string);
                        format(string, sizeof(string), "[Info:] %s have been slapped by %s",GetPlayerNameEx(playa),GetPlayerNameEx(playerid)); //editbs
                        SendClientMessageToAll(COLOR_ADMINDUTY,string);
                    }
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_RED, "** you are not authorized to use that command!");
            }
        }
        return 1;
    }
or

pawn Код:
dcmd_slap(playerid,params[])
{
    if(!PLVL[playerid]) return 0;
    new pid;
    if(PlayerInfo[playerid][pAdminLevel] >=1)
    {
        if(sscanf(params, "u", pid)) return SendClientMessage(playerid, Yellow, "Usage: /slap <playerid>");
        if(IsPlayerConnected(pid))
        {
        new Float:Pos[3], string[128], adminname[MAX_PLAYER_NAME], paramname[MAX_PLAYER_NAME], moneys = strval(params);
        GetPlayerPos(pid,Pos[0],Pos[1],Pos[2]);
        SetPlayerPos(pid,Pos[0],Pos[1],Pos[2]+moneys);
        format(string, sizeof(string), "Admin %s has slapped %s for %d meters", adminname, paramname, moneys);
        MessageToAdmins(AdminColor, string);
        } else SendClientMessage(playerid, Red, "This player is not connected");
    } else if(PlayerInfo[playerid][pAdminLevel] == 0) return 0;
    return 1;
}
Reply


Messages In This Thread
HELP xD - by [M.A]Angel[M.A] - 07.02.2011, 12:03
Re: HELP xD - by Matej_ - 07.02.2011, 12:09
Re: HELP xD - by [M.A]Angel[M.A] - 07.02.2011, 12:12
Re: HELP xD - by Matej_ - 07.02.2011, 12:18
Re: HELP xD - by Cameltoe - 07.02.2011, 12:21
Re: HELP xD - by [M.A]Angel[M.A] - 07.02.2011, 16:08
Re: HELP xD - by [M.A]Angel[M.A] - 07.02.2011, 17:55
Re: HELP xD - by Ironboy500[TW] - 07.02.2011, 18:02
Re: HELP xD - by Ironboy500[TW] - 07.02.2011, 18:32
Re: HELP xD - by [M.A]Angel[M.A] - 08.02.2011, 02:45

Forum Jump:


Users browsing this thread: 4 Guest(s)