Quote:
Originally Posted by ******
1) y_classes doesn't work in 4.0.
|
I figured after playing a little bit with your includes.
I have reverted to using YSI 3.1
Quote:
Originally Posted by ******
2) Fair play on getting the whole of YSI included but I suspect you didn't need it.
|
Yeah, I thought I would try just in case some of the errors I was getting was caused by something that wasn't included.
I am no longer running all of YSI (See below)
Quote:
Originally Posted by ******
3) "Command_AddAlt" for alternate names.
|
I havn't had time to try this yet, but had a quick search and I think using Command_AddAltNamed would make it easier as I don't know what any of the IDs would be.
Quote:
Originally Posted by ******
4) I've had a look in the include, and I'm not actually sure why you are only getting three classes. I know where they come from, since y_classes uses three internally and translates them, but you should never see that. Have you tried moving the include up perhaps so it isn't last? Otherwise, I may need to see your mode (privately if you want).
|
Tried moving the include just below <fixes> still no luck.
I am no longer using all of YSI just y_commands. I am now using the code:
OnGameModeInt
pawn Код:
//AddPlayerClass
for(new i=22; i<300; i++)
{
if(IsInvalidSkin(i)) continue;
AddPlayerClass(i, 0.0, 0.0, 4.0, 0.0, -1, -1, -1, -1, -1, -1);
}
OnPlayerRequestClass
pawn Код:
printf("%i, %i", Player[playerid][Skin], classid); // This outputs as it should.
if(Player[playerid][Skin] > -1) SetSpawnInfo( playerid, 0, Player[playerid][Skin], 1958.33, 1343.12, 15.36, 269.15, 26, 36, 28, 150, 0, 0 ); //Class_Goto(playerid, SkinIDs[Player[playerid][Skin]]);
and at the end of OnPlayerConnect (After user data is loaded/not loaded) OnPlayerRequestClass(playerid, 0);
It is all working as it should and as I want.
I would like to use y_classes but cannot figure out what the problem is. I had a quick look through y_classes coudln't see anything obvious.
I also changed in y_classes (#define MAX_CLASSES (300)) to see if that was my problem as i found not all skins were being added and there were a lot of -1s being added to SkinIDs[]. once I changed it i tried again and still same thing.
I tried with 4 skins, but still cuts out the 4th skin.
I'll leave it how it is until I see an update for y_classes and then try again.
EDIT:
Are there still invalid skin ids? I read somewhere that there isnt.
Console output of the printf(..)
Код:
[13:30:53] -1, 3
[13:30:53] -1, 2
[13:30:53] -1, 1
[13:30:53] -1, 0
[13:30:54] -1, 242
[13:30:54] -1, 241
[13:30:54] -1, 240