AddPlayerClass
#1

I was offline for about 7 months and I need help using AddPlayerClass.

I added all skins but when I need to change skin on player spawn I can't. I press arrows on screen but nothing.

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerPos(playerid, 2524.504882, -1676.879760, 19.930225);
    SetPlayerFacingAngle(playerid, 270);
    SetPlayerCameraLookAt(playerid, 2524.504882, -1676.879760, 19.930225);
    SetPlayerCameraPos(playerid, 2524.504882 + (5 * floatsin(-270, degrees)), -1676.879760 + (5 * floatcos(-270, degrees)), 19.930225);
    SetSpawnInfo( playerid, 0, 0, 1545.2649, -1675.5452, 13.5600, 90, 26, 36, 28, 150, 0, 0 );
    return 1;
}
pawn Код:
public OnGameModeInit()
{
    SetGameModeText("Gamemode");
    for(new i=0; i<300; i++)
    {
        if(i != 74) AddPlayerClass(i, 2524.504882, -1676.879760, 19.930225, 270, 0, 0, 0, 0, 0, 0);
    }
    return 1;
}
Reply
#2

I think you should delete this if(i != 74)
Reply
#3

Already tried. Same thing.
Reply
#4

Is there onplayerrequestspawn same skins?
Reply
#5

pawn Код:
public OnPlayerRequestSpawn(playerid)
{
    return 1;
}
Reply
#6

pawn Код:
public OnGameModeInit()
{
    SetGameModeText("Gamemode");
    for(new i=0; i<300; i++)
    {
        AddPlayerClass(i, 2524.504882, -1676.879760, 19.930225, 270, 0, 0, 0, 0, 0, 0);
        AddPlayerClass(i, 2524.504882, -1676.879760, 19.930225, 271, 0, 0, 0, 0, 0, 0);

    }
    return 1;
}
maybe this ?
Reply
#7

What's the point of that?
Reply
#8

we dont use if(i != 74) this in addplayerclass
Reply
#9

We do because 74 is invalid skin. Go check in Skin List.
Reply
#10

Quote:
Originally Posted by Xoomer
Посмотреть сообщение
we dont use if(i != 74) this in addplayerclass
You should. Skin id 74 is not valid.

The problem is probably in OnPlayerRequestClass. And try with arrows from the keyboard. Does it change the skins?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)