13.07.2018, 19:59
Нашел оптимальный вариант.
PHP Code:
// OnGameModeInit
// Selection
//male
AddPlayerClass(230, 0,0,0,0, 0,0,0,0,0,0);
AddPlayerClass(212, 0,0,0,0, 0,0,0,0,0,0);
AddPlayerClass(200, 0,0,0,0, 0,0,0,0,0,0);
//female
AddPlayerClass(39, 0,0,0,0, 0,0,0,0,0,0);
AddPlayerClass(54, 0,0,0,0, 0,0,0,0,0,0);
AddPlayerClass(77, 0,0,0,0, 0,0,0,0,0,0);
PHP Code:
// Диалог
if(!response) return SetPVarInt(playerid, "Gender", 2), TogglePlayerSpectating(playerid, 0); //female
SetPVarInt(playerid, "Gender", 1); // male
TogglePlayerSpectating(playerid, 0);
PHP Code:
// OnPlayerRequestClass
if(GetPVarInt(playerid, "Gender") == 1){
switch(classid){
case 0: SetPlayerSkin(playerid, 230);
case 1: SetPlayerSkin(playerid, 212);
case 2: SetPlayerSkin(playerid, 200);
case 3: SetPlayerSkin(playerid, 230);
case 4: SetPlayerSkin(playerid, 212);
case 5: SetPlayerSkin(playerid, 200);
}
} else if(GetPVarInt(playerid, "Gender") == 2){
switch(classid){
case 0: SetPlayerSkin(playerid, 39);
case 1: SetPlayerSkin(playerid, 54);
case 2: SetPlayerSkin(playerid, 77);
case 3: SetPlayerSkin(playerid, 39);
case 4: SetPlayerSkin(playerid, 54);
case 5: SetPlayerSkin(playerid, 77);
}
}