loading same skin on playerrequestclass
#1

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
        }
Reply
#2

Can you show the code from where the cases are called?
Reply
#3

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...
Reply
#4

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.
Reply
#5

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??
Reply
#6

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 );
    }
Reply
#7

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

Thanks for helping +rep
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)