Дабы некто не писал в Вопрос|Ответ по этой теме, напишу здесь... В gamemodeInit
В верх:
[pwn]new Menu:m;[/pwn]
В [pwn]public OnGameModeInit()[/pwn]
Вставляем
[pwn]
m = CreateMenu("Licenses Menu", 1, 50.0, 180.0, 200.0, 200.0);
if (IsValidMenu(m))
{
SetMenuColumnHeader(m, 0, "Licenses Menu");
AddMenuItem(m, 0, "Auto");
AddMenuItem(m, 0, "Fishing");
AddMenuItem(m, 0, "Avio");
AddMenuItem(m, 0, "weapon");
}
}
public OnGameModeExit()
{
if(IsValidMenu(m))
DestroyMenu(m);
CreateObject(1257,723.287,-1430.396,13.803,0.0,0.0,90.000);
CreateObject(1315,711.733,-1416.430,15.572,0.0,0.0,0.0);
CreateObject(16778,709.033,-1439.602,16.636,0.0,0.0,-78.750);
CreateObject(1426,705.362,-1440.204,12.731,0.0,0.0,0.0);
CreateObject(1363,719.814,-1430.763,13.335,0.0,0.0,0.0);
CreateObject(910,722.844,-1440.034,13.783,0.0,0.0,-180.000);
CreateObject(967,714.931,-1420.135,12.523,0.0,0.0,-90.000);
CreateObject(997,700.374,-1441.979,12.640,0.0,0.0,-90.000);
CreateObject(997,696.106,-1446.023,12.532,0.0,0.0,0.0);
CreateObject(997,743.616,-1445.634,12.564,0.0,0.0,0.0);
CreateObject(4100,766.178,-1425.737,14.210,0.0,0.0,-40.625);
CreateObject(4100,780.310,-1442.757,14.199,0.0,0.0,47.578);
CreateObject(996,767.693,-1450.193,13.164,0.0,0.0,-96.093);
CreateObject(994,688.925,-1434.936,13.740,0.0,0.0,0.0);
CreateObject(1247,725.465,-1439.599,12.744,0.0,0.0,0.0);
new Lic == AddStaticPickup(1247, 2, 725.465,-1439.599,12.744);
SetPlayerMapIcon (playerid, 12, 725.465,-1439.599,12.744, 52, 0);
[/pwn]
[pwn]
public OnPlayerSelectedMenuRow(playerid, row)
{
new Menu:tmpMenu = GetPlayerMenu(playerid);
if(tmpMenu == m)
{
if(row == 0)
{
GivePlayerMoney(playerid,-2000);
PlayerInfo[giveplayerid][pCarLic] = 1;
SendClientMessage(playerid,Yellow," Вы купили права на авто за 2000$!");
ShowMenuForPlayer(m, playerid);
return 1;
}
if(row == 1)
{
GivePlayerMoney(playerid,-3000);
PlayerInfo[giveplayerid][pFishLic] = 1;
SendClientMessage(playerid,Yellow," Вы купили права на ловлю рыбы за 3000$!");
ShowMenuForPlayer(m, playerid);
return 1;
}
if(row == 2)
{
GivePlayerMoney(playerid,-6000);
PlayerInfo[giveplayerid][pFlyLic] = 1;
SendClientMessage(playerid,Yellow," Вы купили права на полет за 6000$!");
ShowMenuForPlayer(m, playerid);
return 1;
}
if(row == 3)
{
GivePlayerMoney(playerid,-10000);
PlayerInfo[giveplayerid][pGunLic] = 1;
SendClientMessage(playerid,Yellow," Вы купили права на оружие за 10000$!");
ShowMenuForPlayer(m, playerid);
return 1;
}
ShowMenuForPlayer(m, playerid);
return 1;
}
return 0;
}
[/pwn]
Дальше
[pwn]
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == Lic)
{
ShowMenuForPlayer(m, playerid);
}
return 1;
}
[/pwn]
Итог: красиваое место с меньшкой покупки лицензий.