13:23
ОбновитьСмайлыУправление мини-чатом
МИНИ-ЧАТ
Главная страница!

 



 
          





Рекомендуем:





Последние Файлы GTA 4 Последние Файлы GTA-MP Реклама
Скрипт GTA 4 элементы Watch... 07.09.2014
Ferrari 360 Spider [EPM con... 13.12.2013
Porsche Cayenne Turbo 2012 ... 13.12.2013
Shelby Terlingua Mustang v1... 13.12.2013
Hamann Lamborghini Gallardo... 27.10.2013
[GM] The Big PEN1:LS v2.00 ... 04.12.2017
Dgun (AvnanceRP,SampRP,Dimo... 19.03.2016
SAMP скрипт SX Events (MySQ... 03.03.2016
Карта ASL мэрия для SAMP се... 03.03.2016
AIM для SA-MP 0.3.7 22.02.2016
  • Страница 1 из 1
  • 1
Модератор форума: Alcoholik  
[FS] Laser Pointer
colderpilotДата: Суббота, 05.03.2011, 13:25 | Сообщение # 1
Группа: Продвинутые
Сообщений: 720
Награды: 3
Город: Moscow
Репутация: 331
Замечания: 80%
Статус:
Просто скрипт который добавляет по команде лазер к оружию. Только для 0.3c
Скрин:
Тык
Команды:
/laseron - Включить лазер
/laseroff - Выключить лазер
/lasercol [color] - Установить цвет для лазера: red (стандартный), green, yellow, blue, pink, orange.

red - Красный
green - Зеленый
yellow - желтый
blue - голубой
pink - розовый
orange - оранжевый

PWN:

Quote
#include <a_samp>

//----------------------------------------------------------------------------//

public OnFilterScriptInit() {
print("\n-- Laser Pointer by Skiaffo --\n");
new p = GetMaxPlayers();
for (new i=0; i < p; i++) {
SetPVarInt(i, "laser", 0);
SetPVarInt(i, "color", 18643);
}
return 1;
}

public OnFilterScriptExit() {
new p = GetMaxPlayers();
for (new i=0; i < p; i++) {
SetPVarInt(i, "laser", 0);
RemovePlayerAttachedObject(i, 0);
}
return 1;
}

//----------------------------------------------------------------------------//

public OnPlayerConnect(playerid) {
SetPVarInt(playerid, "laser", 0);
SetPVarInt(playerid, "color", 18643);
return 1;
}

public OnPlayerDisconnect(playerid) {
SetPVarInt(playerid, "laser", 0);
RemovePlayerAttachedObject(playerid, 0);
return 1;
}

//----------------------------------------------------------------------------//

public OnPlayerCommandText(playerid, cmdtext[]) {

new cmd[256];
new idx;
cmd = strtok(cmdtext, idx);

if (!strcmp("/laseron", cmdtext, true)) {
SetPVarInt(playerid, "laser", 1);
SetPVarInt(playerid, "color", GetPVarInt(playerid, "color"));
return 1;
}

if (!strcmp("/laseroff", cmdtext, true)) {
SetPVarInt(playerid, "laser", 0);
RemovePlayerAttachedObject(playerid, 0);
return 1;
}

if (!strcmp("/lasercol", cmd, true)) {
new tmp[256];
tmp = strtok(cmdtext, idx);
if (!strlen(tmp)) {
SendClientMessage(playerid, 0x00E800FF, "Usage: /lasercol [color]");
return 1;
}
if (!strcmp(tmp, "red", true)) SetPVarInt(playerid, "color", 18643);
else if (!strcmp(tmp, "blue", true)) SetPVarInt(playerid, "color", 19080);
else if (!strcmp(tmp, "pink", true)) SetPVarInt(playerid, "color", 19081);
else if (!strcmp(tmp, "orange", true)) SetPVarInt(playerid, "color", 19082);
else if (!strcmp(tmp, "green", true)) SetPVarInt(playerid, "color", 19083);
else if (!strcmp(tmp, "yellow", true)) SetPVarInt(playerid, "color", 19084);
else SendClientMessage(playerid, 0x00E800FF, "Colour not available!");
return 1;
}

return 0;
}

public OnPlayerUpdate(playerid) {
if (GetPVarInt(playerid, "laser")) {
RemovePlayerAttachedObject(playerid, 0);
if ((IsPlayerInAnyVehicle(playerid)) || (IsPlayerInWater(playerid))) return 1;
switch (GetPlayerWeapon(playerid)) {
case 23: {
if (IsPlayerAiming(playerid)) {
if (GetPlayerSpecialAction(playerid) != SPECIAL_ACTION_DUCK) {
SetPlayerAttachedObject(playerid, 0, GetPVarInt(playerid, "color"), 6, // SP standing aiming
0.108249, 0.030232, 0.118051, 1.468254, 350.512573, 364.284240);
} else {
SetPlayerAttachedObject(playerid, 0, GetPVarInt(playerid, "color"), 6, // SP crouched aiming
0.108249, 0.030232, 0.118051, 1.468254, 349.862579, 364.784240);
}
} else {
if (GetPlayerSpecialAction(playerid) != SPECIAL_ACTION_DUCK) {
SetPlayerAttachedObject(playerid, 0, GetPVarInt(playerid, "color"), 6, // SP standing not aiming
0.078248, 0.027239, 0.113051, -11.131746, 350.602722, 362.384216);
} else {
SetPlayerAttachedObject(playerid, 0, GetPVarInt(playerid, "color"), 6, // SP crouched not aiming
0.078248, 0.027239, 0.113051, -11.131746, 350.602722, 362.384216);
} } }
case 27: {
if (IsPlayerAiming(playerid)) {
if (GetPlayerSpecialAction(playerid) != SPECIAL_ACTION_DUCK) {
SetPlayerAttachedObject(playerid, 0, GetPVarInt(playerid, "color"), 6, // SPAS standing aiming
0.588246, -0.022766, 0.138052, -11.531745, 347.712585, 352.784271);
} else {
SetPlayerAttachedObject(playerid, 0, GetPVarInt(playerid, "color"), 6, // SPAS crouched aiming
0.588246, -0.022766, 0.138052, 1.468254, 350.712585, 352.784271);
}
} else {
if (GetPlayerSpecialAction(playerid) != SPECIAL_ACTION_DUCK) {
SetPlayerAttachedObject(playerid, 0, GetPVarInt(playerid, "color"), 6, // SPAS standing not aiming
0.563249, -0.01976, 0.134051, -11.131746, 351.602722, 351.384216);
} else {
SetPlayerAttachedObject(playerid, 0, GetPVarInt(playerid, "color"), 6, // SPAS crouched not aiming
0.563249, -0.01976, 0.134051, -11.131746, 351.602722, 351.384216);
} } }
case 30: {
if (IsPlayerAiming(playerid)) {
if (GetPlayerSpecialAction(playerid) != SPECIAL_ACTION_DUCK) {
SetPlayerAttachedObject(playerid, 0, GetPVarInt(playerid, "color"), 6, // AK standing aiming
0.628249, -0.027766, 0.078052, -6.621746, 352.552642, 355.084289);
} else {
SetPlayerAttachedObject(playerid, 0, GetPVarInt(playerid, "color"), 6, // AK crouched aiming
0.628249, -0.027766, 0.078052, -1.621746, 356.202667, 355.084289);
}
} else {
if (GetPlayerSpecialAction(playerid) != SPECIAL_ACTION_DUCK) {
SetPlayerAttachedObject(playerid, 0, GetPVarInt(playerid, "color"), 6, // AK standing not aiming
0.663249, -0.02976, 0.080051, -11.131746, 358.302734, 353.384216);
} else {
SetPlayerAttachedObject(playerid, 0, GetPVarInt(playerid, "color"), 6, // AK crouched not aiming
0.663249, -0.02976, 0.080051, -11.131746, 358.302734, 353.384216);
} } }
case 31: {
if (IsPlayerAiming(playerid)) {
if (GetPlayerSpecialAction(playerid) != SPECIAL_ACTION_DUCK) {
SetPlayerAttachedObject(playerid, 0, GetPVarInt(playerid, "color"), 6, // M4 standing aiming
0.528249, -0.020266, 0.068052, -6.621746, 352.552642, 355.084289);
} else {
SetPlayerAttachedObject(playerid, 0, GetPVarInt(playerid, "color"), 6, // M4 crouched aiming
0.528249, -0.020266, 0.068052, -1.621746, 356.202667, 355.084289);
}
} else {
if (GetPlayerSpecialAction(playerid) != SPECIAL_ACTION_DUCK) {
SetPlayerAttachedObject(playerid, 0, GetPVarInt(playerid, "color"), 6, // M4 standing not aiming
0.503249, -0.02376, 0.065051, -11.131746, 357.302734, 354.484222);
} else {
SetPlayerAttachedObject(playerid, 0, GetPVarInt(playerid, "color"), 6, // M4 crouched not aiming
0.503249, -0.02376, 0.065051, -11.131746, 357.302734, 354.484222);
} } }
case 34: {
if (IsPlayerAiming(playerid)) {
/*if (GetPlayerSpecialAction(playerid) != SPECIAL_ACTION_DUCK) {
SetPlayerAttachedObject(playerid, 0, GetPVarInt(playerid, "color"), 6, // Sniper standing aiming
0.528249, -0.020266, 0.068052, -6.621746, 352.552642, 355.084289);
} else {
SetPlayerAttachedObject(playerid, 0, GetPVarInt(playerid, "color"), 6, // Sniper crouched aiming
0.528249, -0.020266, 0.068052, -1.621746, 356.202667, 355.084289);
}*/
return 1;
} else {
if (GetPlayerSpecialAction(playerid) != SPECIAL_ACTION_DUCK) {
SetPlayerAttachedObject(playerid, 0, GetPVarInt(playerid, "color"), 6, // Sniper standing not aiming
0.658248, -0.03276, 0.133051, -11.631746, 355.302673, 353.584259);
} else {
SetPlayerAttachedObject(playerid, 0, GetPVarInt(playerid, "color"), 6, // Sniper crouched not aiming
0.658248, -0.03276, 0.133051, -11.631746, 355.302673, 353.584259);
} } }
case 29: {
if (IsPlayerAiming(playerid)) {
if (GetPlayerSpecialAction(playerid) != SPECIAL_ACTION_DUCK) {
SetPlayerAttachedObject(playerid, 0, GetPVarInt(playerid, "color"), 6, // MP5 standing aiming
0.298249, -0.02776, 0.158052, -11.631746, 359.302673, 357.584259);
} else {
SetPlayerAttachedObject(playerid, 0, GetPVarInt(playerid, "color"), 6, // MP5 crouched aiming
0.298249, -0.02776, 0.158052, 8.368253, 358.302673, 352.584259);
}
} else {
if (GetPlayerSpecialAction(playerid) != SPECIAL_ACTION_DUCK) {
SetPlayerAttachedObject(playerid, 0, GetPVarInt(playerid, "color"), 6, // MP5 standing not aiming
0.293249, -0.027759, 0.195051, -12.131746, 354.302734, 352.484222);
} else {
SetPlayerAttachedObject(playerid, 0, GetPVarInt(playerid, "color"), 6, // MP5 crouched not aiming
0.293249, -0.027759, 0.195051, -12.131746, 354.302734, 352.484222);
} } } } }
return 1;
}

stock IsPlayerInWater(playerid) {
new anim = GetPlayerAnimationIndex(playerid);
if (((anim >= 1538) && (anim <= 1542)) || (anim == 1544) || (anim == 1250) || (anim == 1062)) return 1;
return 0;
}

stock IsPlayerAiming(playerid) {
new anim = GetPlayerAnimationIndex(playerid);
if (((anim >= 1160) && (anim <= 1163)) || (anim == 1167) || (anim == 1365) ||
(anim == 1643) || (anim == 1453) || (anim == 220)) return 1;
return 0;
}

//----------------------------------------------------------------------------//

strtok(const string[], &index)
{
new length = strlen(string);
while ((index < length) && (string[index] <= ' '))
{
index++;
}

new offset = index;
new result[20];
while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
{
result[index - offset] = string[index];
index++;
}
result[index - offset] = EOS;
return result;
}

//----------------------------------------------------------------------------//


Автор: Skiaffo

Добавлено (05.03.2011, 13:25)
---------------------------------------------
PWN: http://rghost.ru/4634634
AMX: http://rghost.ru/4634640


ваще найс гель

Сообщение отредактировал colderpilot - Суббота, 05.03.2011, 13:23
PustikДата: Суббота, 05.03.2011, 13:43 | Сообщение # 2
Группа: I'm V.I.P.
Сообщений: 1669
Награды: 129
Город: Кривой Рог
Репутация: 939
Замечания: 60%
Статус:
Лазеры все видят?И на сколько он светит?
colderpilotДата: Суббота, 05.03.2011, 14:05 | Сообщение # 3
Группа: Продвинутые
Сообщений: 720
Награды: 3
Город: Moscow
Репутация: 331
Замечания: 80%
Статус:
Quote (Pustik)
Лазеры все видят?И на сколько он светит?

Все. Ну по идее лазер это как обьект я хз честно



ваще найс гель
ApecДата: Суббота, 05.03.2011, 15:35 | Сообщение # 4
Группа: Mappers
Сообщений: 1307
Награды: 29
Город: Минск
Репутация: 1922
Замечания: 0%
Статус:
Это объект к оружию крепится.
Хороший FS хатя и простой.
Но цвета не очень удобно прописывать, лучше сделать на русском или по цифрам.



Kirill_ShvaryovДата: Суббота, 05.03.2011, 20:38 | Сообщение # 5
Уважаемый человек
Группа: I'm V.I.P.
Сообщений: 845
Награды: 46
Город: Novorossiysk
Репутация: 1036
Замечания: 0%
Статус:
Как прицел использовать норм его, он вроде к АК47, боевому дробовику,снайперке и м4 крепится больше по крайней мере не замечал..)


Мои работы :
Дополнительный город SA
Заправка около Чиллиада
Тропический остров
Парк развлечений
Стадион
Спортивный комплекс
Мото-фристайл(инт)
Мотосалон (0.3e)
GTA S.A.City


[url=http://www.radikal.ru]

Закажи карту на : gtamap-studio.ru
ApecДата: Суббота, 05.03.2011, 21:17 | Сообщение # 6
Группа: Mappers
Сообщений: 1307
Награды: 29
Город: Минск
Репутация: 1922
Замечания: 0%
Статус:
Вот только когда со снапы целишься он пропадает
Ещё к мп5 крепится



colderpilotДата: Суббота, 05.03.2011, 21:26 | Сообщение # 7
Группа: Продвинутые
Сообщений: 720
Награды: 3
Город: Moscow
Репутация: 331
Замечания: 80%
Статус:
Quote (Apec)
Вот только когда со снапы целишься он пропадает
Ещё к мп5 крепится

Для снапы лазер не нужен я поленился убрать.

Не гони что неудобно) все удобно если англ знать


ваще найс гель
ApecДата: Суббота, 05.03.2011, 21:28 | Сообщение # 8
Группа: Mappers
Сообщений: 1307
Награды: 29
Город: Минск
Репутация: 1922
Замечания: 0%
Статус:
blush2 мой анл. на плохом уровне
да и долго писать
удобнее
/lazer 1,2,3



Lil_SoulДата: Пятница, 04.11.2011, 20:47 | Сообщение # 9
Новенький
Группа: Пользователи
Сообщений: 10
Награды: 0
Город: Санкт-Петербруг
Репутация: 0
Замечания: 0%
Статус:
у меня не идет, все норм сделал
в чем проблема не знаете?

ChamapДата: Пятница, 04.11.2011, 21:20 | Сообщение # 10
Освоившийся
Группа: Продвинутые
Сообщений: 118
Награды: 13
Город: Москва
Замечания: 100%
Статус:
Круто. Я поставил себе нормально. Только есть и баг)


Официальный сайт UMX RolePlay

Официальный сайт Cream Life RP

ХасанДата: Пятница, 04.11.2011, 22:39 | Сообщение # 11
Группа: Модераторы
Сообщений: 2816
Награды: 388
Город: X-Files
Репутация: 2965
Замечания: 0%
Статус:
Quote (Lil_Soul)
у меня не идет, все норм сделал
в чем проблема не знаете?

1)переведи ФС в мод
2)посмотреть может совпадать ИДЫ диалога

Quote (Chamap)
Только есть и баг)

Уважаемый всё в наших силах исправить его :)



малі діти недають нам спати - великі діти недають нам жити © Iван Миколайчук

— Вот ты говорил, город — сила, а здесь слабые все.
— Город — это злая сила. Сильный приезжает — становится слабым. Город забирает силу. Вот и ты пропал…© Брат

— ...лягушки падают с неба
— Видимо у них не раскрылись парашюты. © X-Files

— Разве вы не хотели бы жить вечно?
— Если в моде останутся штаны со стрелками то нет.© X-Files

Ибо таковые лжеапостолы, лукавые делатели, принимают вид Апостолов Христовых. И неудивительно: потому что сам сатана принимает вид Ангела света, а потому не великое дело, если и служители его принимают вид служителей правды; но конец их будет по делам их.
(2Кор 11:13-15).
  • Страница 1 из 1
  • 1
Поиск:





 


 


 
Хостинг от uCoz samp.at.ua