Sammeri8228
Дата: Суббота, 14.05.2016, 15:11 | Сообщение # 1
Новичок
Сообщений: 5
Статус: Offline
Привет дорогие пользиватели форума недавно в одной группе я получил бан без причин (Админи школьники) Решил сливать их F.S но переделал для мода и под себя =) И так начнём ко всем new К Define К public OnPlayerConnect(playerid)
Textdraw0[playerid] = TextDrawCreate(641.555541, 357.411102, "usebox"); TextDrawLetterSize(Textdraw0[playerid], 0.000000, 9.860125); TextDrawTextSize(Textdraw0[playerid], 471.333312, 0.000000); TextDrawAlignment(Textdraw0[playerid], 1); TextDrawColor(Textdraw0[playerid], 0); TextDrawUseBox(Textdraw0[playerid], true); TextDrawBoxColor(Textdraw0[playerid], 102); TextDrawSetShadow(Textdraw0[playerid], 0); TextDrawSetOutline(Textdraw0[playerid], 0); TextDrawFont(Textdraw0[playerid], 0); Textdraw1[playerid] = TextDrawCreate(503.111022, 376.817779, "R N 1 2 3 4 5"); TextDrawLetterSize(Textdraw1[playerid], 0.449999, 1.600000); TextDrawAlignment(Textdraw1[playerid], 1); TextDrawColor(Textdraw1[playerid], -1); TextDrawSetShadow(Textdraw1[playerid], 0); TextDrawSetOutline(Textdraw1[playerid], 1); TextDrawBackgroundColor(Textdraw1[playerid], 16711935); TextDrawFont(Textdraw1[playerid], 1); TextDrawSetProportional(Textdraw1[playerid], 1); Textdraw2[playerid] = TextDrawCreate(494.666717, 361.884399, "---------------------"); TextDrawLetterSize(Textdraw2[playerid], 0.449999, 1.600000); TextDrawAlignment(Textdraw2[playerid], 1); TextDrawColor(Textdraw2[playerid], -1); TextDrawSetShadow(Textdraw2[playerid], 0); TextDrawSetOutline(Textdraw2[playerid], 1); TextDrawBackgroundColor(Textdraw2[playerid], 51); TextDrawFont(Textdraw2[playerid], 1); TextDrawSetProportional(Textdraw2[playerid], 1); Textdraw3[playerid] = TextDrawCreate(495.111083, 387.271087, "---------------------"); TextDrawLetterSize(Textdraw3[playerid], 0.449999, 1.600000); TextDrawAlignment(Textdraw3[playerid], 1); TextDrawColor(Textdraw3[playerid], -1); TextDrawSetShadow(Textdraw3[playerid], 0); TextDrawSetOutline(Textdraw3[playerid], 1); TextDrawBackgroundColor(Textdraw3[playerid], 51); TextDrawFont(Textdraw3[playerid], 1); TextDrawSetProportional(Textdraw3[playerid], 1); Textdraw4[playerid] = TextDrawCreate(495.111297, 408.177764, "hud:radar_hostpital"); TextDrawLetterSize(Textdraw4[playerid], 0.000000, 0.000000); TextDrawTextSize(Textdraw4[playerid], 22.222198, 20.906677); TextDrawAlignment(Textdraw4[playerid], 1); TextDrawColor(Textdraw4[playerid], -1); TextDrawSetShadow(Textdraw4[playerid], 0); TextDrawSetOutline(Textdraw4[playerid], 0); TextDrawFont(Textdraw4[playerid], 4); Textdraw5[playerid] = TextDrawCreate(521.333312, 405.688873, "llllllllllllllllllll"); TextDrawLetterSize(Textdraw5[playerid], 0.508666, 2.575644); TextDrawAlignment(Textdraw5[playerid], 1); TextDrawColor(Textdraw5[playerid], -65281); TextDrawSetShadow(Textdraw5[playerid], 0); TextDrawSetOutline(Textdraw5[playerid], 1); TextDrawBackgroundColor(Textdraw5[playerid], 51); TextDrawFont(Textdraw5[playerid], 1); TextDrawSetProportional(Textdraw5[playerid], 1);
К public OnPlayerDisconnect(playerid, reason) В public OnPlayerDeath(playerid, killerid, reason) Ищите или создайте public OnPlayerStateChange(playerid, newstate, oldstate)
if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER && !IsVehiclePlane(GetPlayerVehicleID(playerid))) { // PlayerCGear[playerid] = 1; // PlayerCDGear[playerid] = 1; // PlayerGear[playerid] = 1; TextDrawShowForPlayer(playerid, Textdraw0[playerid]); TextDrawShowForPlayer(playerid, Textdraw1[playerid]); TextDrawShowForPlayer(playerid, Textdraw2[playerid]); TextDrawShowForPlayer(playerid, Textdraw3[playerid]); TextDrawShowForPlayer(playerid, Textdraw4[playerid]); TextDrawShowForPlayer(playerid, Textdraw5[playerid]); } else if(newstate == PLAYER_STATE_ONFOOT && oldstate == PLAYER_STATE_DRIVER) { //PlayerCGear[playerid] = 1; // PlayerCDGear[playerid] = 1; // PlayerGear[playerid] = 1; TextDrawHideForPlayer(playerid, Textdraw0[playerid]); TextDrawHideForPlayer(playerid, Textdraw1[playerid]); TextDrawHideForPlayer(playerid, Textdraw2[playerid]); TextDrawHideForPlayer(playerid, Textdraw3[playerid]); TextDrawHideForPlayer(playerid, Textdraw4[playerid]); TextDrawHideForPlayer(playerid, Textdraw5[playerid]); }
В public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
if (newkeys & KEY_YES) { if (IsPlayerInAnyVehicle(playerid) && !IsVehiclePlane(GetPlayerVehicleID(playerid))) { // new vehicleid = GetPlayerVehicleID(playerid); if (PlayerGear[playerid] == 5) { /*//hideallgears(playerid); if(PlayerGear[playerid] == 1) TextDrawSetString(Textdraw1[playerid], "~w~R N ~b~ 1 ~w~ 2 3 4 ~b~ 5"); if(PlayerGear[playerid] == 2) TextDrawSetString(Textdraw1[playerid], "~w~R N 1 ~b~ 2 ~w~ 3 4 ~b~ 5"); if(PlayerGear[playerid] == 3) TextDrawSetString(Textdraw1[playerid], "~w~R N 1 2 ~b~ 3 ~w~ 4 ~b~ 5"); if(PlayerGear[playerid] == 4) TextDrawSetString(Textdraw1[playerid], "~w~R N 1 2 3 ~b~ 4 ~w~ 5"); if(PlayerGear[playerid] == 5) TextDrawSetString(Textdraw1[playerid], "~w~R N 1 2 3 4 ~b~ 5); if(PlayerGear[playerid] == 6) TextDrawSetString(Textdraw1[playerid], "~w~R N 1 2 3 4 ~b~ 5); //showal(playerid); //showal1(playerid);*/ TextDrawSetString(Textdraw1[playerid], "~w~R N 1 ~w~ 2 3 4 ~b~ 5"); SetTimerEx("PlayerCTGear", 2000, false, "i", playerid); return 1; } /* if(PlayerGear[playerid] == 1) TextDrawSetString(Textdraw1[playerid], "~w~R N ~b~ 1 ~w~ 2 3 4 ~b~ 5"); if(PlayerGear[playerid] == 2) TextDrawSetString(Textdraw1[playerid], "~w~R N 1 ~b~ 2 ~w~ 3 4 ~b~ 5"); if(PlayerGear[playerid] == 3) TextDrawSetString(Textdraw1[playerid], "~w~R N 1 2 ~b~ 3 ~w~ 4 ~b~ 5"); if(PlayerGear[playerid] == 4) TextDrawSetString(Textdraw1[playerid], "~w~R N 1 2 3 ~b~ 4 ~w~ 5"); if(PlayerGear[playerid] == 5) TextDrawSetString(Textdraw1[playerid], "~w~R N 1 2 3 4 ~b~ 5); if(PlayerGear[playerid] == 6) TextDrawSetString(Textdraw1[playerid], "~w~R N 1 2 3 4 ~b~ 5);*/ else if (PlayerGear[playerid] == -1) { PlayerCGear[playerid] = 0; // SetTimerEx("PlayerCTGear", 2000, false, "i", playerid); PlayerGear[playerid]++; ////hideallgears(playerid); TextDrawSetString(Textdraw1[playerid], "~w~R ~r~ N ~w~ 1 2 3 4 5"); ////showal(playerid); ////showal1(playerid); return 1; } else if (PlayerGear[playerid] == 0) { PlayerCGear[playerid] = 0; // SetTimerEx("PlayerCTGear", 2000, false, "i", playerid); PlayerGear[playerid]++; ////hideallgears(playerid); TextDrawSetString(Textdraw1[playerid], "~w~R N ~r~ 1 ~w~ 2 3 4 5"); ////showal(playerid); ////showal1(playerid); return 1; } else if (PlayerGear[playerid] == 1) { PlayerCGear[playerid] = 0; // SetTimerEx("PlayerCTGear", 2000, false, "i", playerid); PlayerGear[playerid]++; ////hideallgears(playerid); TextDrawSetString(Textdraw1[playerid], "~w~R N 1 ~r~ 2 ~w~ 3 4 5"); ////showal(playerid); ////showal1(playerid); return 1; } else if (PlayerGear[playerid] == 2) { PlayerCGear[playerid] = 0; // SetTimerEx("PlayerCTGear", 2000, false, "i", playerid); PlayerGear[playerid]++; ////hideallgears(playerid); TextDrawSetString(Textdraw1[playerid], "~w~R N 1 2 ~r~ 3 ~w~ 4 5"); ////showal(playerid); ////showal1(playerid); return 1; } else if (PlayerGear[playerid] == 3) { PlayerCGear[playerid] = 0; // SetTimerEx("PlayerCTGear", 2000, false, "i", playerid); PlayerGear[playerid]++; ////hideallgears(playerid); TextDrawSetString(Textdraw1[playerid], "~w~R N 1 2 3 ~r~ 4 ~w~ 5"); ////showal(playerid); ////showal1(playerid); return 1; } else if (PlayerGear[playerid] == 4) { PlayerCGear[playerid] = 0; // SetTimerEx("PlayerCTGear", 2000, false, "i", playerid); PlayerGear[playerid]++; ////hideallgears(playerid); TextDrawSetString(Textdraw1[playerid], "~w~R N 1 2 3 4 ~r~ 5"); ////showal(playerid); ////showal1(playerid); return 1; } } } if (newkeys & KEY_NO) { if (IsPlayerInAnyVehicle(playerid) && !IsVehiclePlane(GetPlayerVehicleID(playerid))) { if(PlayerGear[playerid] == -1) { TextDrawSetString(Textdraw1[playerid], "~b~R ~w~ N 1 2 3 4 5"); SetTimerEx("PlayerCTGearz", 2000, false, "i", playerid); return 1; } /*//hideallgears(playerid); if(PlayerGear[playerid] == 1) TextDrawColor(Textdraw5[playerid], COLOR_INDIGO); if(PlayerGear[playerid] == 2) TextDrawColor(Textdraw0[playerid], COLOR_INDIGO); if(PlayerGear[playerid] == 3) TextDrawColor(Textdraw1[playerid], COLOR_INDIGO); if(PlayerGear[playerid] == 4) TextDrawColor(Textdraw2[playerid], COLOR_INDIGO); if(PlayerGear[playerid] == 5) TextDrawColor(Textdraw3[playerid], COLOR_INDIGO); if(PlayerGear[playerid] == 6) TextDrawColor(Textdraw4[playerid], COLOR_INDIGO); //showal(playerid); //showal1(playerid); return 1;*/ else if (PlayerGear[playerid] == 0) { // SetTimerEx("PlayerCDTGear", TDCangear, false, "i", playerid); //PlayerCDGear[playerid] = 0; PlayerGear[playerid]--; //hideallgears(playerid); TextDrawSetString(Textdraw1[playerid], "~r~R ~w~ N 1 2 3 4 5"); //showal(playerid); //showal1(playerid); return 1; } else if (PlayerGear[playerid] == 1) { // SetTimerEx("PlayerCDTGear", TDCangear, false, "i", playerid); // PlayerCDGear[playerid] = 0; PlayerGear[playerid]--; //hideallgears(playerid); TextDrawSetString(Textdraw1[playerid], "~w~R ~r~ N ~w~ 1 2 3 4 5"); //showal(playerid); //showal1(playerid); return 1; } else if (PlayerGear[playerid] == 2) { // SetTimerEx("PlayerCDTGear", TDCangear, false, "i", playerid); //PlayerCDGear[playerid] = 0; PlayerGear[playerid]--; //hideallgears(playerid); TextDrawSetString(Textdraw1[playerid], "~w~R N ~r~ 1 ~w~ 2 3 4 5"); //showal(playerid); //showal1(playerid); return 1; } else if (PlayerGear[playerid] == 3) { // SetTimerEx("PlayerCDTGear", TDCangear, false, "i", playerid); //PlayerCDGear[playerid] = 0; PlayerGear[playerid]--; //hideallgears(playerid); TextDrawSetString(Textdraw1[playerid], "~w~R N 1 ~r~ 2 ~w~ 3 4 5"); //showal(playerid); //showal1(playerid); return 1; } else if (PlayerGear[playerid] == 4) { // SetTimerEx("PlayerCDTGear", TDCangear, false, "i", playerid); PlayerGear[playerid]--; // PlayerCDGear[playerid] = 0; //hideallgears(playerid); TextDrawSetString(Textdraw1[playerid], "~w~R N 1 2 ~r~ 3 ~w~ 4 5"); //showal(playerid); //showal1(playerid); return 1; } else if (PlayerGear[playerid] == 5) { // SetTimerEx("PlayerCDTGear", TDCangear, false, "i", playerid); PlayerGear[playerid]--; // PlayerCDGear[playerid] = 0; //hideallgears(playerid); TextDrawSetString(Textdraw1[playerid], "~w~R N 1 2 3 ~r~ 4 ~w~ 5"); //showal(playerid); //showal1(playerid); return 1; } } }
В конец мода f
orward PlayerCTGear(playerid); public PlayerCTGear(playerid) { TextDrawSetString(Textdraw1[playerid], "~w~R N 1 2 3 4 ~r~ 5"); } forward PlayerCTGearz(playerid); public PlayerCTGearz(playerid) { TextDrawSetString(Textdraw1[playerid], "~r~R ~w~ N 1 2 3 4 5"); } stock hideallgears(playerid) { TextDrawSetString(Textdraw1[playerid],"~w~R N ~b~ 1 ~w~ 2 3 4 5"); } IsVehiclePlane(vehicleid) { switch(GetVehicleModel(vehicleid)) { case 592, 577, 511, 512, 593, 520, 553, 476, 519, 460, 513, 548, 425, 417, 487, 488, 497, 563, 447, 469: return 1; } new model = GetVehicleModel(vehicleid); if( // Транспорт, на который заводка двигателя просто не нужна! // Велики model == 509 || model == 481 || model == 510 // Авиация || model == 592 || model == 577 || model == 511 || model == 512 || model == 593 || model == 520 || model == 553 || model == 476 || model == 519 || model == 460 || model == 513 || model == 548 || model == 425 || model == 417 || model == 487 || model == 488 || model == 497 || model == 563 || model == 447 || model == 469 // Водный || model == 430 || model == 446 || model == 452 || model == 453 || model == 454 || model == 472 || model == 473 || model == 484 || model == 493 || model == 539 || model == 595) { return 1; } return 0; } public OnPlayerUpdate(playerid) { if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER && !IsVehiclePlane(GetPlayerVehicleID(playerid))) { if(PlayerGear[playerid] >= 1) { if(GetVehicleSpeed(GetPlayerVehicleID(playerid), 0) > (PlayerGear[playerid] * 30)) { new newspeed; newspeed = GetVehicleSpeed(GetPlayerVehicleID(playerid), 0) - (PlayerGear[playerid] * 30); ModifyVehicleSpeed(GetPlayerVehicleID(playerid), -newspeed); } } if(PlayerGear[playerid] == 0) { new newspeed; newspeed = GetVehicleSpeed(GetPlayerVehicleID(playerid), 0) - 0 * 30; ModifyVehicleSpeed(GetPlayerVehicleID(playerid), -newspeed); TextDrawSetString(Textdraw1[playerid],"~w~R ~r~ N ~w~ 1 2 3 4 5"); } if(PlayerGear[playerid] == -1) { if(!IsVehicleDrivingBackwards(GetPlayerVehicleID(playerid))) { TextDrawSetString(Textdraw1[playerid],"~r~R ~w~ N 1 2 3 4 5"); new newspeed; newspeed = GetVehicleSpeed(GetPlayerVehicleID(playerid), 0)- 0 * 30; ModifyVehicleSpeed(GetPlayerVehicleID(playerid), -newspeed); } } } new Float:health; new g = GetPlayerVehicleID(playerid); GetVehicleHealth(g,health); new x = floatround(health); if(x<=1000 && x>=960)TextDrawSetString(Textdraw5[playerid],"llllllllllllllllll"); if(x>=160.0 && x<=200) TextDrawSetString(Textdraw5[playerid], "ll"); if(x>=210.0 && x<=250) TextDrawSetString(Textdraw5[playerid], "lll"); if(x>=260.0 && x<=300) TextDrawSetString(Textdraw5[playerid], "llll"); if(x>=310.0 && x<=350) TextDrawSetString(Textdraw5[playerid], "lllll"); if(x>=360.0 && x<=400) TextDrawSetString(Textdraw5[playerid], "llllll"); if(x>=410.0 && x<=450) TextDrawSetString(Textdraw5[playerid], "lllllll"); if(x>=460.0 && x<=500) TextDrawSetString(Textdraw5[playerid], "llllllll"); if(x>=510.0 && x<=550) TextDrawSetString(Textdraw5[playerid], "lllllllll"); if(x>=560.0 && x<=600) TextDrawSetString(Textdraw5[playerid], "llllllllll"); if(x>=610.0 && x<=650) TextDrawSetString(Textdraw5[playerid], "lllllllllll"); if(x>=660.0 && x<=700) TextDrawSetString(Textdraw5[playerid], "llllllllllll"); if(x>=710.0 && x<=750) TextDrawSetString(Textdraw5[playerid], "lllllllllllll"); if(x>=760.0 && x<=800) TextDrawSetString(Textdraw5[playerid], "llllllllllllll"); if(x>=810.0 && x<=850) TextDrawSetString(Textdraw5[playerid], "lllllllllllllll"); if(x>=860.0 && x<=900) TextDrawSetString(Textdraw5[playerid], "llllllllllllllll"); if(x>=910.0 && x<=950) TextDrawSetString(Textdraw5[playerid], "lllllllllllllllll"); /*switch(x) { if(10.0&&50.0: TextDrawSetString(Textdraw5[playerid], "l"); if(60.0 &&100.0: TextDrawSetString(Textdraw5[playerid], "ll"); if(110.0&&150.0:TextDrawSetString(Textdraw5[playerid], "lll"); if(160.0 && 200.0: TextDrawSetString(Textdraw5[playerid], "llll"); if(210.0 && 250.0: TextDrawSetString(Textdraw5[playerid], "lllll"); if(260.0 && 300.0: TextDrawSetString(Textdraw5[playerid], "llllll"); if(310.0 && 350.0: TextDrawSetString(Textdraw5[playerid], "lllllll"); if(360.0 && 400.0: TextDrawSetString(Textdraw5[playerid], "llllllll"); if(410.0 && 450.0: TextDrawSetString(Textdraw5[playerid], "lllllllll"); if(460.0 && 500.0: TextDrawSetString(Textdraw5[playerid], "llllllllll"); if(510.0 && 550.0: TextDrawSetString(Textdraw5[playerid], "lllllllllll"); if(560.0 && 600.0: TextDrawSetString(Textdraw5[playerid], "llllllllllll"); if(610.0 && 650.0: TextDrawSetString(Textdraw5[playerid], "lllllllllllll"); if(660.0 && 700.0: TextDrawSetString(Textdraw5[playerid], "llllllllllllll"); if(710.0 && 750.0: TextDrawSetString(Textdraw5[playerid], "lllllllllllllll"); if(760.0 && 800.0: TextDrawSetString(Textdraw5[playerid], "llllllllllllllll"); if(810.0 && 850.0: TextDrawSetString(Textdraw5[playerid], "lllllllllllllllll"); if(860.0 && 900.0: TextDrawSetString(Textdraw5[playerid], "llllllllllllllllll"); if(910.0 && 950.0: TextDrawSetString(Textdraw5[playerid], "lllllllllllllllllll"); if(960.0 && 1000.0: TextDrawSetString(Textdraw5[playerid],"llllllllllllllllllll"); }*/ return 1; } stock ModifyVehicleSpeed(vehicleid,mph) { new Float:Vx,Float:Vy,Float:Vz,Float:DV,Float:multiple; GetVehicleVelocity(vehicleid,Vx,Vy,Vz); DV = floatsqroot(Vx*Vx + Vy*Vy + Vz*Vz); if(DV > 0) { multiple = ((mph + DV * 100) / (DV * 100)); return SetVehicleVelocity(vehicleid,Vx*multiple,Vy*multiple,Vz*multiple); } return 0; } stock IsVehicleDrivingBackwards(vehicleid) { static Float:Float[3] ; if(GetVehicleVelocity(vehicleid, Float[1], Float[2], Float[0])) { GetVehicleZAngle(vehicleid, Float[0]); if(Float[0] < 90) { if(Float[1] > 0 && Float[2] < 0) return true; } else if(Float[0] < 180) { if(Float[1] > 0 && Float[2] > 0) return true; } else if(Float[0] < 270) { if(Float[1] < 0 && Float[2] > 0) return true; } else if(Float[1] < 0 && Float[2] < 0) return true; } return false; } public OnPlayerStreamIn(playerid, forplayerid) { return 1; } stock GetVehicleSpeed(vehicleid, get3d) { new Float:x, Float:y, Float:z; GetVehicleVelocity(vehicleid, x, y, z); return SpeedCheck(x, y, z, 100.0, get3d); }
Горящие клавишы СкриныВнимание!Идет как для кр:мп,так и для са:мп
Создатель Social RP IP в ВК