Help in OnplayerRequestclass
#1

well how can i do that if player has an saved skin it will only show that skin for class selection and when he registers he can see all the skins for choosing first time
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerPos(playerid,513.0550,-15.1650,1001.5653);
    SetPlayerCameraPos(playerid, 513.1265, -12.1960, 1001.7545);
    SetPlayerCameraLookAt(playerid, 513.0715, -13.1931, 1001.8734);
    SetPlayerFacingAngle( playerid, 359.1068);
    SetPlayerInterior(playerid, 3);
    if(!pInfo[playerid][LoggedInAsPlayer])
    {
        LoginOrRgisteryBox(playerid);
    }
    if(pInfo[playerid][newlife] || pInfo[playerid][Savedskin] == INVALID_SKIN_ID)
    {
        switch(classid)
        {
            case 0..274: GameTextForPlayer(playerid,SkinNames[classid], 3000, 5);
        }
    }
    AddPlayerClass(pInfo[playerid][Savedskin],1523.8240,-43.7732,1002.1310,180.0000,0,0,0,0,0,0); //
    if(pInfo[playerid][Savedskin] != INVALID_SKIN_ID)
    {
        classid =275;
    }
    return 1;
}
i tried this it was no use
INVALID_SKIN_ID = 350
Reply
#2

You can't tell which classes are shown for which players. All classes you add (AddPlayerClass(...)) are shown for every player in the class selection.

it it best if you only add classes in OnGameModeInit or OnFilterScriptInit.

You can however force a player to wear a certain skin. when the player goes into the class selection menu and the player has a saved skin, use SetSpawnInfo and then SpawnPlayer

https://sampwiki.blast.hk/wiki/SetSpawnInfo
https://sampwiki.blast.hk/wiki/SpawnPlayer
Reply
#3

Quote:
Originally Posted by ******
Посмотреть сообщение
That's not true - use y_classes and you can adjust all skins for any player.
Today I learned something new, never knew it was possible
Reply
#4

Quote:
Originally Posted by ******
Посмотреть сообщение
That's not true - use y_classes and you can adjust all skins for any player.
thanks i will do it
Reply
#5

I just tested it and it worked, So simple as it is, If a player is new after the Dialog of register you show him the list of skins, And when he do login, You will give him the possiblity of only one skin.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)