server-beta icon indicating copy to clipboard operation
server-beta copied to clipboard

SetPlayerSkin is not working at SA-MP Launcher APK

Open hiwyn opened this issue 1 year ago • 12 comments

SetPlayerSkin is not working on SA-MP Launcher [mostly used sa-mp APK, more than 10.000.000 downloads]

  • for the others players: they see the right skin for the target player
  • for the target player: he see himself with CJ skin (id: 0) and can run with CJ speed even with UsePlayerPedAnims() disabled

There is any work around to fix it?

hiwyn avatar Oct 19 '24 22:10 hiwyn

It works for me with an empty simple script and only 2 players in game

You must provide a script for me to reproduce this bug

AmyrAhmady avatar Oct 19 '24 23:10 AmyrAhmady

@hiwyn maybe you tested it on release build? It was most likely fixed in latest nightly.

NexiusTailer avatar Oct 20 '24 00:10 NexiusTailer

+1

Here the SetPlayerSkin doesn't work too and the Android clients only use the skin 0 by default.

Duduzera1997 avatar Nov 20 '24 04:11 Duduzera1997

+1

Here the SetPlayerSkin doesn't work too and the Android clients only use the skin 0 by default.

The same question again:

maybe you tested it on release build? It was most likely fixed in latest nightly

NexiusTailer avatar Nov 20 '24 09:11 NexiusTailer

@NexiusTailer oh, sorry, I discovered that 'nightly' is a build of the main/master branch is a few hours ago, so, after building it worked out fine.

Just for future history: @AmyrAhmady recommended me in discord to use SetSpawnInfo instead of SetPlayerSkin to test and started to work better with the current published release (v1.3.1.2748) but to work out with my old code just on nightly.

Thanks for your help!

Duduzera1997 avatar Nov 20 '24 19:11 Duduzera1997

sorry this long, i went back to samp, i was losing a lot of players

but i had this problem with a code like:

public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerVirtualWorldEx(playerid, 111);
    SetPlayerCameraLookAt(playerid, 2.9660,28.3319,1200.0781);
    SetPlayerInteriorEx(playerid,1);
    SetPlayerFacingAngle(playerid,2.2269);
    SetSpawnInfo(playerid, 1, 29, 2.9660,30.3319,1200.0781,0.0, 0,0,0,0,0,0 );
    return SpawnPlayer(playerid);
}

public OnPlayerSpawn(playerid) {
    ...
    KillTimerEx(timerResetPlayerSkin[playerid]);
    timerResetPlayerSkin[playerid] = SetTimerEx("SetPlayerSkin", 5000, false, "ii", playerid, skinid);
}

on commit 8c246565edd6363ee55dfd01043f5c0c48f92f09

Merge: 596ece7a 43cd406a
Author: iAmir <[email protected]>
Date:   Thu Oct 31 14:56:03 2024 +0330

    Merge pull request #1016 from openmultiplayer/hual/player_objects_crash_fix
    
    Fix moving player objects crash due to out-of-order destruction

hiwyn avatar Feb 15 '25 10:02 hiwyn

Why are you using an old build like that, while even our official public release is newer?

AmyrAhmady avatar Feb 15 '25 10:02 AmyrAhmady

Why are you using an old build like that, while even our official public release is newer?

I just saying what version i was using, i went back to samp, i couldn't stop to support the most used android apk (10 mi+ downloads) I'l try to test the new one some day, but none of commits after that mention this problem

hiwyn avatar Feb 16 '25 11:02 hiwyn

but none of commits after that mention this problem

It was fixed long time ago: https://github.com/openmultiplayer/open.mp/pull/978

NexiusTailer avatar Feb 16 '25 14:02 NexiusTailer

but none of commits after that mention this problem

It was fixed long time ago: #978

i don't think so, this commit is from Sep 8, 2024 the branch i was using when i was using open mp was Oct 31, 2024

hiwyn avatar Feb 17 '25 17:02 hiwyn

but none of commits after that mention this problem

It was fixed long time ago: #978

i don't think so, this commit is from Sep 8, 2024 the branch i was using when i was using open mp was Oct 31, 2024

Ok, so what about finally managing to update a few files in your server path to test on the latest release available?

NexiusTailer avatar Feb 17 '25 18:02 NexiusTailer