PDA

View Full Version : Skins don't appear in class selection


Rudey
04/07/2015, 04:22 PM
Hello everyone, how can I make skinds appear in class selection? This is my code:

public OnGameModeInit()
{
// Don't use these lines if it's a filterscript
SetGameModeText("Basic Team Deathmatch");
//----------------|| COPS ||-------------------------
//(skin, Float:x, Float:y, Float:z, Float:Angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo)
AddPlayerClass(280, 1958.33, 1343.12, 15.36, 269.15, 26, 36, 28, 150, 0, 0);
// Homeless
AddPlayerClass(1, 1958.33, 1343.12, 15.36, 269.15, 26, 36, 28, 150, 0, 0);
return 1;
}

public OnGameModeExit()
{
return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
switch(classid)
{
case 0:
{
SetPlayerTeam(playerid, Cops);
GameTextForPlayer(playerid, "~b~Cops", 1000, 3);
}
case 1:
{
SetPlayerTeam(playerid, Homeless);
GameTextForPlayer(playerid, "~r~Homeless", 1000, 3);
}
}
return 1;
}


For some reason, I can only see the game text but not the actual skins. Am I doing it wrong?

fuckingcruse
04/07/2015, 04:30 PM
I didn't see any where you set skin..

Kaliber
04/07/2015, 04:32 PM
Do it like this:

public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746),SetPlayerFacingAngle(playerid,269.15-90.0);
SetPlayerCameraPos(playerid, 1958.3783, 1340.0, 15.3746);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
switch(classid)
{
case 0:
{
SetPlayerTeam(playerid, Cops);
GameTextForPlayer(playerid, "~b~Cops", 1000, 3);
}
case 1:
{
SetPlayerTeam(playerid, Homeless);
GameTextForPlayer(playerid, "~r~Homeless", 1000, 3);
}
}
return 1;
}

Rudey
04/07/2015, 04:33 PM
Well, uh, how can I do that? :D

Kaliber
04/07/2015, 04:36 PM
Well, uh, how can I do that? :D
Just read my post...

AddPlayerClass sets the skin automatically :)

Rudey
04/07/2015, 04:45 PM
I see, my post was accidental as I was referring to fuckingcruse :p

Thank you Kaliber. However, it only shows a part of the skin's "body", do you have any other co-ordinates that could work?