gf Создание дополнительной мигалки
admin Дата: Понедельник, 31.01.2011, 12:46:28 | Сообщение # 1
Группа: Администраторы
Сообщений: 3869
Начнём: В new вставляем Code
new IsSpu[MAX_VEHICLES] = 0; new Lamp[MAX_VEHICLES] = 0; new light[MAX_VEHICLES]; new light2[MAX_VEHICLES];
Далее в OnPlayerCommandText вставляем Code
if (strcmp("/spu", cmdtext, true) == 0) { if(IsPlayerConnected(playerid)) { if(IsACop(playerid)) { if( PlayerInfo[playerid][pMember] == 1 && PlayerInfo[playerid][pRank] != 11 && PlayerInfo[playerid][pRank] != 12) { SendClientMessage(playerid, COLOR_GREY, " Вы не уполномочены использовать эту команду!"); return 1; } if( PlayerInfo[playerid][pMember] == 2 && PlayerInfo[playerid][pRank] != 5 && PlayerInfo[playerid][pRank] != 7 && PlayerInfo[playerid][pRank] != 9 && PlayerInfo[playerid][pRank] != 11 && PlayerInfo[playerid][pRank] != 12) { SendClientMessage(playerid, COLOR_GREY, " Вы не уполномочены использовать эту команду!"); return 1; } if(gOnDuty[playerid] != 1) { SendClientMessage(playerid, COLOR_GREY, " Вы не при исполнении служебных обязанностей !"); return 1; } if(IsACop(playerid)) ShowPlayerDialog(playerid, 1123, DIALOG_STYLE_LIST, "So you want to have a SPU, what one do you want then?", "Sultan [dashboard]\nSultan [roof]\nCheetah [dashboard]\nCheetah [roof]\nWashington [dashboard]\nWashington [roof]\nPremier [dashboard]\nPremier [roof]\nHuntley [dashboard]\nHuntley [roof]\nMore", "Take it", "Leave it" ); } else SendClientMessage(playerid, COLOR_GREY, " Вы не уполномочены использовать эту команду!"); } return 1; } if (strcmp("/destroyspu", cmdtext, true) == 0) { if(IsPlayerConnected(playerid)) { new vid = GetPlayerVehicleID(playerid); if(IsSpu[vid] > 0) { IsSpu[vid] = 0; if(Lamp[vid] == 1) { DestroyObject(light[vid]); Lamp[vid] = 0; } DestroyVehicle(vid); return 1; } else { SendClientMessage(playerid, COLOR_RED, "This is not a SPU vehicle."); } } return 1; }
Дальше вставляем в public OnDialogResponse следующие строки: Code
if(response == 1 && dialogid == 1123) { switch(listitem) { case 0: {//sultan lamp inside new Float:x, Float:y, Float:z, Float:angle; GetPlayerPos(playerid, x, y, z); GetPlayerFacingAngle(playerid, angle); new vehicleid=CreateVehicle(560, x, y, z, angle, 0, 0, -1); PutPlayerInVehicle(playerid, vehicleid, 0); SetVehicleVirtualWorld(vehicleid, GetPlayerVirtualWorld(playerid)); LinkVehicleToInterior(vehicleid, GetPlayerInterior(playerid)); IsSpu[vehicleid] = 1; Lamp[vehicleid] = 1; light[vehicleid] = CreateObject(18646,x, y, z, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vehicleid], vehicleid, 0.398071289, 0.75390625, 0.43879509, 0.0, 0.0, 0.0); } case 1: {//sultan lamp outside new Float:x, Float:y, Float:z, Float:angle; GetPlayerPos(playerid, x, y, z); GetPlayerFacingAngle(playerid, angle); new vehicleid=CreateVehicle(560, x, y, z, angle, 0, 0, -1); PutPlayerInVehicle(playerid, vehicleid, 0); SetVehicleVirtualWorld(vehicleid, GetPlayerVirtualWorld(playerid)); LinkVehicleToInterior(vehicleid, GetPlayerInterior(playerid)); IsSpu[vehicleid] = 2; Lamp[vehicleid] = 1; light[vehicleid] = CreateObject(18646,x, y, z, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vehicleid], vehicleid, -0.35644531250, 0.0388183593, 0.863788605, 0.0, 0.0, 0.0); } case 2: {//cheetah lamp inside new Float:x, Float:y, Float:z, Float:angle; GetPlayerPos(playerid, x, y, z); GetPlayerFacingAngle(playerid, angle); new vehicleid=CreateVehicle(415, x, y, z, angle, 0, 0, -1); PutPlayerInVehicle(playerid, vehicleid, 0); SetVehicleVirtualWorld(vehicleid, GetPlayerVirtualWorld(playerid)); LinkVehicleToInterior(vehicleid, GetPlayerInterior(playerid)); IsSpu[vehicleid] = 3; Lamp[vehicleid] = 1; light[vehicleid] = CreateObject(18646,x, y, z, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vehicleid], vehicleid, 0.409729004, 0.526367188, 0.206963539, 0.0, 0.0, 0.0); } case 3: {//cheetah lamp outside new Float:x, Float:y, Float:z, Float:angle; GetPlayerPos(playerid, x, y, z); GetPlayerFacingAngle(playerid, angle); new vehicleid=CreateVehicle(415, x, y, z, angle, 0, 0, -1); PutPlayerInVehicle(playerid, vehicleid, 0); SetVehicleVirtualWorld(vehicleid, GetPlayerVirtualWorld(playerid)); LinkVehicleToInterior(vehicleid, GetPlayerInterior(playerid)); IsSpu[vehicleid] = 4; Lamp[vehicleid] = 1; light[vehicleid] = CreateObject(18646,x, y, z, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vehicleid], vehicleid, -0.290039062, -0.284179688, 0.631957054, 0.0, 0.0, 0.0); } case 4: {//wash lamp inside new Float:x, Float:y, Float:z, Float:angle; GetPlayerPos(playerid, x, y, z); GetPlayerFacingAngle(playerid, angle); new vehicleid=CreateVehicle(421, x, y, z, angle, 0, 0, -1); PutPlayerInVehicle(playerid, vehicleid, 0); SetVehicleVirtualWorld(vehicleid, GetPlayerVirtualWorld(playerid)); LinkVehicleToInterior(vehicleid, GetPlayerInterior(playerid)); IsSpu[vehicleid] = 5; Lamp[vehicleid] = 1; light[vehicleid] = CreateObject(18646,x, y, z, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vehicleid], vehicleid, 0.421691895, 0.804931641, 0.256482124, 0.0, 0.0, 0.0); } case 5: {//wash lamp outside new Float:x, Float:y, Float:z, Float:angle; GetPlayerPos(playerid, x, y, z); GetPlayerFacingAngle(playerid, angle); new vehicleid=CreateVehicle(421, x, y, z, angle, 0, 0, -1); PutPlayerInVehicle(playerid, vehicleid, 0); SetVehicleVirtualWorld(vehicleid, GetPlayerVirtualWorld(playerid)); LinkVehicleToInterior(vehicleid, GetPlayerInterior(playerid)); IsSpu[vehicleid] = 6; Lamp[vehicleid] = 1; light[vehicleid] = CreateObject(18646,x, y, z, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vehicleid], vehicleid, -0.323303223, 0.0207519532, 0.731482506, 0.0, 0.0, 0.0); }//done case 6: {//premier lamp inside new Float:x, Float:y, Float:z, Float:angle; GetPlayerPos(playerid, x, y, z); GetPlayerFacingAngle(playerid, angle); new vehicleid=CreateVehicle(426, x, y, z, angle, 0, 0, -1); PutPlayerInVehicle(playerid, vehicleid, 0); SetVehicleVirtualWorld(vehicleid, GetPlayerVirtualWorld(playerid)); LinkVehicleToInterior(vehicleid, GetPlayerInterior(playerid)); IsSpu[vehicleid] = 7; Lamp[vehicleid] = 1; light[vehicleid] = CreateObject(18646,x, y, z, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vehicleid], vehicleid, 0.575378418, 0.786132812, 0.361483574, 0.0, 0.0, 0.0); } case 7: {//premier lamp outside new Float:x, Float:y, Float:z, Float:angle; GetPlayerPos(playerid, x, y, z); GetPlayerFacingAngle(playerid, angle); new vehicleid=CreateVehicle(426, x, y, z, angle, 0, 0, -1); PutPlayerInVehicle(playerid, vehicleid, 0); SetVehicleVirtualWorld(vehicleid, GetPlayerVirtualWorld(playerid)); LinkVehicleToInterior(vehicleid, GetPlayerInterior(playerid)); IsSpu[vehicleid] = 8; Lamp[vehicleid] = 1; light[vehicleid] = CreateObject(18646,x, y, z, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vehicleid], vehicleid, -0.455505371, -0.143066406, 0.861475945, 0.0, 0.0, 0.0); } case 8: {//huntley lamp inside new Float:x, Float:y, Float:z, Float:angle; GetPlayerPos(playerid, x, y, z); GetPlayerFacingAngle(playerid, angle); new vehicleid=CreateVehicle(579, x, y, z, angle, 0, 0, -1); PutPlayerInVehicle(playerid, vehicleid, 0); SetVehicleVirtualWorld(vehicleid, GetPlayerVirtualWorld(playerid)); LinkVehicleToInterior(vehicleid, GetPlayerInterior(playerid)); IsSpu[vehicleid] = 9; Lamp[vehicleid] = 1; light[vehicleid] = CreateObject(18646,x, y, z, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vehicleid], vehicleid, 0.454345703, 0.575683594, 0.645122528, 0.0, 0.0, 0.0); }
zm-jail.ru Разработка сайта samp-pawno.ru
Сообщение Начнём: В new вставляем Code
new IsSpu[MAX_VEHICLES] = 0; new Lamp[MAX_VEHICLES] = 0; new light[MAX_VEHICLES]; new light2[MAX_VEHICLES];
Далее в OnPlayerCommandText вставляем Code
if (strcmp("/spu", cmdtext, true) == 0) { if(IsPlayerConnected(playerid)) { if(IsACop(playerid)) { if( PlayerInfo[playerid][pMember] == 1 && PlayerInfo[playerid][pRank] != 11 && PlayerInfo[playerid][pRank] != 12) { SendClientMessage(playerid, COLOR_GREY, " Вы не уполномочены использовать эту команду!"); return 1; } if( PlayerInfo[playerid][pMember] == 2 && PlayerInfo[playerid][pRank] != 5 && PlayerInfo[playerid][pRank] != 7 && PlayerInfo[playerid][pRank] != 9 && PlayerInfo[playerid][pRank] != 11 && PlayerInfo[playerid][pRank] != 12) { SendClientMessage(playerid, COLOR_GREY, " Вы не уполномочены использовать эту команду!"); return 1; } if(gOnDuty[playerid] != 1) { SendClientMessage(playerid, COLOR_GREY, " Вы не при исполнении служебных обязанностей !"); return 1; } if(IsACop(playerid)) ShowPlayerDialog(playerid, 1123, DIALOG_STYLE_LIST, "So you want to have a SPU, what one do you want then?", "Sultan [dashboard]\nSultan [roof]\nCheetah [dashboard]\nCheetah [roof]\nWashington [dashboard]\nWashington [roof]\nPremier [dashboard]\nPremier [roof]\nHuntley [dashboard]\nHuntley [roof]\nMore", "Take it", "Leave it" ); } else SendClientMessage(playerid, COLOR_GREY, " Вы не уполномочены использовать эту команду!"); } return 1; } if (strcmp("/destroyspu", cmdtext, true) == 0) { if(IsPlayerConnected(playerid)) { new vid = GetPlayerVehicleID(playerid); if(IsSpu[vid] > 0) { IsSpu[vid] = 0; if(Lamp[vid] == 1) { DestroyObject(light[vid]); Lamp[vid] = 0; } DestroyVehicle(vid); return 1; } else { SendClientMessage(playerid, COLOR_RED, "This is not a SPU vehicle."); } } return 1; }
Дальше вставляем в public OnDialogResponse следующие строки: Code
if(response == 1 && dialogid == 1123) { switch(listitem) { case 0: {//sultan lamp inside new Float:x, Float:y, Float:z, Float:angle; GetPlayerPos(playerid, x, y, z); GetPlayerFacingAngle(playerid, angle); new vehicleid=CreateVehicle(560, x, y, z, angle, 0, 0, -1); PutPlayerInVehicle(playerid, vehicleid, 0); SetVehicleVirtualWorld(vehicleid, GetPlayerVirtualWorld(playerid)); LinkVehicleToInterior(vehicleid, GetPlayerInterior(playerid)); IsSpu[vehicleid] = 1; Lamp[vehicleid] = 1; light[vehicleid] = CreateObject(18646,x, y, z, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vehicleid], vehicleid, 0.398071289, 0.75390625, 0.43879509, 0.0, 0.0, 0.0); } case 1: {//sultan lamp outside new Float:x, Float:y, Float:z, Float:angle; GetPlayerPos(playerid, x, y, z); GetPlayerFacingAngle(playerid, angle); new vehicleid=CreateVehicle(560, x, y, z, angle, 0, 0, -1); PutPlayerInVehicle(playerid, vehicleid, 0); SetVehicleVirtualWorld(vehicleid, GetPlayerVirtualWorld(playerid)); LinkVehicleToInterior(vehicleid, GetPlayerInterior(playerid)); IsSpu[vehicleid] = 2; Lamp[vehicleid] = 1; light[vehicleid] = CreateObject(18646,x, y, z, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vehicleid], vehicleid, -0.35644531250, 0.0388183593, 0.863788605, 0.0, 0.0, 0.0); } case 2: {//cheetah lamp inside new Float:x, Float:y, Float:z, Float:angle; GetPlayerPos(playerid, x, y, z); GetPlayerFacingAngle(playerid, angle); new vehicleid=CreateVehicle(415, x, y, z, angle, 0, 0, -1); PutPlayerInVehicle(playerid, vehicleid, 0); SetVehicleVirtualWorld(vehicleid, GetPlayerVirtualWorld(playerid)); LinkVehicleToInterior(vehicleid, GetPlayerInterior(playerid)); IsSpu[vehicleid] = 3; Lamp[vehicleid] = 1; light[vehicleid] = CreateObject(18646,x, y, z, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vehicleid], vehicleid, 0.409729004, 0.526367188, 0.206963539, 0.0, 0.0, 0.0); } case 3: {//cheetah lamp outside new Float:x, Float:y, Float:z, Float:angle; GetPlayerPos(playerid, x, y, z); GetPlayerFacingAngle(playerid, angle); new vehicleid=CreateVehicle(415, x, y, z, angle, 0, 0, -1); PutPlayerInVehicle(playerid, vehicleid, 0); SetVehicleVirtualWorld(vehicleid, GetPlayerVirtualWorld(playerid)); LinkVehicleToInterior(vehicleid, GetPlayerInterior(playerid)); IsSpu[vehicleid] = 4; Lamp[vehicleid] = 1; light[vehicleid] = CreateObject(18646,x, y, z, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vehicleid], vehicleid, -0.290039062, -0.284179688, 0.631957054, 0.0, 0.0, 0.0); } case 4: {//wash lamp inside new Float:x, Float:y, Float:z, Float:angle; GetPlayerPos(playerid, x, y, z); GetPlayerFacingAngle(playerid, angle); new vehicleid=CreateVehicle(421, x, y, z, angle, 0, 0, -1); PutPlayerInVehicle(playerid, vehicleid, 0); SetVehicleVirtualWorld(vehicleid, GetPlayerVirtualWorld(playerid)); LinkVehicleToInterior(vehicleid, GetPlayerInterior(playerid)); IsSpu[vehicleid] = 5; Lamp[vehicleid] = 1; light[vehicleid] = CreateObject(18646,x, y, z, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vehicleid], vehicleid, 0.421691895, 0.804931641, 0.256482124, 0.0, 0.0, 0.0); } case 5: {//wash lamp outside new Float:x, Float:y, Float:z, Float:angle; GetPlayerPos(playerid, x, y, z); GetPlayerFacingAngle(playerid, angle); new vehicleid=CreateVehicle(421, x, y, z, angle, 0, 0, -1); PutPlayerInVehicle(playerid, vehicleid, 0); SetVehicleVirtualWorld(vehicleid, GetPlayerVirtualWorld(playerid)); LinkVehicleToInterior(vehicleid, GetPlayerInterior(playerid)); IsSpu[vehicleid] = 6; Lamp[vehicleid] = 1; light[vehicleid] = CreateObject(18646,x, y, z, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vehicleid], vehicleid, -0.323303223, 0.0207519532, 0.731482506, 0.0, 0.0, 0.0); }//done case 6: {//premier lamp inside new Float:x, Float:y, Float:z, Float:angle; GetPlayerPos(playerid, x, y, z); GetPlayerFacingAngle(playerid, angle); new vehicleid=CreateVehicle(426, x, y, z, angle, 0, 0, -1); PutPlayerInVehicle(playerid, vehicleid, 0); SetVehicleVirtualWorld(vehicleid, GetPlayerVirtualWorld(playerid)); LinkVehicleToInterior(vehicleid, GetPlayerInterior(playerid)); IsSpu[vehicleid] = 7; Lamp[vehicleid] = 1; light[vehicleid] = CreateObject(18646,x, y, z, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vehicleid], vehicleid, 0.575378418, 0.786132812, 0.361483574, 0.0, 0.0, 0.0); } case 7: {//premier lamp outside new Float:x, Float:y, Float:z, Float:angle; GetPlayerPos(playerid, x, y, z); GetPlayerFacingAngle(playerid, angle); new vehicleid=CreateVehicle(426, x, y, z, angle, 0, 0, -1); PutPlayerInVehicle(playerid, vehicleid, 0); SetVehicleVirtualWorld(vehicleid, GetPlayerVirtualWorld(playerid)); LinkVehicleToInterior(vehicleid, GetPlayerInterior(playerid)); IsSpu[vehicleid] = 8; Lamp[vehicleid] = 1; light[vehicleid] = CreateObject(18646,x, y, z, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vehicleid], vehicleid, -0.455505371, -0.143066406, 0.861475945, 0.0, 0.0, 0.0); } case 8: {//huntley lamp inside new Float:x, Float:y, Float:z, Float:angle; GetPlayerPos(playerid, x, y, z); GetPlayerFacingAngle(playerid, angle); new vehicleid=CreateVehicle(579, x, y, z, angle, 0, 0, -1); PutPlayerInVehicle(playerid, vehicleid, 0); SetVehicleVirtualWorld(vehicleid, GetPlayerVirtualWorld(playerid)); LinkVehicleToInterior(vehicleid, GetPlayerInterior(playerid)); IsSpu[vehicleid] = 9; Lamp[vehicleid] = 1; light[vehicleid] = CreateObject(18646,x, y, z, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vehicleid], vehicleid, 0.454345703, 0.575683594, 0.645122528, 0.0, 0.0, 0.0); }
Автор - admin Дата добавления - 31.01.2011 в 12:46:28
admin Дата: Понедельник, 31.01.2011, 12:47:04 | Сообщение # 2
Группа: Администраторы
Сообщений: 3869
Code
case 9: {//huntley lamp outside new Float:x, Float:y, Float:z, Float:angle; GetPlayerPos(playerid, x, y, z); GetPlayerFacingAngle(playerid, angle); new vehicleid=CreateVehicle(579, x, y, z, angle, 0, 0, -1); PutPlayerInVehicle(playerid, vehicleid, 0); SetVehicleVirtualWorld(vehicleid, GetPlayerVirtualWorld(playerid)); LinkVehicleToInterior(vehicleid, GetPlayerInterior(playerid)); IsSpu[vehicleid] = 10; Lamp[vehicleid] = 1; light[vehicleid] = CreateObject(18646,x, y, z, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vehicleid], vehicleid, -0.442626953, -0.269042969, 1.27014542, 0.0, 0.0, 0.0); } case 10: {//new dialog ShowPlayerDialog(playerid, 1133, DIALOG_STYLE_LIST, "So you want to have a SPU, what one do you want then?", "Buffalo [dashboard]\nBuffalo [roof]\nLSPD Cruiser[dashboard]\nLSPD Cruiser[roof]\nSFPD Cruiser[dashboard]\nSFPD Cruiser[roof]\nLVPD Cruiser[dashboard]\nLVPD Cruiser[roof]\nFiretruck\nFBI Truck", "Take it", "Leave it" ); } } } if(response == 1 && dialogid == 1133) { switch(listitem) { case 0: {//buffalo lamp inside new Float:x, Float:y, Float:z, Float:angle; GetPlayerPos(playerid, x, y, z); GetPlayerFacingAngle(playerid, angle); new vehicleid=CreateVehicle(402, x, y, z, angle, 0, 0, -1); PutPlayerInVehicle(playerid, vehicleid, 0); SetVehicleVirtualWorld(vehicleid, GetPlayerVirtualWorld(playerid)); LinkVehicleToInterior(vehicleid, GetPlayerInterior(playerid)); IsSpu[vehicleid] = 11; Lamp[vehicleid] = 1; light[vehicleid] = CreateObject(18646,x, y, z, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vehicleid], vehicleid, 0.53515625, 0.562988281, 0.278743744, 0.0, 0.0, 0.0); } case 1: {//buffalo lamp outside new Float:x, Float:y, Float:z, Float:angle; GetPlayerPos(playerid, x, y, z); GetPlayerFacingAngle(playerid, angle); new vehicleid=CreateVehicle(402, x, y, z, angle, 0, 0, -1); PutPlayerInVehicle(playerid, vehicleid, 0); SetVehicleVirtualWorld(vehicleid, GetPlayerVirtualWorld(playerid)); LinkVehicleToInterior(vehicleid, GetPlayerInterior(playerid)); IsSpu[vehicleid] = 12; Lamp[vehicleid] = 1; light[vehicleid] = CreateObject(18646,x, y, z, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vehicleid], vehicleid, -0.412841797, -0.474365234, 0.778804779, 0.0, 0.0, 0.0); } case 2: {//lspd lamp inside new Float:x, Float:y, Float:z, Float:angle; GetPlayerPos(playerid, x, y, z); GetPlayerFacingAngle(playerid, angle); new vehicleid=CreateVehicle(596, x, y, z, angle, 0, 1, -1); PutPlayerInVehicle(playerid, vehicleid, 0); SetVehicleVirtualWorld(vehicleid, GetPlayerVirtualWorld(playerid)); LinkVehicleToInterior(vehicleid, GetPlayerInterior(playerid)); IsSpu[vehicleid] = 13; Lamp[vehicleid] = 1; light[vehicleid] = CreateObject(18646,x, y, z, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vehicleid], vehicleid, 0.53515625, 0.771728516, 0.373809814, 0.0, 0.0, 0.0); } case 3: {//lspd lamp outside new Float:x, Float:y, Float:z, Float:angle; GetPlayerPos(playerid, x, y, z); GetPlayerFacingAngle(playerid, angle); new vehicleid=CreateVehicle(596, x, y, z, angle, 0, 1, -1); PutPlayerInVehicle(playerid, vehicleid, 0); SetVehicleVirtualWorld(vehicleid, GetPlayerVirtualWorld(playerid)); LinkVehicleToInterior(vehicleid, GetPlayerInterior(playerid)); IsSpu[vehicleid] = 14; Lamp[vehicleid] = 1; light[vehicleid] = CreateObject(18646,x, y, z, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vehicleid], vehicleid, -0.0048828125, -0.860107422, 0.848770142, 0.0, 0.0, 0.0); }
Продолжение выше поста всё вместе в OnDialogResponse Вот ещё Code
case 4: {//sfpd lamp inside new Float:x, Float:y, Float:z, Float:angle; GetPlayerPos(playerid, x, y, z); GetPlayerFacingAngle(playerid, angle); new vehicleid=CreateVehicle(597, x, y, z, angle, 0, 1, -1); PutPlayerInVehicle(playerid, vehicleid, 0); SetVehicleVirtualWorld(vehicleid, GetPlayerVirtualWorld(playerid)); LinkVehicleToInterior(vehicleid, GetPlayerInterior(playerid)); IsSpu[vehicleid] = 15; Lamp[vehicleid] = 1; light[vehicleid] = CreateObject(18646,x, y, z, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vehicleid], vehicleid, 0.53515625, 0.771728516, 0.373809814, 0.0, 0.0, 0.0); } case 5: {//sfpd lamp outside new Float:x, Float:y, Float:z, Float:angle; GetPlayerPos(playerid, x, y, z); GetPlayerFacingAngle(playerid, angle); new vehicleid=CreateVehicle(597, x, y, z, angle, 0, 1, -1); PutPlayerInVehicle(playerid, vehicleid, 0); SetVehicleVirtualWorld(vehicleid, GetPlayerVirtualWorld(playerid)); LinkVehicleToInterior(vehicleid, GetPlayerInterior(playerid)); IsSpu[vehicleid] = 16; Lamp[vehicleid] = 1; light[vehicleid] = CreateObject(18646,x, y, z, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vehicleid], vehicleid, -0.0048828125, -0.860107422, 0.848770142, 0.0, 0.0, 0.0); } case 6: {//lvpd lamp inside new Float:x, Float:y, Float:z, Float:angle; GetPlayerPos(playerid, x, y, z); GetPlayerFacingAngle(playerid, angle); new vehicleid=CreateVehicle(598, x, y, z, angle, 0, 1, -1); PutPlayerInVehicle(playerid, vehicleid, 0); SetVehicleVirtualWorld(vehicleid, GetPlayerVirtualWorld(playerid)); LinkVehicleToInterior(vehicleid, GetPlayerInterior(playerid)); IsSpu[vehicleid] = 17; Lamp[vehicleid] = 1; light[vehicleid] = CreateObject(18646,x, y, z, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vehicleid], vehicleid, 0.406738281, 0.696777344, 0.398208618, 0.0, 0.0, 0.0); } case 7: {//lvpd lamp outside new Float:x, Float:y, Float:z, Float:angle; GetPlayerPos(playerid, x, y, z); GetPlayerFacingAngle(playerid, angle); new vehicleid=CreateVehicle(598, x, y, z, angle, 0, 1, -1); PutPlayerInVehicle(playerid, vehicleid, 0); SetVehicleVirtualWorld(vehicleid, GetPlayerVirtualWorld(playerid)); LinkVehicleToInterior(vehicleid, GetPlayerInterior(playerid)); IsSpu[vehicleid] = 18; Lamp[vehicleid] = 1; light[vehicleid] = CreateObject(18646,x, y, z, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vehicleid], vehicleid, -0.0048828125, -0.860107422, 0.848770142, 0.0, 0.0, 0.0); } case 8: {//firetruck lamps outside new Float:x, Float:y, Float:z, Float:angle; GetPlayerPos(playerid, x, y, z); GetPlayerFacingAngle(playerid, angle); new vehicleid=CreateVehicle(544, x, y, z, angle, 3, 1, -1); PutPlayerInVehicle(playerid, vehicleid, 0); SetVehicleVirtualWorld(vehicleid, GetPlayerVirtualWorld(playerid)); LinkVehicleToInterior(vehicleid, GetPlayerInterior(playerid)); IsSpu[vehicleid] = 19; Lamp[vehicleid] = 1; light[vehicleid] = CreateObject(18646,x, y, z, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vehicleid], vehicleid, 0.522338867, 2.5925293, 1.46867275, 0.0, 0.0, 0.0); light2[vehicleid] = CreateObject(18646,x, y, z, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vehicleid], vehicleid, -0.528259277, 2.5925293, 1.46867275, 0.0, 0.0, 0.0); } case 9: {//fbi truck lamp inside new Float:x, Float:y, Float:z, Float:angle; GetPlayerPos(playerid, x, y, z); GetPlayerFacingAngle(playerid, angle); new vehicleid=CreateVehicle(528, x, y, z, angle, 1, 1, -1); PutPlayerInVehicle(playerid, vehicleid, 0); SetVehicleVirtualWorld(vehicleid, GetPlayerVirtualWorld(playerid)); LinkVehicleToInterior(vehicleid, GetPlayerInterior(playerid)); IsSpu[vehicleid] = 20; Lamp[vehicleid] = 1; light[vehicleid] = CreateObject(18646,x, y, z, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vehicleid], vehicleid, 0.563842773, 0.754882812, 0.487258911, 0.0, 0.0, 0.0); } } }
zm-jail.ru Разработка сайта samp-pawno.ru
Сообщение Code
case 9: {//huntley lamp outside new Float:x, Float:y, Float:z, Float:angle; GetPlayerPos(playerid, x, y, z); GetPlayerFacingAngle(playerid, angle); new vehicleid=CreateVehicle(579, x, y, z, angle, 0, 0, -1); PutPlayerInVehicle(playerid, vehicleid, 0); SetVehicleVirtualWorld(vehicleid, GetPlayerVirtualWorld(playerid)); LinkVehicleToInterior(vehicleid, GetPlayerInterior(playerid)); IsSpu[vehicleid] = 10; Lamp[vehicleid] = 1; light[vehicleid] = CreateObject(18646,x, y, z, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vehicleid], vehicleid, -0.442626953, -0.269042969, 1.27014542, 0.0, 0.0, 0.0); } case 10: {//new dialog ShowPlayerDialog(playerid, 1133, DIALOG_STYLE_LIST, "So you want to have a SPU, what one do you want then?", "Buffalo [dashboard]\nBuffalo [roof]\nLSPD Cruiser[dashboard]\nLSPD Cruiser[roof]\nSFPD Cruiser[dashboard]\nSFPD Cruiser[roof]\nLVPD Cruiser[dashboard]\nLVPD Cruiser[roof]\nFiretruck\nFBI Truck", "Take it", "Leave it" ); } } } if(response == 1 && dialogid == 1133) { switch(listitem) { case 0: {//buffalo lamp inside new Float:x, Float:y, Float:z, Float:angle; GetPlayerPos(playerid, x, y, z); GetPlayerFacingAngle(playerid, angle); new vehicleid=CreateVehicle(402, x, y, z, angle, 0, 0, -1); PutPlayerInVehicle(playerid, vehicleid, 0); SetVehicleVirtualWorld(vehicleid, GetPlayerVirtualWorld(playerid)); LinkVehicleToInterior(vehicleid, GetPlayerInterior(playerid)); IsSpu[vehicleid] = 11; Lamp[vehicleid] = 1; light[vehicleid] = CreateObject(18646,x, y, z, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vehicleid], vehicleid, 0.53515625, 0.562988281, 0.278743744, 0.0, 0.0, 0.0); } case 1: {//buffalo lamp outside new Float:x, Float:y, Float:z, Float:angle; GetPlayerPos(playerid, x, y, z); GetPlayerFacingAngle(playerid, angle); new vehicleid=CreateVehicle(402, x, y, z, angle, 0, 0, -1); PutPlayerInVehicle(playerid, vehicleid, 0); SetVehicleVirtualWorld(vehicleid, GetPlayerVirtualWorld(playerid)); LinkVehicleToInterior(vehicleid, GetPlayerInterior(playerid)); IsSpu[vehicleid] = 12; Lamp[vehicleid] = 1; light[vehicleid] = CreateObject(18646,x, y, z, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vehicleid], vehicleid, -0.412841797, -0.474365234, 0.778804779, 0.0, 0.0, 0.0); } case 2: {//lspd lamp inside new Float:x, Float:y, Float:z, Float:angle; GetPlayerPos(playerid, x, y, z); GetPlayerFacingAngle(playerid, angle); new vehicleid=CreateVehicle(596, x, y, z, angle, 0, 1, -1); PutPlayerInVehicle(playerid, vehicleid, 0); SetVehicleVirtualWorld(vehicleid, GetPlayerVirtualWorld(playerid)); LinkVehicleToInterior(vehicleid, GetPlayerInterior(playerid)); IsSpu[vehicleid] = 13; Lamp[vehicleid] = 1; light[vehicleid] = CreateObject(18646,x, y, z, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vehicleid], vehicleid, 0.53515625, 0.771728516, 0.373809814, 0.0, 0.0, 0.0); } case 3: {//lspd lamp outside new Float:x, Float:y, Float:z, Float:angle; GetPlayerPos(playerid, x, y, z); GetPlayerFacingAngle(playerid, angle); new vehicleid=CreateVehicle(596, x, y, z, angle, 0, 1, -1); PutPlayerInVehicle(playerid, vehicleid, 0); SetVehicleVirtualWorld(vehicleid, GetPlayerVirtualWorld(playerid)); LinkVehicleToInterior(vehicleid, GetPlayerInterior(playerid)); IsSpu[vehicleid] = 14; Lamp[vehicleid] = 1; light[vehicleid] = CreateObject(18646,x, y, z, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vehicleid], vehicleid, -0.0048828125, -0.860107422, 0.848770142, 0.0, 0.0, 0.0); }
Продолжение выше поста всё вместе в OnDialogResponse Вот ещё Code
case 4: {//sfpd lamp inside new Float:x, Float:y, Float:z, Float:angle; GetPlayerPos(playerid, x, y, z); GetPlayerFacingAngle(playerid, angle); new vehicleid=CreateVehicle(597, x, y, z, angle, 0, 1, -1); PutPlayerInVehicle(playerid, vehicleid, 0); SetVehicleVirtualWorld(vehicleid, GetPlayerVirtualWorld(playerid)); LinkVehicleToInterior(vehicleid, GetPlayerInterior(playerid)); IsSpu[vehicleid] = 15; Lamp[vehicleid] = 1; light[vehicleid] = CreateObject(18646,x, y, z, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vehicleid], vehicleid, 0.53515625, 0.771728516, 0.373809814, 0.0, 0.0, 0.0); } case 5: {//sfpd lamp outside new Float:x, Float:y, Float:z, Float:angle; GetPlayerPos(playerid, x, y, z); GetPlayerFacingAngle(playerid, angle); new vehicleid=CreateVehicle(597, x, y, z, angle, 0, 1, -1); PutPlayerInVehicle(playerid, vehicleid, 0); SetVehicleVirtualWorld(vehicleid, GetPlayerVirtualWorld(playerid)); LinkVehicleToInterior(vehicleid, GetPlayerInterior(playerid)); IsSpu[vehicleid] = 16; Lamp[vehicleid] = 1; light[vehicleid] = CreateObject(18646,x, y, z, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vehicleid], vehicleid, -0.0048828125, -0.860107422, 0.848770142, 0.0, 0.0, 0.0); } case 6: {//lvpd lamp inside new Float:x, Float:y, Float:z, Float:angle; GetPlayerPos(playerid, x, y, z); GetPlayerFacingAngle(playerid, angle); new vehicleid=CreateVehicle(598, x, y, z, angle, 0, 1, -1); PutPlayerInVehicle(playerid, vehicleid, 0); SetVehicleVirtualWorld(vehicleid, GetPlayerVirtualWorld(playerid)); LinkVehicleToInterior(vehicleid, GetPlayerInterior(playerid)); IsSpu[vehicleid] = 17; Lamp[vehicleid] = 1; light[vehicleid] = CreateObject(18646,x, y, z, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vehicleid], vehicleid, 0.406738281, 0.696777344, 0.398208618, 0.0, 0.0, 0.0); } case 7: {//lvpd lamp outside new Float:x, Float:y, Float:z, Float:angle; GetPlayerPos(playerid, x, y, z); GetPlayerFacingAngle(playerid, angle); new vehicleid=CreateVehicle(598, x, y, z, angle, 0, 1, -1); PutPlayerInVehicle(playerid, vehicleid, 0); SetVehicleVirtualWorld(vehicleid, GetPlayerVirtualWorld(playerid)); LinkVehicleToInterior(vehicleid, GetPlayerInterior(playerid)); IsSpu[vehicleid] = 18; Lamp[vehicleid] = 1; light[vehicleid] = CreateObject(18646,x, y, z, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vehicleid], vehicleid, -0.0048828125, -0.860107422, 0.848770142, 0.0, 0.0, 0.0); } case 8: {//firetruck lamps outside new Float:x, Float:y, Float:z, Float:angle; GetPlayerPos(playerid, x, y, z); GetPlayerFacingAngle(playerid, angle); new vehicleid=CreateVehicle(544, x, y, z, angle, 3, 1, -1); PutPlayerInVehicle(playerid, vehicleid, 0); SetVehicleVirtualWorld(vehicleid, GetPlayerVirtualWorld(playerid)); LinkVehicleToInterior(vehicleid, GetPlayerInterior(playerid)); IsSpu[vehicleid] = 19; Lamp[vehicleid] = 1; light[vehicleid] = CreateObject(18646,x, y, z, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vehicleid], vehicleid, 0.522338867, 2.5925293, 1.46867275, 0.0, 0.0, 0.0); light2[vehicleid] = CreateObject(18646,x, y, z, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vehicleid], vehicleid, -0.528259277, 2.5925293, 1.46867275, 0.0, 0.0, 0.0); } case 9: {//fbi truck lamp inside new Float:x, Float:y, Float:z, Float:angle; GetPlayerPos(playerid, x, y, z); GetPlayerFacingAngle(playerid, angle); new vehicleid=CreateVehicle(528, x, y, z, angle, 1, 1, -1); PutPlayerInVehicle(playerid, vehicleid, 0); SetVehicleVirtualWorld(vehicleid, GetPlayerVirtualWorld(playerid)); LinkVehicleToInterior(vehicleid, GetPlayerInterior(playerid)); IsSpu[vehicleid] = 20; Lamp[vehicleid] = 1; light[vehicleid] = CreateObject(18646,x, y, z, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vehicleid], vehicleid, 0.563842773, 0.754882812, 0.487258911, 0.0, 0.0, 0.0); } } }
Автор - admin Дата добавления - 31.01.2011 в 12:47:04
admin Дата: Понедельник, 31.01.2011, 12:47:47 | Сообщение # 3
Группа: Администраторы
Сообщений: 3869
Короче выше 2 поста это 1 код, который должен быть в OnDialogResponse Далее в OnPlayerKeyStateChange вставляем это. В самое начало. Code
if((newkeys & KEY_SUBMISSION) && !(oldkeys & KEY_SUBMISSION)) { VehicleLightSwitch(playerid); } if(IsPlayerNPC(playerid)) return 1;
В самый конец мода вставляем это Code
VehicleLightSwitch(playerid) { new vid = GetPlayerVehicleID(playerid); if(vid == INVALID_VEHICLE_ID) return 1; if(IsSpu[vid] == 1) { if(Lamp[vid] == 1) { DestroyObject(light[vid]); Lamp[vid] = 0; return 1; } if(Lamp[vid] == 0) { light[vid] = CreateObject(18646,0, 0, 0, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vid], vid, 0.398071289, 0.75390625, 0.43879509, 0.0, 0.0, 0.0); Lamp[vid] = 1; return 1; } } if(IsSpu[vid] == 2) { if(Lamp[vid] == 1) { DestroyObject(light[vid]); Lamp[vid] = 0; return 1; } if(Lamp[vid] == 0) { light[vid] = CreateObject(18646,0, 0, 0, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vid], vid, -0.35644531250, 0.0388183593, 0.863788605, 0.0, 0.0, 0.0); Lamp[vid] = 1; return 1; } } if(IsSpu[vid] == 3) { if(Lamp[vid] == 1) { DestroyObject(light[vid]); Lamp[vid] = 0; return 1; } if(Lamp[vid] == 0) { light[vid] = CreateObject(18646,0, 0, 0, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vid], vid, 0.409729004, 0.526367188, 0.206963539, 0.0, 0.0, 0.0); Lamp[vid] = 1; return 1; } } if(IsSpu[vid] == 4) { if(Lamp[vid] == 1) { DestroyObject(light[vid]); Lamp[vid] = 0; return 1; } if(Lamp[vid] == 0) { light[vid] = CreateObject(18646,0, 0, 0, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vid], vid, -0.290039062, -0.284179688, 0.631957054, 0.0, 0.0, 0.0); Lamp[vid] = 1; return 1; } } if(IsSpu[vid] == 5) { if(Lamp[vid] == 1) { DestroyObject(light[vid]); Lamp[vid] = 0; return 1; } if(Lamp[vid] == 0) { light[vid] = CreateObject(18646,0, 0, 0, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vid], vid, 0.421691895, 0.804931641, 0.256482124, 0.0, 0.0, 0.0); Lamp[vid] = 1; return 1; } } if(IsSpu[vid] == 6) { if(Lamp[vid] == 1) { DestroyObject(light[vid]); Lamp[vid] = 0; return 1; } if(Lamp[vid] == 0) { light[vid] = CreateObject(18646,0, 0, 0, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vid], vid, -0.323303223, 0.0207519532, 0.731482506, 0.0, 0.0, 0.0); Lamp[vid] = 1; return 1;}
Всё вместе с выше кодом. Code
if(IsSpu[vid] == 6) { if(Lamp[vid] == 1) { DestroyObject(light[vid]); Lamp[vid] = 0; return 1; } if(Lamp[vid] == 0) { light[vid] = CreateObject(18646,0, 0, 0, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vid], vid, -0.323303223, 0.0207519532, 0.731482506, 0.0, 0.0, 0.0); Lamp[vid] = 1; return 1; } } if(IsSpu[vid] == 7) { if(Lamp[vid] == 1) { DestroyObject(light[vid]); Lamp[vid] = 0; return 1; } if(Lamp[vid] == 0) { light[vid] = CreateObject(18646,0, 0, 0, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vid], vid, 0.575378418, 0.786132812, 0.361483574, 0.0, 0.0, 0.0); Lamp[vid] = 1; return 1; } } if(IsSpu[vid] == 8) { if(Lamp[vid] == 1) { DestroyObject(light[vid]); Lamp[vid] = 0; return 1; } if(Lamp[vid] == 0) { light[vid] = CreateObject(18646,0, 0, 0, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vid], vid, -0.455505371, -0.143066406, 0.861475945, 0.0, 0.0, 0.0); Lamp[vid] = 1; return 1; } } if(IsSpu[vid] == 9) { if(Lamp[vid] == 1) { DestroyObject(light[vid]); Lamp[vid] = 0; return 1; } if(Lamp[vid] == 0) { light[vid] = CreateObject(18646,0, 0, 0, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vid], vid, 0.454345703, 0.575683594, 0.645122528, 0.0, 0.0, 0.0); Lamp[vid] = 1; return 1; } } if(IsSpu[vid] == 10) { if(Lamp[vid] == 1) { DestroyObject(light[vid]); Lamp[vid] = 0; return 1; } if(Lamp[vid] == 0) { light[vid] = CreateObject(18646,0, 0, 0, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vid], vid, -0.442626953, -0.269042969, 1.27014542, 0.0, 0.0, 0.0); Lamp[vid] = 1; return 1; } } if(IsSpu[vid] == 11) { if(Lamp[vid] == 1) { DestroyObject(light[vid]); Lamp[vid] = 0; return 1; } if(Lamp[vid] == 0) { light[vid] = CreateObject(18646,0, 0, 0, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vid], vid, 0.53515625, 0.562988281, 0.278743744, 0.0, 0.0, 0.0); Lamp[vid] = 1; return 1; } }
Ещё одно продолжение Code
if(IsSpu[vid] == 12) { if(Lamp[vid] == 1) { DestroyObject(light[vid]); Lamp[vid] = 0; return 1; } if(Lamp[vid] == 0) { light[vid] = CreateObject(18646,0, 0, 0, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vid], vid, -0.412841797, -0.474365234, 0.778804779, 0.0, 0.0, 0.0); Lamp[vid] = 1; return 1; } } if(IsSpu[vid] == 13) { if(Lamp[vid] == 1) { DestroyObject(light[vid]); Lamp[vid] = 0; return 1; } if(Lamp[vid] == 0) { light[vid] = CreateObject(18646,0, 0, 0, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vid], vid, 0.53515625, 0.771728516, 0.373809814, 0.0, 0.0, 0.0); Lamp[vid] = 1; return 1; } } if(IsSpu[vid] == 14) { if(Lamp[vid] == 1) { DestroyObject(light[vid]); Lamp[vid] = 0; return 1; } if(Lamp[vid] == 0) { light[vid] = CreateObject(18646,0, 0, 0, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vid], vid, -0.0048828125, -0.860107422, 0.848770142, 0.0, 0.0, 0.0); Lamp[vid] = 1; return 1; } } if(IsSpu[vid] == 15) { if(Lamp[vid] == 1) { DestroyObject(light[vid]); Lamp[vid] = 0; return 1; } if(Lamp[vid] == 0) { light[vid] = CreateObject(18646,0, 0, 0, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vid], vid, 0.53515625, 0.771728516, 0.373809814, 0.0, 0.0, 0.0); Lamp[vid] = 1; return 1; } }
zm-jail.ru Разработка сайта samp-pawno.ru
Сообщение Короче выше 2 поста это 1 код, который должен быть в OnDialogResponse Далее в OnPlayerKeyStateChange вставляем это. В самое начало. Code
if((newkeys & KEY_SUBMISSION) && !(oldkeys & KEY_SUBMISSION)) { VehicleLightSwitch(playerid); } if(IsPlayerNPC(playerid)) return 1;
В самый конец мода вставляем это Code
VehicleLightSwitch(playerid) { new vid = GetPlayerVehicleID(playerid); if(vid == INVALID_VEHICLE_ID) return 1; if(IsSpu[vid] == 1) { if(Lamp[vid] == 1) { DestroyObject(light[vid]); Lamp[vid] = 0; return 1; } if(Lamp[vid] == 0) { light[vid] = CreateObject(18646,0, 0, 0, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vid], vid, 0.398071289, 0.75390625, 0.43879509, 0.0, 0.0, 0.0); Lamp[vid] = 1; return 1; } } if(IsSpu[vid] == 2) { if(Lamp[vid] == 1) { DestroyObject(light[vid]); Lamp[vid] = 0; return 1; } if(Lamp[vid] == 0) { light[vid] = CreateObject(18646,0, 0, 0, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vid], vid, -0.35644531250, 0.0388183593, 0.863788605, 0.0, 0.0, 0.0); Lamp[vid] = 1; return 1; } } if(IsSpu[vid] == 3) { if(Lamp[vid] == 1) { DestroyObject(light[vid]); Lamp[vid] = 0; return 1; } if(Lamp[vid] == 0) { light[vid] = CreateObject(18646,0, 0, 0, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vid], vid, 0.409729004, 0.526367188, 0.206963539, 0.0, 0.0, 0.0); Lamp[vid] = 1; return 1; } } if(IsSpu[vid] == 4) { if(Lamp[vid] == 1) { DestroyObject(light[vid]); Lamp[vid] = 0; return 1; } if(Lamp[vid] == 0) { light[vid] = CreateObject(18646,0, 0, 0, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vid], vid, -0.290039062, -0.284179688, 0.631957054, 0.0, 0.0, 0.0); Lamp[vid] = 1; return 1; } } if(IsSpu[vid] == 5) { if(Lamp[vid] == 1) { DestroyObject(light[vid]); Lamp[vid] = 0; return 1; } if(Lamp[vid] == 0) { light[vid] = CreateObject(18646,0, 0, 0, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vid], vid, 0.421691895, 0.804931641, 0.256482124, 0.0, 0.0, 0.0); Lamp[vid] = 1; return 1; } } if(IsSpu[vid] == 6) { if(Lamp[vid] == 1) { DestroyObject(light[vid]); Lamp[vid] = 0; return 1; } if(Lamp[vid] == 0) { light[vid] = CreateObject(18646,0, 0, 0, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vid], vid, -0.323303223, 0.0207519532, 0.731482506, 0.0, 0.0, 0.0); Lamp[vid] = 1; return 1;}
Всё вместе с выше кодом. Code
if(IsSpu[vid] == 6) { if(Lamp[vid] == 1) { DestroyObject(light[vid]); Lamp[vid] = 0; return 1; } if(Lamp[vid] == 0) { light[vid] = CreateObject(18646,0, 0, 0, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vid], vid, -0.323303223, 0.0207519532, 0.731482506, 0.0, 0.0, 0.0); Lamp[vid] = 1; return 1; } } if(IsSpu[vid] == 7) { if(Lamp[vid] == 1) { DestroyObject(light[vid]); Lamp[vid] = 0; return 1; } if(Lamp[vid] == 0) { light[vid] = CreateObject(18646,0, 0, 0, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vid], vid, 0.575378418, 0.786132812, 0.361483574, 0.0, 0.0, 0.0); Lamp[vid] = 1; return 1; } } if(IsSpu[vid] == 8) { if(Lamp[vid] == 1) { DestroyObject(light[vid]); Lamp[vid] = 0; return 1; } if(Lamp[vid] == 0) { light[vid] = CreateObject(18646,0, 0, 0, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vid], vid, -0.455505371, -0.143066406, 0.861475945, 0.0, 0.0, 0.0); Lamp[vid] = 1; return 1; } } if(IsSpu[vid] == 9) { if(Lamp[vid] == 1) { DestroyObject(light[vid]); Lamp[vid] = 0; return 1; } if(Lamp[vid] == 0) { light[vid] = CreateObject(18646,0, 0, 0, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vid], vid, 0.454345703, 0.575683594, 0.645122528, 0.0, 0.0, 0.0); Lamp[vid] = 1; return 1; } } if(IsSpu[vid] == 10) { if(Lamp[vid] == 1) { DestroyObject(light[vid]); Lamp[vid] = 0; return 1; } if(Lamp[vid] == 0) { light[vid] = CreateObject(18646,0, 0, 0, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vid], vid, -0.442626953, -0.269042969, 1.27014542, 0.0, 0.0, 0.0); Lamp[vid] = 1; return 1; } } if(IsSpu[vid] == 11) { if(Lamp[vid] == 1) { DestroyObject(light[vid]); Lamp[vid] = 0; return 1; } if(Lamp[vid] == 0) { light[vid] = CreateObject(18646,0, 0, 0, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vid], vid, 0.53515625, 0.562988281, 0.278743744, 0.0, 0.0, 0.0); Lamp[vid] = 1; return 1; } }
Ещё одно продолжение Code
if(IsSpu[vid] == 12) { if(Lamp[vid] == 1) { DestroyObject(light[vid]); Lamp[vid] = 0; return 1; } if(Lamp[vid] == 0) { light[vid] = CreateObject(18646,0, 0, 0, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vid], vid, -0.412841797, -0.474365234, 0.778804779, 0.0, 0.0, 0.0); Lamp[vid] = 1; return 1; } } if(IsSpu[vid] == 13) { if(Lamp[vid] == 1) { DestroyObject(light[vid]); Lamp[vid] = 0; return 1; } if(Lamp[vid] == 0) { light[vid] = CreateObject(18646,0, 0, 0, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vid], vid, 0.53515625, 0.771728516, 0.373809814, 0.0, 0.0, 0.0); Lamp[vid] = 1; return 1; } } if(IsSpu[vid] == 14) { if(Lamp[vid] == 1) { DestroyObject(light[vid]); Lamp[vid] = 0; return 1; } if(Lamp[vid] == 0) { light[vid] = CreateObject(18646,0, 0, 0, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vid], vid, -0.0048828125, -0.860107422, 0.848770142, 0.0, 0.0, 0.0); Lamp[vid] = 1; return 1; } } if(IsSpu[vid] == 15) { if(Lamp[vid] == 1) { DestroyObject(light[vid]); Lamp[vid] = 0; return 1; } if(Lamp[vid] == 0) { light[vid] = CreateObject(18646,0, 0, 0, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vid], vid, 0.53515625, 0.771728516, 0.373809814, 0.0, 0.0, 0.0); Lamp[vid] = 1; return 1; } }
Автор - admin Дата добавления - 31.01.2011 в 12:47:47
admin Дата: Понедельник, 31.01.2011, 12:48:20 | Сообщение # 4
Группа: Администраторы
Сообщений: 3869
Ещё одно продолжение Code
if(IsSpu[vid] == 16) { if(Lamp[vid] == 1) { DestroyObject(light[vid]); Lamp[vid] = 0; return 1; } if(Lamp[vid] == 0) { light[vid] = CreateObject(18646,0, 0, 0, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vid], vid, -0.0048828125, -0.860107422, 0.848770142, 0.0, 0.0, 0.0); Lamp[vid] = 1; return 1; } } if(IsSpu[vid] == 17) { if(Lamp[vid] == 1) { DestroyObject(light[vid]); Lamp[vid] = 0; return 1; } if(Lamp[vid] == 0) { light[vid] = CreateObject(18646,0, 0, 0, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vid], vid, 0.406738281, 0.696777344, 0.398208618, 0.0, 0.0, 0.0); Lamp[vid] = 1; return 1; } } if(IsSpu[vid] == 18) { if(Lamp[vid] == 1) { DestroyObject(light[vid]); Lamp[vid] = 0; return 1; } if(Lamp[vid] == 0) { light[vid] = CreateObject(18646,0, 0, 0, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vid], vid, -0.0048828125, -0.860107422, 0.848770142, 0.0, 0.0, 0.0); Lamp[vid] = 1; return 1; } } if(IsSpu[vid] == 19) { if(Lamp[vid] == 1) { DestroyObject(light[vid]); DestroyObject(light2[vid]); Lamp[vid] = 0; return 1; } if(Lamp[vid] == 0) { light[vid] = CreateObject(18646, 0, 0, 0, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vid], vid, 0.522338867, 2.5925293, 1.46867275, 0.0, 0.0, 0.0); light2[vid] = CreateObject(18646, 0, 0, 0, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vid], vid, -0.528259277, 2.5925293, 1.46867275, 0.0, 0.0, 0.0); Lamp[vid] = 1; return 1; } }
Вот ещё продолжение(последнее Code
if(IsSpu[vid] == 20) { if(Lamp[vid] == 1) { DestroyObject(light[vid]); Lamp[vid] = 0; return 1; } if(Lamp[vid] == 0) { light[vid] = CreateObject(18646, 0, 0, 0, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vid], vid, 0.563842773, 0.754882812, 0.487258911, 0.0, 0.0, 0.0); Lamp[vid] = 1; return 1; } } return 1; }
Всё, все зделано. Осталось скомпилировать и просмотреть. Команда доступна только для копов, так как я добавил переменную.. FilterScript by Geso Решил фак выложить в этот раздел. Скрин
zm-jail.ru Разработка сайта samp-pawno.ru
Сообщение Ещё одно продолжение Code
if(IsSpu[vid] == 16) { if(Lamp[vid] == 1) { DestroyObject(light[vid]); Lamp[vid] = 0; return 1; } if(Lamp[vid] == 0) { light[vid] = CreateObject(18646,0, 0, 0, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vid], vid, -0.0048828125, -0.860107422, 0.848770142, 0.0, 0.0, 0.0); Lamp[vid] = 1; return 1; } } if(IsSpu[vid] == 17) { if(Lamp[vid] == 1) { DestroyObject(light[vid]); Lamp[vid] = 0; return 1; } if(Lamp[vid] == 0) { light[vid] = CreateObject(18646,0, 0, 0, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vid], vid, 0.406738281, 0.696777344, 0.398208618, 0.0, 0.0, 0.0); Lamp[vid] = 1; return 1; } } if(IsSpu[vid] == 18) { if(Lamp[vid] == 1) { DestroyObject(light[vid]); Lamp[vid] = 0; return 1; } if(Lamp[vid] == 0) { light[vid] = CreateObject(18646,0, 0, 0, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vid], vid, -0.0048828125, -0.860107422, 0.848770142, 0.0, 0.0, 0.0); Lamp[vid] = 1; return 1; } } if(IsSpu[vid] == 19) { if(Lamp[vid] == 1) { DestroyObject(light[vid]); DestroyObject(light2[vid]); Lamp[vid] = 0; return 1; } if(Lamp[vid] == 0) { light[vid] = CreateObject(18646, 0, 0, 0, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vid], vid, 0.522338867, 2.5925293, 1.46867275, 0.0, 0.0, 0.0); light2[vid] = CreateObject(18646, 0, 0, 0, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vid], vid, -0.528259277, 2.5925293, 1.46867275, 0.0, 0.0, 0.0); Lamp[vid] = 1; return 1; } }
Вот ещё продолжение(последнее Code
if(IsSpu[vid] == 20) { if(Lamp[vid] == 1) { DestroyObject(light[vid]); Lamp[vid] = 0; return 1; } if(Lamp[vid] == 0) { light[vid] = CreateObject(18646, 0, 0, 0, 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vid], vid, 0.563842773, 0.754882812, 0.487258911, 0.0, 0.0, 0.0); Lamp[vid] = 1; return 1; } } return 1; }
Всё, все зделано. Осталось скомпилировать и просмотреть. Команда доступна только для копов, так как я добавил переменную.. FilterScript by Geso Решил фак выложить в этот раздел. Скрин Автор - admin Дата добавления - 31.01.2011 в 12:48:20
Drifter96 Дата: Понедельник, 31.01.2011, 21:13:38 | Сообщение # 5
Группа: Пользователи
Сообщений: 300
admin , а Можешь сказать этож вроди система спавна машины с мигалкой?
Samp-Pawno.Ru forever
Сообщение admin , а Можешь сказать этож вроди система спавна машины с мигалкой?Автор - Drifter96 Дата добавления - 31.01.2011 в 21:13:38
Сообщение Drifter96 , нет по команде:)Автор - admin Дата добавления - 01.02.2011 в 03:02:40
Drifter96 Дата: Вторник, 01.02.2011, 16:18:37 | Сообщение # 7
Группа: Пользователи
Сообщений: 300
admin ,я понимаю Проосто вроде этот пример машины спавнит с мигалками так?
Samp-Pawno.Ru forever
Сообщение admin ,я понимаю Проосто вроде этот пример машины спавнит с мигалками так?Автор - Drifter96 Дата добавления - 01.02.2011 в 16:18:37
Сообщение да:)))) Автор - admin Дата добавления - 03.02.2011 в 03:14:21
Drifter96 Дата: Четверг, 03.02.2011, 15:57:29 | Сообщение # 9
Группа: Пользователи
Сообщений: 300
admin , тупо.....(( еслиб не спавнило то далбы +
Samp-Pawno.Ru forever
Сообщение admin , тупо.....(( еслиб не спавнило то далбы +Автор - Drifter96 Дата добавления - 03.02.2011 в 15:57:29
Загрузка страницы, займет меньше минуты...
Статистика Форума
Последнии темы
Читаемые темы
Лучшие пользователи
Новые пользователи