• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to fix dark skin issue on SAMP class selection in pawn?
#1
Question 
Hello Everyone,
? ? ? ? ? ? ? ? ? ? ? ? ? ?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. The issue is when a player request's a class all skins becomes darker.

Code:
#include <a_samp>

main() {

}

public OnGameModeInit() {
    SetWeather(10);
    SetWorldTime(12);
    AddPlayerClass(1, -1479.434082, 920.448730, 71.350372, 288.652161, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(2, -1479.434082, 920.448730, 71.350372, 288.652161, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(3, -1479.434082, 920.448730, 71.350372, 288.652161, 0, 0, 0, 0, 0, 0);
    return 1;
}

public OnPlayerRequestClass(playerid, classid) {
    SetPlayerPos(playerid, -1479.434082, 920.448730, 71.350372);
    SetPlayerFacingAngle(playerid, 288.652161);
    SetPlayerCameraPos(playerid, -1474.420288, 922.672607, 72.009903);
    SetPlayerCameraLookAt(playerid, -1475.333984, 922.266418, 71.999748);
    return 1;
}

Screenshot Of The Issue:
[Image: ApgJX.jpg]

Screenshot Of The Expected Results:
[Image: 23ttM.jpg]

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().
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.
But still same result.

If you know any solution for this problem please share.

Thank You,
  Reply
#2
did you try to set it to another location? I'm not sure at all, but maybe SA-MP weather or time may cause this
  Reply
#3
(2021-02-15, 10:30 AM)destiezk Wrote: did you try to set it to another location? I'm not sure at all, but maybe SA-MP weather or time may cause this



Yes I tried, I copied camera pos, player pos, camera point pos,?player facing angle, weather and time from a popular server, and tried on my server but still all skins were showing black.



Screenshot from the?server where I copied the coordinates from:

[Image: sa-mp-042.png]



Screenshot of my server where I tried coordinates:

[Image: sa-mp-043.png]
  Reply
#4
Should work fine as I tried it too, Try changing the weather/time and see if the problem still occurs or no?
  Reply
#5
(2021-02-15, 06:38 PM)ImOver Wrote: Should work fine as I tried it too, Try changing the weather/time and see if the problem still occurs or no?



BC you said, I gave it another try and still same results, I tried setting it?using code and also used time and weather commands to change it manually in class selection.?Do you think?is there?any problem in my code or I am missing something? or I did something wrong in "server.cfg"??



As you said you tried it and?it was working fine on your side, can you please share the working code you used on your side?



Thank You,
  Reply
#6
could you please try this one?

Code:
SetPlayerPos(playerid, -1211.7233, -98.9115, 40.3509);
SetPlayerFacingAngle(playerid, 312.6212);
SetPlayerCameraPos(playerid, -1207.8231, -95.5987, 41.6189);
SetPlayerCameraLookAt(playerid, -1211.7233, -98.9115, 40.3509);
  Reply


Forum Jump: