new Menu:gender; В public SetPlayerSpawn(playerid)
if(PlayerInfo[playerid][pTut] == 0)
{
gOoc[playerid] = 1; gNews[playerid] = 1; gFam[playerid] = 1;
TogglePlayerControllable(playerid, 0);
RegistrationStep[playerid] = 1;
SendClientMessage(playerid, COLOR_LIGHTBLUE, " Для игры на нашем сервере вам понадобится руссификатор SL!");
ShowMenuForPlayer(gender, playerid); //Открытие менюшки
}
В public OnPlayerSelectedMenuRow(playerid, row)
new Menu:current;
current = GetPlayerMenu(playerid);
if(current == gender)
{
switch(row)
{
case 0:
{
PlayerInfo[playerid][pSex] = 1;
SendClientMessage(playerid, COLOR_YELLOW2, " Хорошо, вы парень ");
RegistrationStep[playerid] = 2;
return 0;
}
case 1:
{
PlayerInfo[playerid][pSex] = 2;
SendClientMessage(playerid, COLOR_YELLOW2, " Хорошо, вы девушка ");
RegistrationStep[playerid] = 2;
return 0;
}
}
}
В public OnGameModeInit()
gender = CreateMenu("KЏO BЁ?", 1, 50.0, 180.0, 200.0, 200.0);//Кто вы?
AddMenuItem(gender, 0, "ЊAPEH’");//Парень
AddMenuItem(gender, 0, "ѓEBYЋKA");//Девушка
В if((strcmp("Парень", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("Парень")))
и else if((strcmp("Девушка", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("Девушка")))
HideMenuForPlayer(gender, playerid);// Закрытие менюшки