Skin Selection - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Skin Selection (
/showthread.php?tid=451299)
Skin Selection -
Dziugsas - 16.07.2013
Hello!I wanted to ask you how i can make that player can choose my skins when he chooses hes gender - onplayerrequestclass.
I already made gender selection.
Re: Skin Selection -
IceBilizard - 16.07.2013
First of all make AddPlayerClass under OnGameModInit
pawn Код:
public OnGameModeInit()
{
AddPlayerClass(2,1759.3490,-1895.4958,13.5610,268.6081,-1,-1,-1,-1,-1,-1);
AddPlayerClass(269,1759.3490,-1895.4958,13.5610,268.6081,-1,-1,-1,-1,-1,-1);
return 1;
}
after this
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
SetupPlayerForClassSelection(playerid);
return 1;
}
forward SetupPlayerForClassSelection(playerid);
public SetupPlayerForClassSelection(playerid)
{
SetPlayerInterior(playerid,14);
SetPlayerFacingAngle(playerid, 270.0);
PlayerPlaySound(playerid, 1186, 0.0, 0.0, 5.0);
SetPlayerPos(playerid,258.4893,-41.4008,1002.0234);
SetPlayerCameraPos(playerid,256.0815,-43.0475,1004.0234);
SetPlayerCameraLookAt(playerid,258.4893,-41.4008,1002.0234);
}
Re: Skin Selection -
JimmyCh - 16.07.2013
I haven't tested it or anything, but maybe ..
pawn Код:
if(PlayerInfo[playerid][Gender] == Male)
{
AddPlayerClass( ...) etc?
I don't know if this works or anything but I think this can work.
AW: Skin Selection -
Nero_3D - 16.07.2013
That wont work since you only can add classes add OnGameModeInit
The only way to do that is to recreate the class selection
As far as I know their is only y_classes which supports that
Re: Skin Selection -
SwisherSweet - 16.07.2013
Check if player male onplayerspawn showplayerdialog let him select the skin id then setplayerskin best way
Edit: clickable textdraws for skins would be better