Genix
Ученик
1 ларёк находится не далеко от мерии.
2 ларёк находится не далеко автошколы.
Вырезано из : Rezone Rp
Автор вырезки : Genix (Я)
Скрины :
К new
В public OnPlayerPickUpPickup(playerid, pickupid)
В public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
В public OnGameModeInit
Здесь же к объектам
В public OnPlayerCommandText(playerid, cmdtext[])
2 ларёк находится не далеко автошколы.
Вырезано из : Rezone Rp
Автор вырезки : Genix (Я)
Скрины :
К new
PHP:
new ochki[2];
PHP:
else if(pickupid >= ochki[0]&& pickupid <= ochki[1])
{
OnPlayerCommandText(playerid,"/o4kiiethhdbvz4ki");
}
В public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
PHP:
case 25:
{
if(response)
{
switch(listitem)
{
case 0: SetPlayerAttachedObject(playerid,1,19006,2,0.1,0.04,0.0,60.0,85.0,25.0,1.0,1.0,1.0);
case 1: SetPlayerAttachedObject(playerid,1,19007,2,0.1,0.04,0.0,60.0,85.0,25.0,1.0,1.0,1.0);
case 2: SetPlayerAttachedObject(playerid,1,19008,2,0.1,0.04,0.0,60.0,85.0,25.0,1.0,1.0,1.0);
case 3: SetPlayerAttachedObject(playerid,1,19009,2,0.1,0.04,0.0,60.0,85.0,25.0,1.0,1.0,1.0);
case 4: SetPlayerAttachedObject(playerid,1,19010,2,0.1,0.04,0.0,60.0,85.0,25.0,1.0,1.0,1.0);
case 5: SetPlayerAttachedObject(playerid,1,19011,2,0.1,0.04,0.0,60.0,85.0,25.0,1.0,1.0,1.0);
case 6: SetPlayerAttachedObject(playerid,1,19012,2,0.1,0.04,0.0,60.0,85.0,25.0,1.0,1.0,1.0);
case 7: SetPlayerAttachedObject(playerid,1,19013,2,0.1,0.04,0.0,60.0,85.0,25.0,1.0,1.0,1.0);
case 8: SetPlayerAttachedObject(playerid,1,19014,2,0.1,0.04,0.0,60.0,85.0,25.0,1.0,1.0,1.0);
case 9: SetPlayerAttachedObject(playerid,1,19015,2,0.1,0.04,0.0,60.0,85.0,25.0,1.0,1.0,1.0);
case 10: SPD(playerid,26,DIALOG_STYLE_LIST,"Выбирайте:","X-Ray \nЗащитные ( Желтые )\nЗащитные ( Оранжевые ) \nЗащитные ( Красные ) \nЗащитные ( Голубые ) \nЗащитные ( Зеленые ) \nБольшие ( Серые ) \nБольшие ( Голубые ) \nБольшие ( Фиолетовые ) \nБольшие ( Розовые )","Беру","Не надо ");
}
EditAttachedObject(playerid, 1);
PlayerInfo[playerid][pCash] -=1000;
SendMes(playerid, COLOR_WHITE, "Чтобы снять очки используйте /offglasses");
}
return true;
}
case 26:
{
if(response)
{
switch(listitem)
{
case 0: SetPlayerAttachedObject(playerid,1,19016,2,0.1,0.04,0.0,60.0,85.0,25.0,1.0,1.0,1.0);
case 1: SetPlayerAttachedObject(playerid,1,19017,2,0.1,0.04,0.0,60.0,85.0,25.0,1.0,1.0,1.0);
case 2: SetPlayerAttachedObject(playerid,1,19018,2,0.1,0.04,0.0,60.0,85.0,25.0,1.0,1.0,1.0);
case 3: SetPlayerAttachedObject(playerid,1,19019,2,0.1,0.04,0.0,60.0,85.0,25.0,1.0,1.0,1.0);
case 4: SetPlayerAttachedObject(playerid,1,19020,2,0.1,0.04,0.0,60.0,85.0,25.0,1.0,1.0,1.0);
case 5: SetPlayerAttachedObject(playerid,1,19021,2,0.1,0.04,0.0,60.0,85.0,25.0,1.0,1.0,1.0);
case 6: SetPlayerAttachedObject(playerid,1,19022,2,0.1,0.04,0.0,60.0,85.0,25.0,1.0,1.0,1.0);
case 7: SetPlayerAttachedObject(playerid,1,19023,2,0.1,0.04,0.0,60.0,85.0,25.0,1.0,1.0,1.0);
case 8: SetPlayerAttachedObject(playerid,1,19024,2,0.1,0.04,0.0,60.0,85.0,25.0,1.0,1.0,1.0);
case 9: SetPlayerAttachedObject(playerid,1,19025,2,0.1,0.04,0.0,60.0,85.0,25.0,1.0,1.0,1.0);
}
EditAttachedObject(playerid, 1);
PlayerInfo[playerid][pCash] -=1000;
SendMes(playerid, COLOR_WHITE, "Чтобы снять очки используйте /offglasses");
}
return true;
}
В public OnGameModeInit
PHP:
//*************************************** Очки *****************************************
ochki[0] = CreatePickup(1239, 2, 1380.3220,-1771.3235,13.5469, -1); // Очки возле мерии
ochki[1] = CreatePickup(1239, 2, -1994.9685,-55.9520,35.3203, -1); // Очки возле АШ
Здесь же к объектам
PHP:
//************************************* Ларёк с очками ********************************************
CreateDynamicObject(1571, -1993.383789,-55.053462,35.570316, 0.000000,0.000000,-64.600051);
CreateDynamicObject(1569, -1993.109985,-57.111145,34.273681, 0.000000,0.000000,26.399999);
CreateDynamicObject(1571,1378.0531005859,-1771.4603271484,13.727693557739,0,0,91.25);
CreateDynamicObject(3029,1376.5953369141,-1769.6190185547,12.146881103516,0,0,271);
CreateDynamicObject(3038,1377.6135253906,-1771.1845703125,17.204898834229,0,0,0);
CreateDynamicObject(3042,1378.7301025391,-1769.4536132813,14.804007530212,0,0,0);
CreateDynamicObject(2424,1378.7318115234,-1770.8570556641,12.546875,0,0,271.5);
CreateDynamicObject(2424,1378.7686767578,-1771.7836914063,12.546875,0,0,271.49963378906);
CreateDynamicObject(2493,1377.9827880859,-1772.9558105469,13.909892082214,0,0,184);
CreateDynamicObject(2941,1378.7708740234,-1771.3697509766,13.693657875061,0,0,90);
CreateDynamicObject(1720,1378.1209716797,-1771.1062011719,12.546875,0,0,94);
CreateDynamicObject(1215,1378.9790039063,-1773.8021240234,13.111198425293,0,0,0);
CreateDynamicObject(1215,1378.986328125,-1768.8160400391,13.111198425293,0,0,0);
CreateDynamicObject(1215,1378.9527587891,-1767.7944335938,13.111198425293,0,0,0);
В public OnPlayerCommandText(playerid, cmdtext[])
PHP:
if (strcmp("/o4kiiethhdbvz4ki", cmdtext, true, 10) == 0)
{
SPD(playerid,25,DIALOG_STYLE_LIST,"Выбирайте:","Красные \nЖёлтые \nЗеленые \nСиние \nФиолетовые \nГипноз \nСветло-черные \nГлупые \nШахматные \nПрозрачные \nПокажите следующие","Беру","Не надо");
}
if (strcmp("/offglasses",cmdtext,true, 10) == 0)
{
if(IsPlayerAttachedObjectSlotUsed(playerid,1)) RemovePlayerAttachedObject(playerid,1);
return true;
}
Последнее редактирование модератором:
