SA-MP Forums Archive
Creating a 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: Creating a Skin Selection (/showthread.php?tid=327984)



Creating a Skin Selection - Reklez - 23.03.2012

Is it possible to make a Skin Selection just like OnPlayerRequestClass

so here let me explain it

if player go to the skin pickup's he will go to Skin Selection.

which is i gonna use SetPlayerCamPosLookAt (my func) and SetPlayerVWIPosAng (also my func)
is this possible without doing ForceClassSelection?


Re: Creating a Skin Selection - Tom1412 - 23.03.2012

yeah you can.

on the skin pick up you want to do

ForceClassSelection(playerid);
SetPlayerHealth(playerid, 0);

and that will give them class selection


Re: Creating a Skin Selection - Reklez - 23.03.2012

no i mean if player pick the skinpickup he will go to Skin Selection

which is i need to use OnPlayerKeyStateChange instead of ForceClassSelection


Re: Creating a Skin Selection - Tom1412 - 23.03.2012

yeah you can have onplayerpickup he/she gets send to onplayerclass.


Re: Creating a Skin Selection - emokidx - 23.03.2012

OnPlayerPickUpPickup?
https://sampwiki.blast.hk/wiki/OnPlayerPickUpPickup


Re: Creating a Skin Selection - Reklez - 23.03.2012

i know how to use the OnPlayerPickUpPickup, but i want a skin selection without using ForceClassSelection, i just want to use something like OnPlayerKeyStateChange to choose a skin.


Re: Creating a Skin Selection - Reklez - 24.03.2012

Now the question is how to check the next skin id example

i'm using skin id 0, then how to check the next skin id?


Re: Creating a Skin Selection - Reklez - 24.03.2012

new question

^^^


Re: Creating a Skin Selection - Jonny5 - 24.03.2012

well just like samp,
make an array of your custom player classes
and store the skin ID, and any other info you may need to know about the skin, like group/team ect..


Re: Creating a Skin Selection - [ABK]Antonio - 24.03.2012

Yes, it is possible.


pawn Код:
new bool:InClassSelection[MAX_PLAYERS] = false; //outside of everything


CMD:changeclass(playerid, params[])
{
    if(!InClassSelection[playerid])
    {
        InClassSelection[playerid] = true;
        SetPlayerHealth(playerid, 0);
    }
    else return SendClientMessage(playerid, 0xCC0000AA, "You're already in the class selection!");
    return 1;
}

public OnPlayerSpawn(playerid)
{
    if(InClassSelection[playerid])
    {
        //set their camera pos etc.
    }
    else
    {
        //everything else on OnPlayerSpawn
    }
}
I couldn't get my class selection working because I was having problems with getting the left and right arrow keys...Don't know why they were messing up, maybe you'll have better luck.