[С#] Не работают нативные функции

Recommended Posts

При вызове команды и при указание определенного параметра должна отрабатывать нативная функция,  но почему-то не работает, при этом сообщения в чат выдает т.е.  в условия впадает. 

        [Command("movecam", "use /movecam [isPlayer]", GreedyArg = true)]
        public void CMD_MoveCam(Client player, String isPlayer)
            NAPI.Chat.SendChatMessageToPlayer(player, "MEss: "+ isPlayer);

            if (isPlayer == "down")
                NAPI.Native.SendNativeToPlayer(player, Hash.IS_PLAYER_SWITCH_IN_PROGRESS, player.Handle);
                NAPI.Chat.SendChatMessageToPlayer(player, "down_s");
            else if (isPlayer == "up")
                NAPI.Native.SendNativeToPlayer(player, Hash._SWITCH_OUT_PLAYER, player.Handle);
                NAPI.Chat.SendChatMessageToPlayer(player, "up_s");
            else if (isPlayer == "sd")
                NAPI.Native.SendNativeToPlayer(player, Hash.START_PLAYER_SWITCH, player.Handle);
                NAPI.Chat.SendChatMessageToPlayer(player, "sd_s");
            else if (isPlayer == "ammo")
                int ammoCount = NAPI.Native.FetchNativeFromPlayer<int>(player, Hash.GET_AMMO_IN_PED_WEAPON, player, WeaponHash.Wrench);
                NAPI.Chat.SendChatMessageToPlayer(player, "LOL " + ammoCount);
            else if (isPlayer == "wa")
                NAPI.Chat.SendChatMessageToPlayer(player, "LOL ");
                NAPI.Native.SendNativeToPlayer(player, Hash.SET_PED_HELMET, player, true);


Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    No registered users viewing this page.