Question

Сама команда:

CMD:hi(playerid, params[])
{
    if(sscanf(params, "u", params[0])) return SendClientMessage(playerid, -1"Используйте: /hi [ID игрока]");
    if(!IsPlayerConnected(params[0]) || params[0] == playerid || IsPlayerInAnyVehicle(playerid)) return 1;
    if(!ProxDetectorS(2.0, playerid, params[0])) return 1;

    new unix;
    new string[100];
    new Float:Boshka;

    new PName1[MAX_PLAYER_NAME];
    GetPlayerName(playerid, PName1, sizeof(PName1));

    new PName2[MAX_PLAYER_NAME];
    GetPlayerName(params[0], PName2, sizeof(PName2));

    GetPlayerFacingAngle(playerid, Boshka);
    SetPlayerFacingAngle(params[0], Boshka + 180);
    format(string, 74"%s пожал(-а) руку %s", PName1, PName2);
    ProxDetector(10.0, playerid, string, 0xDD90FFFF);

    ApplyAnimation(playerid,"GANGS","hndshkfa",4.0,0,0,0,0,0);
    ApplyAnimation(params[0],"GANGS","hndshkfa",4.0,0,0,0,0,0);

    Delete3DTextLabel(Player_ID[playerid]);
    SetPVarInt(playerid, "hiFlood", unix+5);
    ShowPlayerNameTagForPlayer(playerid, params[0], 1);
    ShowPlayerNameTagForPlayer(params[0], playerid, 1);
    return 1;
}

 

Компилятор:

warning 202: number of arguments does not match definition
warning 202: number of arguments does not match definition
warning 202: number of arguments does not match definition
warning 202: number of arguments does not match definition

 

 

Строка на которой вылазит варнинги:

ProxDetector(10.0, playerid, string, 0xDD90FFFF);

 

Искал различные варианты устранения данной ошибки, но увы, ничего не помогло.

Заранее спасибо, кто сможет помочь =)

Edited by kut1r0

Share this post


Link to post

2 answers to this question

  • 0

@onceb0rn., как функция ProxDetector объявлена?

Share this post


Link to post
  • 0

@Cawfee 

Если я не ошибаюсь, то вот так.

stock ProxDetector(Float:radi, playerid, string[], col1)
{
    if(IsPlayerConnected(playerid))
    {
        new Float:posx;new Float:posy;new Float:posz;new Float:oldposx;new Float:oldposy;new Float:oldposz;new Float:tempposx;new Float:tempposy;new Float:tempposz;
        GetPlayerPos(playerid, oldposx, oldposy, oldposz);
        foreach(new i: Player)
        {
            if(IsPlayerConnected(i))
            {
                if(GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(i))
                {
                    GetPlayerPos(i, posx, posy, posz);
                    tempposx = (oldposx -posx);
                    tempposy = (oldposy -posy);
                    tempposz = (oldposz -posz);
                    if(((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -     radi/16))) SendClientMessage(i, col1, string);
                }
            }
        }
    }
    return 1;
}

 

Edited by onceb0rn.

Share this post


Link to post
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • Kutuzov
      By Kutuzov
      Всем привет, хотелось бы спросить у тех, кто разбирается в PluginSDK.
      Какие есть источники, руководства, документации о PluginSDK?
      Я пока что ничего нормального не нахожу.
      Заранее спасибо