Question

В моде стоит вот такая команда /changeskin

CMD:changeskin(playerid, params[])
{
    if(IsAbleToInvite(playerid))
    {
        new targetid;
        if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, 0xFFCC00AA"•[Подсказка] {FFFFFF}Введите: /changeskin [id игрока]");
        else if(!IsPlayerConnected(targetid)) return SendMess(playerid, MSG_PLAYER_OFFLINE);
        else if(PlayerLogged[targetid] == falsereturn SendMess(playerid, MSG_PLAYER_NOT_LOGGED);
        else if(PI[targetid][pMember] == 0return SendClientMessage(playerid, COLOR_GREY, "Игрок не находиться в организации!");
        else if(PI[targetid][pMember] != PI[playerid][pMember]) return SendClientMessage(playerid, COLOR_GREY, "Игрок находиться в другой организации!");
        else if(GetPlayerDistanceToPlayer(playerid,targetid) > 5.0 || GetPlayerVirtualWorld(playerid) != GetPlayerVirtualWorld(targetid)) return SendClientMessage(playerid,COLOR_GREY,"Вы далеко друг от друга");
        else if(PI[targetid][pRank] > PI[playerid][pRank]) return SendClientMessage(playerid, COLOR_GREY, "Ваш ранг недостаточен");
        SetPVarInt(playerid, "actplayerid", targetid);
        new fractionid = PI[playerid][pMember];
        new mes[128];
        for(new i; i < 16; i++)
        {
            new skinid = Fraction_Skin[fractionid][i];
            if(!skinid) break;
            if(!i) format(mes, sizeof(mes), "Одежда %d", i+1, skinid);
            else format(mes, sizeof(mes), "%s\nОдежда %d", mes, i+1, skinid);
        }
        ShowPlayerDialog(playerid, D_FRACMENU+82"Выбор скина", mes, "Принять""");
    }
    else SendMess(playerid, MSG_YOU_CAN_NOT);
    return 1;
}

Как сделать так, чтобы лидер мог сменить форму сотруднику только у раздевалки (Рядом с меткой)

Координаты раздевалки: 598.5961,6.2900,1022.9027

Share this post


Link to post

1 answer to this question

  • 0

@TopsyPlaysi 

IsPlayerInRangeOfPoint(playerid, Float:range, Float:x, Float:y, Float:z)
//playerid  The ID of the player.
//Float:range   The furthest distance the player can be from the point to be in range.
//Float:x   The X coordinate of the point to check the range to.
//Float:y   The Y coordinate of the point to check the range to.
//Float:z   The Z coordinate of the point to check the range to.


 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content