05.11.2013, 09:00
How to remove this server time in speedometer?
Код:
/////////////////////// //////SpeedoMeter4///// ///////Created by:///// ///////°Fallout°/////// /////////////////////// #include <a_samp> ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// forward CheckStatus(); ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// new PlayerVehicle[212][] = { "Landstalker", "Bravura", "Buffalo", "Linerunner", "Perrenial", "Sentinel", "Dumper", "Firetruck", "Trashmaster", "Stretch", "Manana", "Infernus", "Voodoo", "Pony", "Mule", "Cheetah", "Ambulance", "Leviathan", "Moonbeam", "Esperanto", "Taxi", "Washington", "Bobcat", "Whoopee", "BF Injection", "Hunter", "Premier", "Enforcer", "Securicar", "Banshee", "Predator", "Bus", "Rhino", "Barracks", "Hotknife", "Trailer 1", "Previon", "Coach", "Cabbie", "Stallion", "Rumpo", "RC Bandit", "Romero", "Packer", "Monster", "Admiral", "Squalo", "Seasparrow", "Pizzaboy", "Tram", "Trailer 2", "Turismo", "Speeder", "Reefer", "Tropic", "Flatbed", "Yankee", "Caddy", "Solair", "Berkley's RC Van", "Skimmer", "PCJ-600", "Faggio", "Freeway", "RC Baron", "RC Raider", "Glendale", "Oceanic", "Sanchez", "Sparrow", "Patriot", "Quad", "Coastguard", "Dinghy", "Hermes", "Sabre", "Rustler", "ZR-350", "Walton", "Regina", "Comet", "BMX", "Burrito", "Camper", "Marquis", "Baggage", "Dozer", "Maverick", "News Chopper", "Rancher", "FBI Rancher", "Virgo", "Greenwood", "Jetmax", "Hotring", "Sandking", "Blista Compact", "Police Maverick", "Boxvillde", "Benson", "Mesa", "RC Goblin", "Hotring Racer A", "Hotring Racer B", "Bloodring Banger", "Rancher", "Super GT", "Elegant", "Journey", "Bike", "Mountain Bike", "Beagle", "Cropduster","Stunt", "Tanker", "Roadtrain", "Nebula", "Majestic", "Buccaneer", "Shamal", "Hydra", "FCR-900", "NRG-500", "HPV1000", "Cement Truck", "Tow Truck", "Fortune", "Cadrona", "FBI Truck", "Willard", "Forklift", "Tractor", "Combine", "Feltzer", "Remington", "Slamvan", "Blade", "Freight", "Streak", "Vortex", "Vincent", "Bullet", "Clover", "Sadler", "Firetruck LA", "Hustler", "Intruder", "Primo", "Cargobob", "Tampa", "Sunrise", "Merit", "Utility", "Nevada", "Yosemite", "Windsor", "Monster A", "Monster B", "Uranus", "Jester", "Sultan", "Stratum", "Elegy", "Raindance", "RC Tiger", "Flash", "Tahoma", "Savanna", "Bandito", "Freight Flat", "Streak Carriage", "Kart", "Mower", "Dune", "Sweeper", "Broadway", "Tornado", "AT-400", "DFT-30", "Huntley", "Stafford", "BF-400", "News Van", "Tug", "Trailer 3", "Emperor", "Wayfarer", "Euros", "Hotdog", "Club", "Freight Carriage", "Trailer 4", "Andromada", "Dodo", "RC Cam", "Launch", "Police Car (LSPD)", "Police Car (SFPD)", "Police Car (LVPD)", "Police Ranger", "Picador", "S.W.A.T", "Alpha", "Phoenix", "Glendale", "Sadler", "Luggage Trailer A", "Luggage Trailer B", "Stairs", "Boxville", "Tiller", "Utility Trailer" }; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //Booleans new bool:TextDrawsShown[MAX_PLAYERS]; new bool:VHSCreated[MAX_PLAYERS]; //Timer new CheckStatusTimer; //4all new Text:Black0; new Text:Black1; new Text:Black2; new Text:Black3; new Text:LightBlack; //4player new Text:VHS[MAX_PLAYERS]; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// public OnFilterScriptInit() { TextDrawUseBox(Black0,1); TextDrawBoxColor(Black0,0x000000ff); TextDrawTextSize(Black0,561.000000,0.000000); TextDrawUseBox(Black1,1); TextDrawBoxColor(Black1,0x000000ff); TextDrawTextSize(Black1,480.000000,0.000000); TextDrawUseBox(Black3,1); TextDrawBoxColor(Black3,0x000000ff); TextDrawTextSize(Black3,561.000000,0.000000); TextDrawUseBox(LightBlack,1); TextDrawBoxColor(LightBlack,0x00000033); TextDrawTextSize(LightBlack,558.000000,0.000000); TextDrawAlignment(Black0,0); TextDrawAlignment(Black1,0); TextDrawAlignment(Black3,0); TextDrawAlignment(LightBlack,0); TextDrawBackgroundColor(Black0,0x000000ff); TextDrawBackgroundColor(Black1,0x000000ff); TextDrawBackgroundColor(Black3,0x000000ff); TextDrawBackgroundColor(LightBlack,0x000000ff); TextDrawFont(Black0,3); TextDrawLetterSize(Black0,0.499999,-0.099999); TextDrawFont(Black1,3); TextDrawLetterSize(Black1,1.000000,4.399999); TextDrawFont(Black3,3); TextDrawLetterSize(Black3,1.100000,5.399997); TextDrawFont(LightBlack,3); TextDrawLetterSize(LightBlack,1.000000,5.320000); TextDrawColor(Black0,0xffffffff); TextDrawColor(Black1,0xffffffff); TextDrawColor(Black3,0xffffffff); TextDrawColor(LightBlack,0xffffffff); TextDrawSetOutline(Black0,1); TextDrawSetOutline(Black1,1); TextDrawSetOutline(Black3,1); TextDrawSetOutline(LightBlack,1); TextDrawSetProportional(Black0,1); TextDrawSetProportional(Black1,1); TextDrawSetProportional(Black3,1); TextDrawSetProportional(LightBlack,1); TextDrawSetShadow(Black0,1); TextDrawSetShadow(Black1,1); TextDrawSetShadow(Black3,1); TextDrawSetShadow(LightBlack,1); Black1 = TextDrawCreate(481.000000,353.000000,""); TextDrawUseBox(Black1,1); TextDrawBoxColor(Black1,0x000000ff); TextDrawTextSize(Black1,480.000000,47.000000); TextDrawAlignment(Black1,0); TextDrawBackgroundColor(Black1,0x000000ff); TextDrawFont(Black1,3); TextDrawLetterSize(Black1,1.000000,5.399997); TextDrawColor(Black1,0xffffffff); TextDrawSetOutline(Black1,1); TextDrawSetProportional(Black1,1); TextDrawSetShadow(Black1,1); Black2 = TextDrawCreate(481.000000,405.000000,""); TextDrawUseBox(Black2,1); TextDrawBoxColor(Black2,0x000000ff); TextDrawTextSize(Black2,561.000000,47.000000); TextDrawAlignment(Black2,0); TextDrawBackgroundColor(Black2,0x000000ff); TextDrawFont(Black2,3); TextDrawLetterSize(Black2,1.000000,-0.100000); TextDrawColor(Black2,0xffffffff); TextDrawSetOutline(Black2,1); TextDrawSetProportional(Black2,1); TextDrawSetShadow(Black2,1); CheckStatusTimer = SetTimer("CheckStatus", 500, 1); } ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// public OnFilterScriptExit() { KillTimer(CheckStatusTimer); TextDrawDestroy(Text:Black0); TextDrawDestroy(Text:Black1); TextDrawDestroy(Text:Black2); TextDrawDestroy(Text:Black3); TextDrawDestroy(Text:LightBlack); for(new i=0; i<MAX_PLAYERS; i++) { TextDrawDestroy(Text:VHS[i]); } } ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// public OnPlayerConnect(playerid) { TextDrawsShown[playerid] = false; VHSCreated[playerid] = false; } ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// public CheckStatus() { for(new i=0; i<MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(IsPlayerInAnyVehicle(i)) { ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// if(TextDrawsShown[i] == false) { TextDrawShowForPlayer(i, Text:Black0); TextDrawShowForPlayer(i, Text:Black1); TextDrawShowForPlayer(i, Text:Black2); TextDrawShowForPlayer(i, Text:Black3); TextDrawShowForPlayer(i, Text:LightBlack); TextDrawsShown[i] = true; } ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// new String[128]; new Float:X, Float:Y, Float:Z, Float:Speed; GetVehicleVelocity(GetPlayerVehicleID(i), X, Y, Z); Speed = floatmul(floatsqroot(floatadd(floatadd(floatpower(X, 2), floatpower(Y, 2)), floatpower(Z, 2))), 100.0); new PlayerVehicleModelID = GetVehicleModel(GetPlayerVehicleID(i)); PlayerVehicleModelID -= 400; format(String,sizeof(String),"~b~Vehicle:~n~~w~%s~n~~b~Speed:~n~~w~%im/h~n~%ikm/h", PlayerVehicle[PlayerVehicleModelID], floatround(floatdiv(Speed, 1.609344), floatround_floor), floatround(Speed, floatround_floor)); if(VHSCreated[i] == true) { TextDrawDestroy(VHS[i]); } VHS[i] = TextDrawCreate(485.000000,355.000000,String); TextDrawAlignment(VHS[i],0); TextDrawBackgroundColor(VHS[i],0x000000ff); TextDrawFont(VHS[i],1); TextDrawLetterSize(VHS[i],0.299999,1.000000); TextDrawColor(VHS[i],0xffffffff); TextDrawSetOutline(VHS[i],1); TextDrawSetProportional(VHS[i],1); TextDrawSetShadow(VHS[i],1); TextDrawShowForPlayer(i, VHS[i]); VHSCreated[i] = true; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// } else { if(TextDrawsShown[i] == true) { TextDrawHideForPlayer(i, Text:Black0); TextDrawHideForPlayer(i, Text:Black1); TextDrawHideForPlayer(i, Text:Black2); TextDrawHideForPlayer(i, Text:Black3); TextDrawHideForPlayer(i, Text:LightBlack); TextDrawsShown[i] = false; } TextDrawHideForPlayer(i, Text:VHS[i]); } } } }