Quote (Lynch)
Из-за любопытсва открыл все оффтопы)))
Вот вам в уменьшеном виде
айда без флуда Добавлено (04.01.2009, 04:42)
---------------------------------------------
готово, только вместо доктора я сделал лекарство и бонус) когда лекарство будете использовать увидете)
[pwn]#include <a_samp>
#define Kurilshig 1
#define ne_Kurilshig 2
/*
==========================
= Проект [FS]Smoke =
= Автор: GhostTT =
= Дата релиза: 4.01.2009 =
= Сделано для www.SAMP-rus.com =
= Играй как было задумано © NVidia =
===========================
*/
new Menu:m;
new Sigaret;
new Sigaret1;
new gTeam[MAX_PLAYERS];
new a5;
new kuril;
forward a1(playerid);
forward a2(playerid);
forward a3(playerid);
forward a4(playerid);
forward a6(playerid);
forward a7(playerid);
forward a9(playerid);
forward a10(playerid);
public OnGameModeInit()
{
kuril = 0;
Sigaret = 0;
AddStaticPickup(1254,19,2437.1860,-1676.6512,13.7063);
m = CreateMenu("Helper",2,50.0, 200.0,200.0,200.0);
if (IsValidMenu(m))
{
SetMenuColumnHeader(m, 0, "CurapeTbl");
AddMenuItem(m, 0, "KENT");
AddMenuItem(m, 1, "43$");
AddMenuItem(m, 0, "Captain Black");
AddMenuItem(m, 1, "72$");
AddMenuItem(m, 0, "Winston");
AddMenuItem(m, 1, "26$");
AddMenuItem(m, 0, "Richmond");
AddMenuItem(m, 1, "53$");
AddMenuItem(m, 0, "PARLIAMENT");
AddMenuItem(m, 1, "52$");
AddMenuItem(m, 0, "NEXT");
AddMenuItem(m, 1, "13$");
AddMenuItem(m, 0, "Chesterfield");
AddMenuItem(m, 1, "27$");
AddMenuItem(m, 0, "Co6paHue");
AddMenuItem(m, 1, "103$");
AddMenuItem(m, 0, "6eLoMoP-kaHaL");
AddMenuItem(m, 1, "10$");
AddMenuItem(m, 0, "npuMa");
AddMenuItem(m, 1, "13$");
AddMenuItem(m, 0, "Lekarstvo");
AddMenuItem(m, 1, "1000$");
}
CreateObject(1571,2437.468,-1679.315,13.832,0.0,0.0,180.000);
CreateObject(3279,1562.638,-1605.412,12.458,0.0,0.0,0.0);
CreateObject(971,1549.566,-1613.406,15.878,0.0,0.0,90.000);
CreateObject(971,1553.968,-1609.016,15.878,0.0,0.0,180.000);
CreateObject(971,1558.355,-1604.666,15.828,0.0,0.0,90.000);
CreateObject(971,1553.968,-1602.413,15.881,0.0,0.0,180.000);
CreateObject(971,1545.192,-1602.438,15.917,0.0,0.0,180.000);
CreateObject(971,1539.743,-1606.832,15.828,0.0,0.0,270.000);
CreateObject(971,1539.734,-1613.325,15.832,0.0,0.0,270.000);
CreateObject(971,1544.160,-1617.688,15.853,0.0,0.0,180.000);
CreateObject(971,1545.155,-1617.720,15.878,0.0,0.0,180.000);
CreateObject(971,1544.174,-1602.446,15.893,0.0,0.0,180.000);
CreateObject(1452,1549.019,-1609.465,13.442,0.0,0.0,-90.000);
CreateObject(1482,1547.800,-1614.347,12.869,0.0,0.0,0.0);
CreateObject(3252,1560.484,-1619.666,12.720,0.0,0.0,0.0);
CreateObject(12921,1553.143,-1612.679,22.591,0.0,0.0,45.000);
CreateObject(14875,1541.102,-1610.388,13.201,0.0,0.0,-270.000);
CreateObject(17039,1572.370,-1611.583,12.384,0.0,0.0,-90.000);
CreateObject(1225,1546.637,-1606.091,12.789,0.0,0.0,0.0);
CreateObject(1225,1546.618,-1606.815,12.789,0.0,0.0,0.0);
CreateObject(1225,1546.008,-1606.443,12.789,0.0,0.0,0.0);
CreateObject(1225,1546.009,-1607.199,12.789,0.0,0.0,0.0);
CreateObject(1225,1546.003,-1605.696,12.789,0.0,0.0,0.0);
CreateObject(1225,1547.270,-1606.438,12.789,0.0,0.0,0.0);
CreateObject(1225,1546.995,-1606.423,13.861,0.0,0.0,0.0);
CreateObject(1225,1546.367,-1606.777,13.878,0.0,0.0,0.0);
CreateObject(1225,1546.389,-1606.071,13.859,0.0,0.0,0.0);
CreateObject(1225,1546.613,-1606.317,14.897,0.0,0.0,0.0);
CreateObject(3267,1560.495,-1619.632,23.651,0.0,0.0,0.0);
CreateObject(3374,1541.672,-1604.408,12.877,0.0,0.0,0.0);
CreateObject(3461,1546.673,-1606.361,17.263,0.0,0.0,0.0);
CreateObject(3472,1554.801,-1627.516,12.552,0.0,0.0,0.0);
CreateObject(3528,1559.985,-1618.613,21.968,0.0,0.0,-225.000);
CreateObject(3877,1572.283,-1612.813,14.049,0.0,0.0,0.0);
CreateObject(16501,1576.709,-1612.946,14.583,-89.381,0.0,0.0);
CreateObject(16501,1576.734,-1614.393,14.583,-89.381,0.0,0.0);
CreateObject(976,1567.885,-1617.425,12.320,0.0,0.0,90.000);
CreateObject(976,1567.927,-1617.401,13.845,0.0,0.0,90.000);
}
public OnPlayerPickUpPickup(playerid,pickupid)
{
ShowMenuForPlayer(Menu:m,playerid);
TogglePlayerControllable(playerid, 0);
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext,"/zakurit",true) == 0)
{
if(Sigaret > 0)
{
TogglePlayerControllable(playerid, 0);
ApplyAnimation(playerid,"SMOKING","M_smkstnd_loop",4.1,0,1,1,1,1);
SetTimer("a1",6000,0);
gTeam[playerid] = Kurilshig;
kuril = 1;
new Float:x1;
new Float:y1;
new Float:z1;
new Float:x2;
new Float:y2;
new Float:z2;
GetPlayerPos(playerid, x1, y1, z1);
x2=x1+0.06;
y2=y1;
z2=14.135;
CreateObject(1485,x2,y2,z2,0.0,0.0,123.750);
AddStaticPickup(1254,19,2437.1860,-1676.6512,13.7063);
}
else
{
SendClientMessage(playerid,0x99FF00AA,"У вас нету сигарет");
}
}
if(strcmp(cmdtext,"/lekar",true) == 0)
{
gTeam[playerid] = ne_Kurilshig;
ApplyAnimation(playerid,"CRACK","crckidle1",4.1,0,1,1,1,1);
SendClientMessage(playerid,0x99FF00AA,"Ждите 5 минут");
SetPlayerPos(playerid,1547.8368,-1613.8872,15.3096);
AddStaticPickup(1254,19,2437.1860,-1676.6512,13.7063);
SetTimer("a9",300000,0);
}
return 1;
}
public a1(playerid)
{
if(gTeam[playerid]==Kurilshig)
{
ApplyAnimation(playerid,"SMOKING","M_smkstnd_loop",4.1,0,1,1,1,1);
SetTimer("a2",6000,0);
}
return 1;
}
public a2(playerid)
{
if(gTeam[playerid]==Kurilshig)
{
ApplyAnimation(playerid,"SMOKING","M_smkstnd_loop",4.1,0,1,1,1,1);
SetTimer("a3",6000,0);
}
return 1;
}
public a3(playerid)
{
if(gTeam[playerid]==Kurilshig)
{
SendClientMessage(playerid,0x99FF00AA,"Вы выкурили сигарету");
SetTimer("a4",420000,0);
SetTimer("a6",60000,0);
DestroyObject(1485);
TogglePlayerControllable(playerid, 1);
}
return 1;
}
public OnPlayerSelectedMenuRow(playerid, row)
{
new Menu:tmpMenu = GetPlayerMenu(playerid);
if(tmpMenu == m)
{
if(row == 0)
{
a5 = GetPlayerMoney(playerid);
if(a5 > 42)
{
GivePlayerMoney(playerid,-43);
SendClientMessage(playerid,0xFFFF00AA,"Вы купили пачку КЕНТa");
SendClientMessage(playerid,0xFFFF00AA,"Введите /zakurit");
ShowMenuForPlayer(m, playerid);
Sigaret1 = Sigaret+10;
Sigaret = Sigaret1;
}
else
{
SendClientMessage(playerid,0xFFFF00AA,"У вас нехватает денег");
SendClientMessage(playerid,0xFFFF00AA,"Введите /zakurit");
ShowMenuForPlayer(m, playerid);
}
return 1;
}
if(row == 1)
{
a5 = GetPlayerMoney(playerid);
if(a5 > 71)
{
GivePlayerMoney(playerid,-72);
SendClientMessage(playerid,0x33AA33AA,"Вы купили пачку Капитанa");
SendClientMessage(playerid,0xFFFF00AA,"Введите /zakurit");
ShowMenuForPlayer(m, playerid);
Sigaret1 = Sigaret+10;
Sigaret = Sigaret1;
}
else
{
SendClientMessage(playerid,0xFFFF00AA,"У вас нехватает денег");
ShowMenuForPlayer(m, playerid);
}
return 1;
}
if(row == 2)
{
a5 = GetPlayerMoney(playerid);
if(a5 > 25)
{
GivePlayerMoney(playerid,-26);
SendClientMessage(playerid,0x33AA33AA,"Вы купили пачку Винстонa");
SendClientMessage(playerid,0xFFFF00AA,"Введите /zakurit");
ShowMenuForPlayer(m, playerid);
Sigaret1 = Sigaret+10;
Sigaret = Sigaret1;
}
else
{
SendClientMessage(playerid,0x33AA33AA,"У вас нехватает денег");
ShowMenuForPlayer(m, playerid);
}
return 1;
}
if(row == 3)
{
a5 = GetPlayerMoney(playerid);
if(a5 > 52)
{
GivePlayerMoney(playerid,-53);
SendClientMessage(playerid,0x33AA33AA,"Вы купили пачку Ричмондa");
SendClientMessage(playerid,0xFFFF00AA,"Введите /zakurit");
ShowMenuForPlayer(m, playerid);
Sigaret1 = Sigaret+10;
Sigaret = Sigaret1;
}
else
{
SendClientMessage(playerid,0x33AA33AA,"У вас нехватает денег");
ShowMenuForPlayer(m, playerid);
}
return 1;
}
if(row == 4)
{
a5 = GetPlayerMoney(playerid);
if(a5 > 51)
{
GivePlayerMoney(playerid,-52);
SendClientMessage(playerid,0xFFFF00AA,"Вы купили пачку Парламентa");
SendClientMessage(playerid,0xFFFF00AA,"Введите /zakurit");
ShowMenuForPlayer(m, playerid);
Sigaret1 = Sigaret+10;
Sigaret = Sigaret1;
}
else
{
SendClientMessage(playerid,0xFFFF00AA,"У вас нехватает денег");
ShowMenuForPlayer(m, playerid);
}
return 1;
}
if(row == 5)
{
a5 = GetPlayerMoney(playerid);
if(a5 > 12)
{
GivePlayerMoney(playerid,-13);
SendClientMessage(playerid,0xFFFFFFAA,"Вы купили пачку Некстa");
SendClientMessage(playerid,0xFFFF00AA,"Введите /zakurit");
ShowMenuForPlayer(m, playerid);
Sigaret1 = Sigaret+10;
Sigaret = Sigaret1;
}
else
{
SendClientMessage(playerid,0xFFFFFFAA,"У вас нехватает денег");
ShowMenuForPlayer(m, playerid);
}
return 1;
}
if(row == 6)
{
a5 = GetPlayerMoney(playerid);
if(a5 > 26)
{
GivePlayerMoney(playerid,-27);
SendClientMessage(playerid,0xFFFF00AA,"Вы купили пачку Честерфилдa");
SendClientMessage(playerid,0xFFFF00AA,"Введите /zakurit");
ShowMenuForPlayer(m, playerid);
Sigaret1 = Sigaret+10;
Sigaret = Sigaret1;
}
else
{
SendClientMessage(playerid,0xFFFF00AA,"У вас нехватает денег");
ShowMenuForPlayer(m, playerid);
}
return 1;
}
if(row == 7)
{
a5 = GetPlayerMoney(playerid);
if(a5 > 102)
{
GivePlayerMoney(playerid,-103);
SendClientMessage(playerid,0xFFFFFFAA,"Вы купили пачку Собрания");
SendClientMessage(playerid,0xFFFF00AA,"Введите /zakurit");
ShowMenuForPlayer(m, playerid);
Sigaret1 = Sigaret+10;
Sigaret = Sigaret1;
}
else
{
SendClientMessage(playerid,0xFFFFFFAA,"У вас нехватает денег");
ShowMenuForPlayer(m, playerid);
}
return 1;
}
if(row == 8)
{
a5 = GetPlayerMoney(playerid);
if(a5 > 9)
{
GivePlayerMoney(playerid,-10);
SendClientMessage(playerid,0xFFFF00AA,"Вы купили пачку Беломорa");
SendClientMessage(playerid,0xFFFF00AA,"Введите /zakurit");
ShowMenuForPlayer(m, playerid);
Sigaret1 = Sigaret+10;
Sigaret = Sigaret1;
}
else
{
SendClientMessage(playerid,0xFFFF00AA,"У вас нехватает денег");
ShowMenuForPlayer(m, playerid);
}
return 1;
}
if(row == 9)
{
a5 = GetPlayerMoney(playerid);
if(a5 > 12)
{
GivePlayerMoney(playerid,-13);
SendClientMessage(playerid,0xFFFF00AA,"Вы купили пачку Примы");
SendClientMessage(playerid,0xFFFF00AA,"Введите /zakurit");
ShowMenuForPlayer(m, playerid);
Sigaret1 = Sigaret+10;
Sigaret = Sigaret1;
}
else
{
SendClientMessage(playerid,0xFFFF00AA,"У вас нехватает денег");
ShowMenuForPlayer(m, playerid);
}
return 1;
}
if(row == 10)
{
a5 = GetPlayerMoney(playerid);
if(a5 > 999)
{
GivePlayerMoney(playerid,-1000);
SendClientMessage(playerid,0xFFFF00AA,"Вы купили противоядие");
SendClientMessage(playerid,0xFFFF00AA,"Чтобы вколоть себе противоядие введите /lekar");
}
else
{
SendClientMessage(playerid,0xFFFF00AA,"У вас нехватает денег");
ShowMenuForPlayer(m, playerid);
}
return 1;
}
}
return 1;
}
public OnPlayerExitedMenu(playerid)
{
new Menu:tmpMenu = GetPlayerMenu(playerid);
HideMenuForPlayer(tmpMenu,playerid);
return TogglePlayerControllable(playerid,true);
}
public a4(playerid)
{
if(gTeam[playerid] == Kurilshig)
{
if(kuril == 0)
{
SendClientMessage(playerid,0x99FF00AA,"Вас тянет курить, если вы не покурите у вас будут отниматься жизни каждые 5 минут");
SendClientMessage(playerid,0x99FF00AA,"Если вы хотите бросить курить, купите лекарство");
ApplyAnimation(playerid,"CRACK","crckidle1",4.1,0,1,1,1,1);
SetTimer("a7",600000,0);
}
}
return 1;
}
public a6(playerid)
{
if(gTeam[playerid] == Kurilshig)
{
kuril = 0;
}
return 1;
}
public a7(playerid)
{
if(gTeam[playerid] == Kurilshig)
{
if(kuril == 0)
{
new Float:health;
GetPlayerHealth(playerid,health);
SetPlayerHealth(playerid,health-20);
}
}
return 1;
}
public a9(playerid)
{
SetTimer("a10",180000,0);
SendClientMessage(playerid,0x99FF00AA,"Ждите еще 3 минуты");
SetPlayerPos(playerid,1572.4323,-1607.7239,13.3828);
ApplyAnimation(playerid,"CRACK","crckidle1",4.1,0,1,1,1,1);
return 1;
}
public a10(playerid)
{
SendClientMessage(playerid,0x99FF00AA,"Вы избавились от зависимости");
SpawnPlayer(playerid);
ApplyAnimation(playerid,"CRACK","crckidle1",4.1,0,1,1,1,1);
return 1;
}[/pwn]
Добавлено (04.01.2009, 04:50)
---------------------------------------------
Магазинчег с сигаретами - на гроув стрите под мостом.
Команды:
/zakurit - вы сам поняли
/lekar - чтобы воспользоваться данной командой вы должны купить лекарство и благодоря ему вы сможете избавится от зависимости.