简体   繁体   English

如何解决典当中 SAMP class 选择的深色皮肤问题?

[英]How to fix dark skin issue on SAMP class selection in pawn?

I'm working on a SAMP server using pawn language, but I've started facing an issue since I started work on SAMP player skin selection class.我正在使用 pawn 语言在 SAMP 服务器上工作,但自从我开始研究 SAMP 播放器皮肤选择 class 以来,我开始面临一个问题。 The issue is when a player request's a class all skins becomes darker.问题是当玩家请求 class 时,所有皮肤都会变暗。

My Code:我的代码:

public OnPlayerRequestClass(playerid, classid) {
    SetPlayerPos(playerid, 154.1271, -1951.8545, 51.3438);
    SetPlayerCameraPos(playerid, 148.6122, -1951.0000, 52.7962);
    SetPlayerCameraLookAt(playerid, 154.1271, -1951.8545, 51.3438);
    SetPlayerFacingAngle(playerid, -279.1916);
    return 1;
}

Screenshot Of The Issue:问题截图:

在此处输入图像描述

Screenshot Of The Expected Results:预期结果的截图:

在此处输入图像描述

As you can see in the first screenshot the player skin is darker then normal.正如您在第一个屏幕截图中看到的那样,玩家的皮肤比正常皮肤更黑。

What I have tried:我试过的:

I have tried rearranging the code, like calling SetPlayerCameraPos() before SetPlayerPos() .我尝试重新排列代码,例如在 SetPlayerPos SetPlayerCameraPos() SetPlayerPos() I have also tried using a timer to add a delay before setting player pos and camera pos.在设置播放器位置和相机位置之前,我还尝试使用计时器添加延迟。 I have also tried using TogglePlayerSpectating method to make sure every things gets loaded with player's camera.我也尝试过使用TogglePlayerSpectating方法来确保每个东西都被玩家的相机加载。 But still same result.但还是一样的结果。

If you know any solution for this problem please share.如果您知道此问题的任何解决方案,请分享。

Thank You,谢谢你,

This is a lighting effect that's caused by the weather Id of your environment - not the camera position.这是由环境的天气 ID 引起的照明效果 - 而不是相机 position。

You have two options:你有两个选择:

Try changing the world time - using SetWorldTime() or SetPlayerTime or change the weather using SetWeather() or SetPlayerWeather().尝试更改世界时间 - 使用 SetWorldTime() 或 SetPlayerTime 或使用 SetWeather() 或 SetPlayerWeather() 更改天气。 I'd suggest trying weather id 10.我建议尝试天气 id 10。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM