20.02.2010, 03:21
Currently we have a SAMP script that for the most part works. It is a freeroam/dm script will little extra feature. We are running into two problems however.The server spawns all cars when the server intially starts. After this, not even admins can spawn cars. Whenever a player gets into a car, drives it away, leaves it on a random street, the car will not respawn. It only respawns if the car explodes and dies.We need a scripting solution that will code in that whenever a player leaves a car, it will automatically respawn after 5 minutes of not being occupied.The second problem that we are experiencing is a very basic one that has probably been solved hundreds of times before. It is that any building entrance has both the yellow arrow to go inside it and the "Business" label and floating home under it.We need a scripting solution that eliminates all the 'business labels'Thank you for your time! Hope we can get some solutions going! (Code Below)
If you're interested in solving this problem we can send you the full code above is just the car spawning code.
Код:
#include <a_samp> #include <core> #include <float> #include "../include/gl_common.inc" #include "../include/gl_spawns.inc" //add vehicles AddStaticVehicle(425,2735.7693,-2395.2769,13.6328,91.3478,0,0); //Hunter MILITARY AddStaticVehicle(432, 2785.1946,-2436.8831,13.6343,90.3143,0,0); //Tank MILTARY //AddStaticVehicle(432,2786.0256,-2475.0281,13.6419,91.3010,0,0); //Tank MILTARY AddStaticVehicle(432,1566.1920,1171.9224,10.8125,359.3973,0,0); //Tank airport 2 AddStaticVehicle(432,1595.3130,1186.8004,10.8125,3.2972,0,0); //Tank airport 3 AddStaticVehicle(470,178.4142,1932.9073,18.0535,180.4405,6,101);// patriot area69 AddStaticVehicle(470,169.9842,1932.4008,18.3811,185.9241,6,101);// patriot area69 AddStaticVehicle(470,171.2247,1905.1343,18.3632,266.3452,6,101);// patriot area 69 AddStaticVehicle(520,1289.3530,1397.8961,10.8203,249.3196,0,1);// hydra AddStaticVehicle(520,-2227.4072,2326.7725,7.5469,94.0051,1,1);// HYDRA AddStaticVehicle(520,2763.9556,-2396.6501,13.6328,2.0469,0,0); //Hyrda MILITARY AddStaticVehicle(520,1299.4154,1406.0792,10.8203,189.8212,0,0); //Hyrda airport AddStaticVehicle(470,-1110.9086,-1637.0076,76.3604,268.1148,6,65); //Patriot // SPECIAL total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/trains.txt"); total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/pilots.txt"); // LAS VENTURAS total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/lv_law.txt"); total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/lv_airport.txt"); total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/lv_gen.txt"); // SAN FIERRO total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/sf_law.txt"); total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/sf_airport.txt"); total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/sf_gen.txt"); // LOS SANTOS total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/ls_law.txt"); total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/ls_airport.txt"); total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/ls_gen_inner.txt"); total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/ls_gen_outer.txt"); // OTHER AREAS total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/whetstone.txt"); total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/bone.txt"); total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/flint.txt"); total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/tierra.txt"); total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/red_county.txt"); //SetTimer("GameModeExitFunc", gRoundTime, 0); return 1; }