SA-MP Forums Archive
Bug in OnPlayerRequestClass(playerid, classid)! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP (https://sampforum.blast.hk/forumdisplay.php?fid=3)
+--- Forum: Bug Reports (https://sampforum.blast.hk/forumdisplay.php?fid=20)
+--- Thread: Bug in OnPlayerRequestClass(playerid, classid)! (/showthread.php?tid=542362)



Bug in OnPlayerRequestClass(playerid, classid)! - JR_Junior - 18.10.2014

I saw some things that changed these past versions of samp.
One was the callback OnPlayerRequestClass (playerid, classid).


The function GetPlayerSkin(playerid) ever returns ID 0. Why? In other versions this is not happening!!!
Any help
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{

   GetPlayerSkin(playerid);
   return 1;
}



Re: Bug in OnPlayerRequestClass(playerid, classid)! - Abagail - 18.10.2014

If they are requesting to spawn then they usually don't have a skin set. ClassID is the skin they are attempting to spawn with.


Re: Bug in OnPlayerRequestClass(playerid, classid)! - JR_Junior - 18.10.2014

Quote:
Originally Posted by Abagail
Посмотреть сообщение
If they are requesting to spawn then they usually don't have a skin set. ClassID is the skin they are attempting to spawn with.
Right, but in my old RP server(samp 0.3d) my skin shop all players inside the shop can see the skin selected, because I used this following code:

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{

   SetPlayerSkin(playerid,GetPlayerSkin(playerid));
   return 1;
}
The code above show and set the skin from current ClassID, but in 0.3z the Skin ID return 0(CJ Skin).


Respuesta: Bug in OnPlayerRequestClass(playerid, classid)! - IvanAyuso - 24.10.2014

That works perfectly, check your code.


Re: Bug in OnPlayerRequestClass(playerid, classid)! - Sew_Sumi - 27.10.2014

Unless you use the F4 character selection for your skin menu, you're using the wrong methods.