SA-MP Forums Archive
loading same skin on playerrequestclass - 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: loading same skin on playerrequestclass (/showthread.php?tid=582153)



loading same skin on playerrequestclass - Stereotype - 18.07.2015

Okay so i have like 6-7 classes and each class got like 2-3-4 skins.
The problem is when i scrool through classes is loads same skin for every class

Here is the part of script how i made it,

pawn Код:
switch (classid)
    {
        case 0, 1, 2, 3:
        {
            GameTextForPlayer(playerid, "~red~ HITMAN", 3000, 5);
            SetSpawnInfo(playerid, 0, 163, -2623.9263,1408.1765,7.1016, 269.15, 26, 36, 28, 150, 0, 0 ); // hitman 1
            SetSpawnInfo(playerid, 0, 164, -2623.9263,1408.1765,7.1016, 269.15, 26, 36, 28, 150, 0, 0 ); // hitman 2
            SetSpawnInfo(playerid, 0, 165, -2623.9263,1408.1765,7.1016, 269.15, 26, 36, 28, 150, 0, 0 ); // hitman 3
            SetSpawnInfo(playerid, 0, 294, -2623.9263,1408.1765,7.1016, 269.15, 26, 36, 28, 150, 0, 0 ); // hitman 4
        }
        case 4, 5, 6:
        {
            GameTextForPlayer(playerid, "~red~ MEDIC", 3000, 5);
            SetSpawnInfo(playerid, 0, 70, -2675.0898,631.8127,14.4531, 269.15, 26, 36, 28, 150, 0, 0 ); // medic 1
            SetSpawnInfo(playerid, 0, 71, -2675.0898,631.8127,14.4531, 269.15, 26, 36, 28, 150, 0, 0 ); // medic 2
            SetSpawnInfo(playerid, 0, 193, -2675.0898,631.8127,14.4531, 269.15, 26, 36, 28, 150, 0, 0 ); // medic 3
        }



Re: loading same skin on playerrequestclass - MasterReturnz - 18.07.2015

Can you show the code from where the cases are called?


Re: loading same skin on playerrequestclass - Stereotype - 18.07.2015

pawn Код:
public OnGameModeInit()
{
    AddPlayerClass(163,2296.5662,2451.6270,10.8203,87.8270,0,0,0,0,0,0); // hitman 1
    AddPlayerClass(164,2296.5662,2451.6270,10.8203,87.8270,0,0,0,0,0,0); // hitman 2
    AddPlayerClass(165,2296.5662,2451.6270,10.8203,87.8270,0,0,0,0,0,0); // hitman 3
    AddPlayerClass(294,2296.5662,2451.6270,10.8203,87.8270,0,0,0,0,0,0); // hitman 4
    AddPlayerClass(70,2296.5662,2451.6270,10.8203,87.8270,0,0,0,0,0,0); // medic 1
    AddPlayerClass(71,2296.5662,2451.6270,10.8203,87.8270,0,0,0,0,0,0); // medic 2
    AddPlayerClass(193,2296.5662,2451.6270,10.8203,87.8270,0,0,0,0,0,0); // medic 3

etc...



Re: loading same skin on playerrequestclass - SilentSoul - 18.07.2015

Your code won't work i mean the setspawn part you're just updating them it won't load for each class its special weapons, skin it will automatically select the last spawn info, you should use each case then add your functions.


Re: loading same skin on playerrequestclass - Stereotype - 18.07.2015

Quote:
Originally Posted by SilentSoul
Посмотреть сообщение
Your code won't work i mean the setspawn part you're just updating them it won't load for each class its special weapons, skin it will automatically select the last spawn info, you should use each case then add your functions.
You mean like i need to do every case separated??


Re: loading same skin on playerrequestclass - SilentSoul - 18.07.2015

Quote:
Originally Posted by Stereotype
Посмотреть сообщение
You mean like i need to do every case separated??
Yea! start from case 0, to whatever count your addplayerclass function.

example:
pawn Код:
case 0:
    {
        SetPlayerSkin( playerid, 0 );
        SetSpawnInfo( .. );
        GameTextForPlayer( playerid, "CJ skin", 3000, 3 );
    }
    case 1:
    {
        SetPlayerSkin( playerid, 1 );
        SetSpawnInfo( .. );
        GameTextForPlayer( playerid, "etc", 3000, 3 );
    }



Re: loading same skin on playerrequestclass - Stereotype - 18.07.2015

Yah, done... Took me some time but.. lol

Thanks for helping +rep