Objects wont be created?
#1

Ok, i have made a simple object streamer in mt gm because i have trouble with most others and i like to make things my own AND its a good learning experiance. Antway, i have my gm here:

pawn Код:
//includes
#include <a_samp>
#include <minc2>
#include <mikefunc>
#include <defines>
#include <hay>
#include "../include/gl_common.inc"

//forwards
forward msg();
forward fixcars();
forward ccc(); //forward ccc
forward ttt();

//news
new ccar; //stores the car
new total_vehicles_from_files = 0;
new mc1;
new mc2;
new mc3;
new mc4;
new mc5;
new mc6;
new mc7;
new mc8;
new mc9;
new mc10;
new mc11;
new n1;
new n2;
new Menu:shop;
new car;
new truth;
new t1;
new engine,lights,alarm,doors,bonnet,boot,objective;//This will create the engine/lights,etc varibles
new in;
new out;
new a;

//streamer:
#define MAX_STREAMED_OBJECTS 5000 //The less the better, this will total at around 3mb AMX file size.
#define TickRate 100 //speed of streaming in ms
#define dist 250.0 //stream distance
new ObjectModel[MAX_STREAMED_OBJECTS]; //Objectmodel
new Float:ObjectPos[MAX_STREAMED_OBJECTS][3]; //ObjectPos (X, Y, Z)
new Float:ObjectRotation[MAX_STREAMED_OBJECTS][3]; //ObjectRotation (X, Y, Z)
new ObjectIDS[MAX_PLAYERS][MAX_STREAMED_OBJECTS]; //Object ID's.
new ObjectStreamed[MAX_PLAYERS][MAX_STREAMED_OBJECTS]; //Objects being viewed by a player
new ObjectID = -1; //ObjectCount
new ObjectUsed[MAX_STREAMED_OBJECTS]; //Disable = 0 enable = 1
forward Stream();

//defines
#define VEHICLE_PARAMS_UNSET    -1 //This sets if your using the params
#define VEHICLE_PARAMS_OFF  0 //This will set your params OFF
#define VEHICLE_PARAMS_ON   1 //This will set your params ON
#define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1

main()
{
    print("Party Loaded!");
}

public OnGameModeInit()
{
    //tickcount
    new StartTick, StopTick;
    StartTick = GetTickCount();

    //player markers
    ShowPlayerMarkers(PLAYER_MARKERS_MODE_GLOBAL);

    //stunt bonus
    EnableStuntBonusForAll(1);

    //weather
    SetWeather(2);

    //game mode text
    SetGameModeText("PARTY");
   
    //streamer
    SetTimer("Stream", TickRate, true);
   
    //pickups:
    in = CreatePickup(1318, 2, 155.9675, 1903.1974, 18.6533);
    out = CreatePickup(1318, 2, 955.4240, 1381.5243, 357.647);

    //player classes
    AddPlayerClass(299, 1565.5916, -1358.9417, 330.0576, 80.5222, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(1, 1565.5916, -1358.9417, 330.0576, 80.5222, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(294, 1565.5916, -1358.9417, 330.0576, 80.5222, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(291, 1565.5916, -1358.9417, 330.0576, 80.5222, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(292, 1565.5916, -1358.9417, 330.0576, 80.5222, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(286, 1565.5916, -1358.9417, 330.0576, 80.5222, 0, 0, 0, 0, 0, 0);

    //cars from files
    total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/trains.txt");
    total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/pilots.txt");
    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");
    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");
    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");
    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");
    total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/mm.txt");
    printf("Total vehicles from files: %d",total_vehicles_from_files);

    //server
    CreateStreamedObject(1508, 954.28, 1378.94, 357.01,   0.00, -90.00, 0.00);
    CreateStreamedObject(1508, 950.95, 1378.94, 357.01,   0.00, -90.00, 0.00);
    CreateStreamedObject(1508, 950.97, 1372.90, 357.01,   0.00, -90.00, 0.00);
    CreateStreamedObject(1508, 950.13, 1372.91, 357.01,   0.00, -90.00, 0.00);
    CreateStreamedObject(1508, 957.63, 1378.98, 357.01,   0.00, -90.00, 0.00);
    CreateStreamedObject(1508, 957.63, 1372.91, 353.79,   0.00, -90.00, 0.00);
    CreateStreamedObject(1508, 950.97, 1366.58, 357.01,   0.00, -90.00, 0.00);
    CreateStreamedObject(1508, 957.66, 1366.61, 357.01,   0.00, -90.00, 0.00);
    CreateStreamedObject(1508, 954.28, 1366.58, 357.01,   0.00, -90.00, 0.00);
    CreateStreamedObject(1508, 960.97, 1379.01, 357.01,   0.00, -90.00, 0.00);
    CreateStreamedObject(1508, 960.83, 1372.91, 357.01,   0.00, -90.00, 0.00);
    CreateStreamedObject(1508, 960.85, 1366.61, 357.01,   0.00, -90.00, 0.00);
    CreateStreamedObject(1508, 962.69, 1379.01, 358.58,   0.00, 0.00, 0.00);
    CreateStreamedObject(1508, 962.69, 1379.01, 361.86,   0.00, 0.00, 0.00);
    CreateStreamedObject(1508, 962.69, 1372.91, 358.58,   0.00, 0.00, 0.00);
    CreateStreamedObject(1508, 962.69, 1372.91, 361.86,   0.00, 0.00, 0.00);
    CreateStreamedObject(1508, 962.69, 1366.58, 358.58,   0.00, 0.00, 0.00);
    CreateStreamedObject(1508, 962.69, 1366.58, 361.86,   0.00, 0.00, 0.00);
    CreateStreamedObject(1508, 961.00, 1363.64, 358.58,   0.00, 0.00, 90.00);
    CreateStreamedObject(1508, 959.35, 1382.16, 361.86,   0.00, 0.00, 90.00);
    CreateStreamedObject(1508, 951.58, 1382.16, 358.58,   0.00, 0.00, 90.00);
    CreateStreamedObject(1508, 953.01, 1382.16, 361.86,   0.00, 0.00, 90.00);
    CreateStreamedObject(1508, 949.90, 1378.94, 358.58,   0.00, 0.00, 0.00);
    CreateStreamedObject(1508, 949.90, 1378.94, 361.86,   0.00, 0.00, 0.00);
    CreateStreamedObject(1508, 949.90, 1372.90, 358.58,   0.00, 0.00, 0.00);
    CreateStreamedObject(1508, 949.90, 1372.90, 361.86,   0.00, 0.00, 0.00);
    CreateStreamedObject(1508, 949.62, 1368.56, 358.58,   0.00, 0.00, 0.00);
    CreateStreamedObject(1508, 949.90, 1366.61, 361.86,   0.00, 0.00, 0.00);
    CreateStreamedObject(1508, 959.43, 1363.64, 361.86,   0.00, 0.00, 90.00);
    CreateStreamedObject(1508, 953.12, 1363.64, 358.58,   0.00, 0.00, 90.00);
    CreateStreamedObject(1508, 953.12, 1363.64, 358.58,   0.00, 0.00, 90.00);
    CreateStreamedObject(1508, 953.12, 1363.64, 361.86,   0.00, 0.00, 90.00);
    CreateStreamedObject(1508, 960.97, 1366.58, 363.70,   0.00, -90.00, 0.00);
    CreateStreamedObject(1508, 954.28, 1366.58, 363.70,   0.00, -90.00, 0.00);
    CreateStreamedObject(1508, 950.97, 1366.58, 363.70,   0.00, -90.00, 0.00);
    CreateStreamedObject(1508, 950.97, 1372.90, 363.70,   0.00, -90.00, 0.00);
    CreateStreamedObject(1508, 950.95, 1378.94, 363.70,   0.00, -90.00, 0.00);
    CreateStreamedObject(1508, 954.28, 1378.94, 363.70,   0.00, -90.00, 0.00);
    CreateStreamedObject(1508, 954.28, 1372.91, 363.70,   0.00, -90.00, 0.00);
    CreateStreamedObject(1508, 954.28, 1366.58, 363.70,   0.00, -90.00, 0.00);
    CreateStreamedObject(1508, 954.28, 1366.58, 363.70,   0.00, -90.00, 0.00);
    CreateStreamedObject(1508, 957.66, 1366.58, 363.70,   0.00, -90.00, 0.00);
    CreateStreamedObject(1508, 954.28, 1372.91, 357.01,   0.00, -90.00, 0.00);
    CreateStreamedObject(1508, 950.13, 1370.49, 357.01,   0.00, -90.00, 0.00);
    CreateStreamedObject(1508, 957.66, 1372.91, 363.70,   0.00, -90.00, 0.00);
    CreateStreamedObject(1508, 957.65, 1378.94, 363.70,   0.00, -90.00, 0.00);
    CreateStreamedObject(1508, 960.97, 1372.91, 363.70,   0.00, -90.00, 0.00);
    CreateStreamedObject(1508, 960.97, 1378.94, 363.70,   0.00, -90.00, 0.00);
    CreateStreamedObject(1499, 954.70, 1382.16, 357.00,   0.00, 0.00, 0.00);
    CreateStreamedObject(1508, 953.01, 1382.16, 361.16,   0.00, 0.00, 90.00);
    CreateStreamedObject(1508, 960.85, 1366.61, 357.01,   0.00, -90.00, 0.00);
    CreateStreamedObject(3387, 0.96, 1366.03, 356.98,   0.00, 0.00, 0.00);
    CreateStreamedObject(3387, 962.14, 1364.30, 356.96,   0.00, 0.00, 0.00);
    CreateStreamedObject(3387, 962.14, 1365.32, 356.96,   0.00, 0.00, 0.00);
    CreateStreamedObject(3387, 962.14, 1366.33, 356.96,   0.00, 0.00, 0.00);
    CreateStreamedObject(3387, 962.14, 1368.35, 356.96,   0.00, 0.00, 0.00);
    CreateStreamedObject(3387, 962.14, 1369.36, 356.96,   0.00, 0.00, 0.00);
    CreateStreamedObject(3387, 962.14, 1370.37, 356.96,   0.00, 0.00, 0.00);
    CreateStreamedObject(3387, 962.14, 1371.38, 356.96,   0.00, 0.00, 0.00);
    CreateStreamedObject(3387, 962.14, 1372.37, 356.96,   0.00, 0.00, 0.00);
    CreateStreamedObject(3387, 962.14, 1373.38, 356.96,   0.00, 0.00, 0.00);
    CreateStreamedObject(3387, 962.14, 1374.39, 356.96,   0.00, 0.00, 0.00);
    CreateStreamedObject(3387, 962.14, 1375.40, 356.96,   0.00, 0.00, 0.00);
    CreateStreamedObject(3387, 962.14, 1376.41, 356.96,   0.00, 0.00, 0.00);
    CreateStreamedObject(3387, 962.14, 1377.42, 356.96,   0.00, 0.00, 0.00);
    CreateStreamedObject(3387, 962.14, 1379.44, 356.96,   0.00, 0.00, 0.00);
    CreateStreamedObject(3387, 962.14, 1380.80, 356.96,   0.00, 0.00, 0.00);
    CreateStreamedObject(934, 952.76, 1368.00, 358.26,   0.00, 0.00, 90.00);
    CreateStreamedObject(934, 952.76, 1369.90, 358.26,   0.00, 0.00, 90.00);
    CreateStreamedObject(934, 952.76, 1371.60, 358.26,   0.00, 0.00, 90.00);
    CreateStreamedObject(934, 952.76, 1373.30, 358.26,   0.00, 0.00, 90.00);
    CreateStreamedObject(2653, 953.17, 1379.70, 363.10,   0.00, 180.00, 90.00);
    CreateStreamedObject(2653, 960.17, 1379.70, 363.10,   0.00, 180.00, 90.00);
    CreateStreamedObject(1508, 959.35, 1382.16, 358.58,   0.00, 0.00, 90.00);
    CreateStreamedObject(3813, 955.96, 1364.03, 361.86,   0.00, 0.00, 90.00);
    CreateStreamedObject(3813, 953.96, 1364.03, 361.86,   0.00, 0.00, 90.00);
    CreateStreamedObject(3813, 957.97, 1364.03, 361.86,   0.00, 0.00, 90.00);
    CreateStreamedObject(3813, 957.97, 1364.03, 360.80,   0.00, 0.00, 90.00);
    CreateStreamedObject(3813, 955.96, 1364.03, 360.80,   0.00, 0.00, 90.00);
    CreateStreamedObject(3813, 953.96, 1364.03, 360.80,   0.00, 0.00, 90.00);
    CreateStreamedObject(3389, 950.19, 1375.09, 356.93,   0.00, 0.00, 180.00);
    CreateStreamedObject(3389, 950.19, 1376.19, 356.93,   0.00, 0.00, 180.00);
    CreateStreamedObject(3389, 950.19, 1377.29, 356.93,   0.00, 0.00, 180.00);
    CreateStreamedObject(3387, 950.19, 1378.39, 356.93,   0.00, 0.00, 180.00);
    CreateStreamedObject(3387, 950.19, 1379.49, 356.93,   0.00, 0.00, 180.00);
    CreateStreamedObject(3387, 950.19, 1380.89, 356.93,   0.00, 0.00, 180.00);
    CreateStreamedObject(1508, 953.98, 1382.37, 358.58,   0.00, 0.00, 90.00);
    CreateStreamedObject(3387, 962.14, 1364.30, 359.96,   0.00, 0.00, 0.00);
    CreateStreamedObject(3387, 962.14, 1365.32, 359.96,   0.00, 0.00, 0.00);
    CreateStreamedObject(3387, 962.14, 1366.33, 359.96,   0.00, 0.00, 0.00);
    CreateStreamedObject(3387, 962.14, 1367.34, 356.96,   0.00, 0.00, 0.00);
    CreateStreamedObject(3387, 962.14, 1367.34, 359.96,   0.00, 0.00, 0.00);
    CreateStreamedObject(3387, 962.14, 1368.35, 359.96,   0.00, 0.00, 0.00);
    CreateStreamedObject(3387, 962.14, 1369.36, 359.96,   0.00, 0.00, 0.00);
    CreateStreamedObject(3387, 962.14, 1370.37, 359.96,   0.00, 0.00, 0.00);
    CreateStreamedObject(3387, 962.14, 1371.38, 359.96,   0.00, 0.00, 0.00);
    CreateStreamedObject(3387, 962.14, 1372.37, 359.96,   0.00, 0.00, 0.00);
    CreateStreamedObject(3387, 962.14, 1373.38, 359.96,   0.00, 0.00, 0.00);
    CreateStreamedObject(3387, 962.14, 1374.39, 359.96,   0.00, 0.00, 0.00);
    CreateStreamedObject(3387, 962.14, 1375.40, 359.96,   0.00, 0.00, 0.00);
    CreateStreamedObject(3387, 962.14, 1376.41, 359.96,   0.00, 0.00, 0.00);
    CreateStreamedObject(3387, 962.14, 1377.42, 359.96,   0.00, 0.00, 0.00);
    CreateStreamedObject(3387, 962.14, 1378.43, 359.96,   0.00, 0.00, 0.00);
    CreateStreamedObject(3387, 962.14, 1379.44, 3599567.00,   0.00, 0.00, 0.00);
    CreateStreamedObject(3043, 957.27, 1360.05, 358.44,   0.00, 0.00, 180.00);
    CreateStreamedObject(1508, 959.43, 1363.64, 361.50,   0.00, 0.00, 90.00);
    CreateStreamedObject(3389, 958.90, 1357.15, 356.58,   0.00, 0.00, 180.00);
    CreateStreamedObject(3389, 958.90, 1358.25, 356.58,   0.00, 0.00, 180.00);
    CreateStreamedObject(3389, 958.90, 1359.35, 356.58,   0.00, 0.00, 180.00);
    CreateStreamedObject(3389, 958.90, 1360.45, 356.58,   0.00, 0.00, 180.00);
    CreateStreamedObject(3389, 958.90, 1361.55, 356.58,   0.00, 0.00, 180.00);
    CreateStreamedObject(3389, 958.90, 1362.65, 356.58,   0.00, 0.00, 180.00);
    CreateStreamedObject(3389, 955.53, 1357.14, 356.58,   0.00, 0.00, 0.00);
    CreateStreamedObject(3389, 955.53, 1358.24, 356.58,   0.00, 0.00, 0.00);
    CreateStreamedObject(3389, 955.53, 1359.34, 356.58,   0.00, 0.00, 0.00);
    CreateStreamedObject(3389, 955.53, 1360.44, 356.58,   0.00, 0.00, 0.00);
    CreateStreamedObject(3389, 955.53, 1362.64, 356.58,   0.00, 0.00, 0.00);
    CreateStreamedObject(3389, 955.53, 1361.54, 356.58,   0.00, 0.00, 0.00);
    CreateStreamedObject(3387, 950.19, 1378.39, 359.93,   0.00, 0.00, 180.00);
    CreateStreamedObject(3387, 950.19, 1380.89, 359.93,   0.00, 0.00, 180.00);
    CreateStreamedObject(3384, 957.69, 1357.06, 357.90,   0.00, 0.00, 270.00);
    CreateStreamedObject(3384, 56.39, 1357.06, 357.90,   0.00, 0.00, 270.00);
    CreateStreamedObject(3384, 956.60, 1357.06, 357.90,   0.00, 0.00, 270.00);
    CreateStreamedObject(919, 957.19, 1358.23, 359.58,   0.00, 180.00, 90.00);
    CreateStreamedObject(3385, 957.27, 1357.84, 356.98,   0.00, 0.00, 0.00);
    CreateStreamedObject(3385, 957.28, 1358.84, 356.98,   0.00, 0.00, 0.00);
    CreateStreamedObject(3385, 957.28, 1359.84, 356.98,   0.00, 0.00, 0.00);
    CreateStreamedObject(3385, 957.28, 1360.84, 356.98,   0.00, 0.00, 0.00);
    CreateStreamedObject(3385, 957.28, 1361.84, 356.98,   0.00, 0.00, 0.00);
    CreateStreamedObject(3385, 957.28, 1362.84, 356.98,   0.00, 0.00, 0.00);
    CreateStreamedObject(3387, 960.04, 1381.86, 356.96,   0.00, 0.00, 90.00);
    CreateStreamedObject(3387, 958.94, 1381.86, 356.96,   0.00, 0.00, 90.00);
    CreateStreamedObject(3387, 957.84, 1381.86, 356.96,   0.00, 0.00, 90.00);
    CreateStreamedObject(3387, 956.78, 1381.86, 356.96,   0.00, 0.00, 90.00);
    CreateStreamedObject(3387, 961.14, 1381.86, 356.96,   0.00, 0.00, 90.00);
    CreateStreamedObject(3387, 961.14, 1381.86, 359.96,   0.00, 0.00, 90.00);
    CreateStreamedObject(3387, 960.04, 1381.86, 359.96,   0.00, 0.00, 90.00);
    CreateStreamedObject(3387, 958.94, 1381.86, 359.96,   0.00, 0.00, 90.00);
    CreateStreamedObject(3387, 957.84, 1381.86, 359.96,   0.00, 0.00, 90.00);
    CreateStreamedObject(3387, 956.78, 1381.86, 359.96,   0.00, 0.00, 90.00);
    CreateStreamedObject(3387, 951.22, 1381.86, 356.96,   0.00, 0.00, 90.00);
    CreateStreamedObject(3387, 952.28, 1381.86, 356.96,   0.00, 0.00, 90.00);
    CreateStreamedObject(3387, 953.32, 1381.86, 356.96,   0.00, 0.00, 90.00);
    CreateStreamedObject(3387, 953.32, 1381.86, 359.96,   0.00, 0.00, 90.00);
    CreateStreamedObject(3387, 952.28, 1381.86, 359.96,   0.00, 0.00, 90.00);
    CreateStreamedObject(3387, 951.22, 1381.86, 359.96,   0.00, 0.00, 90.00);
    CreateStreamedObject(16782, 950.01, 1371.36, 361.78,   0.00, 0.00, 0.00);
    CreateStreamedObject(16782, 950.07, 1368.12, 361.78,   0.00, 0.00, 0.00);
    CreateStreamedObject(16782, -119.57, 1067.66, 361.78,   0.00, 0.00, 0.00);
    CreateStreamedObject(16782, 950.00, 1365.05, 361.78,   0.00, 0.00, 0.00);
    CreateStreamedObject(16782, 949.97, 1374.34, 361.78,   0.00, 0.00, 0.00);
    CreateStreamedObject(2886, 957.81, 1381.40, 358.76,   0.00, 0.00, 0.00);
    CreateStreamedObject(2886, 958.91, 1381.40, 358.76,   0.00, 0.00, 0.00);
    CreateStreamedObject(2886, 956.71, 1381.40, 358.76,   0.00, 0.00, 0.00);
    CreateStreamedObject(2886, 960.01, 1381.40, 358.76,   0.00, 0.00, 0.00);
    CreateStreamedObject(2886, 961.11, 1381.40, 358.76,   0.00, 0.00, 0.00);
    CreateStreamedObject(3865, 944.92, 1364.33, 358.47,   0.00, 0.00, 90.00);
    CreateStreamedObject(3865, 936.27, 1364.02, 358.47,   0.00, 0.00, 99.00);
    CreateStreamedObject(1271, 926.71, 1363.05, 357.32,   0.00, 0.00, 0.00);
    CreateStreamedObject(1271, 926.71, 1364.05, 357.32,   0.00, 0.00, 0.00);
    CreateStreamedObject(1271, 927.71, 1363.55, 357.32,   0.00, 0.00, 0.00);
    CreateStreamedObject(1271, 927.16, 1363.51, 358.00,   0.00, 0.00, 0.00);
    CreateStreamedObject(1624, 928.92, 1364.85, 357.62,   0.00, 0.00, 90.00);
    CreateStreamedObject(1508, 949.90, 1372.90, 358.58,   0.00, 0.00, 0.00);
    CreateStreamedObject(3043, 928.57, 1363.26, 358.46,   0.00, 0.00, 90.00);
    CreateStreamedObject(3387, 929.98, 1361.93, 356.91,   0.00, 0.00, -90.00);
    CreateStreamedObject(3387, 928.88, 1361.93, 356.91,   0.00, 0.00, -90.00);
    CreateStreamedObject(3387, 927.78, 1361.93, 356.91,   0.00, 0.00, -90.00);
    CreateStreamedObject(3387, 926.68, 1361.93, 356.91,   0.00, 0.00, -90.00);
    CreateStreamedObject(3280, 957.03, 1363.53, 357.77,   90.00, 0.00, 0.00);
    CreateStreamedObject(3280, 957.03, 1363.53, 359.35,   90.00, 0.00, 0.00);
    CreateStreamedObject(3280, 932.04, 1362.47, 357.73,   90.00, 0.00, 90.00);
    CreateStreamedObject(3280, 932.04, 1364.04, 357.73,   90.00, 0.00, 90.00);
    CreateStreamedObject(3280, 932.04, 1364.04, 359.30,   90.00, 0.00, 90.00);
    CreateStreamedObject(3280, 932.04, 1362.47, 359.30,   90.00, 0.00, 90.00);
    CreateStreamedObject(3389, 950.19, 1377.29, 359.93,   0.00, 0.00, 180.00);
    CreateStreamedObject(3389, 950.19, 1376.19, 359.93,   0.00, 0.00, 180.00);
    CreateStreamedObject(2653, 960.31, 1375.55, 363.10,   0.00, 180.00, 0.00);
    CreateStreamedObject(2653, 960.31, 1367.69, 363.10,   0.00, 180.00, 0.00);
    CreateStreamedObject(2653, 960.31, 1359.97, 363.10,   0.00, 180.00, 0.00);
    CreateStreamedObject(3387, 962.14, 1380.80, 359.96,   0.00, 0.00, 0.00);
    CreateStreamedObject(959, 959.77, 1364.28, 357.86,   0.00, 0.00, 0.00);
    CreateStreamedObject(958, 959.77, 1364.29, 357.86,   0.00, 0.00, 0.00);
    CreateStreamedObject(1624, 959.80, 1364.40, 356.89,   0.00, 0.00, 270.00);
    CreateStreamedObject(920, 960.02, 1364.24, 359.19,   0.00, 0.00, 180.00);
    CreateStreamedObject(920, 930.53, 1364.46, 357.40,   0.00, 0.00, 0.00);
    CreateStreamedObject(2780, 928.70, 1363.57, 356.02,   270.00, -90.00, 0.00);
    CreateStreamedObject(2780, 957.04, 1360.16, 356.20,   270.00, 90.00, 0.00);
    CreateStreamedObject(18673, 949.62, 1366.42, 359.00,   0.00, 0.00, 0.00);
    CreateStreamedObject(18673, 949.62, 1369.41, 359.00,   0.00, 0.00, 0.00);
    CreateStreamedObject(18673, 950.11, 1374.59, 359.00,   0.00, 0.00, 0.00);
    CreateStreamedObject(18673, 949.90, 1372.07, 359.00,   0.00, 0.00, 0.00);
    CreateStreamedObject(18633, 950.89, 1376.14, 356.97,   90.00, 0.00, 90.00);
    CreateStreamedObject(18633, 950.89, 1377.24, 356.97,   90.00, 0.00, 90.00);
    CreateStreamedObject(18633, 950.89, 1375.04, 356.97,   90.00, 0.00, 90.00);
    CreateStreamedObject(18633, 950.89, 1378.34, 356.97,   90.00, 0.00, 90.00);
    CreateStreamedObject(18633, 950.89, 1379.44, 356.97,   90.00, 0.00, 90.00);
    CreateStreamedObject(18633, 950.89, 1379.54, 356.97,   90.00, 0.00, 90.00);
    CreateStreamedObject(18633, 950.89, 1379.24, 356.97,   90.00, 0.00, 90.00);
    CreateStreamedObject(18633, 950.89, 1378.44, 356.97,   90.00, 0.00, 90.00);
    CreateStreamedObject(18633, 950.89, 1378.14, 356.97,   90.00, 0.00, 90.00);
    CreateStreamedObject(18633, 950.89, 1380.54, 356.97,   90.00, 0.00, 90.00);
    CreateStreamedObject(18633, 950.89, 1380.74, 356.97,   90.00, 0.00, 90.00);
    CreateStreamedObject(18633, 950.89, 1380.84, 356.97,   90.00, 0.00, 90.00);
    CreateStreamedObject(18633, 951.00, 1381.16, 357.00,   90.00, 0.00, 0.00);
    CreateStreamedObject(18633, 949.90, 1380.89, 357.00,   90.00, 0.00, 0.00);
    CreateStreamedObject(18633, 951.30, 1381.16, 357.00,   90.00, 0.00, 0.00);
    CreateStreamedObject(18633, 951.12, 1381.15, 357.00,   90.00, 0.00, 0.00);
    CreateStreamedObject(18633, 952.22, 1381.15, 357.00,   90.00, 0.00, 0.00);
    CreateStreamedObject(18633, 952.12, 1381.15, 357.00,   90.00, 0.00, 0.00);
    CreateStreamedObject(18633, 952.42, 1381.15, 357.00,   90.00, 0.00, 0.00);
    CreateStreamedObject(18633, 953.32, 1381.15, 357.00,   90.00, 0.00, 0.00);
    CreateStreamedObject(18633, 953.22, 1381.15, 357.00,   90.00, 0.00, 0.00);
    CreateStreamedObject(18633, 953.52, 1381.15, 357.00,   90.00, 0.00, 0.00);
    CreateStreamedObject(18633, 956.82, 1381.15, 357.00,   90.00, 0.00, 0.00);
    CreateStreamedObject(18633, 956.72, 1381.15, 357.00,   90.00, 0.00, 0.00);
    CreateStreamedObject(18633, 957.02, 1381.15, 357.00,   90.00, 0.00, 0.00);
    CreateStreamedObject(18633, 957.82, 1381.15, 357.00,   90.00, 0.00, 0.00);
    CreateStreamedObject(18633, 957.73, 1381.16, 357.00,   90.00, 0.00, 0.00);
    CreateStreamedObject(18633, 958.02, 1381.15, 357.00,   90.00, 0.00, 0.00);
    CreateStreamedObject(18633, 957.82, 1381.15, 357.00,   90.00, 0.00, 0.00);
    CreateStreamedObject(1508, 955.80, 1372.94, 355.34,   0.00, 180.00, 0.00);
    CreateStreamedObject(1508, 959.25, 1372.92, 355.34,   0.00, 180.00, 0.00);
    CreateStreamedObject(1508, 957.85, 1375.86, 355.34,   0.00, 180.00, 90.00);
    CreateStreamedObject(1508, 958.26, 1369.66, 355.35,   0.00, 180.00, 90.00);
    CreateStreamedObject(16050, 961.74, 1366.05, 355.39,   0.00, 0.00, 0.00);
    CreateStreamedObject(16050, 961.30, 1373.16, 355.54,   0.00, 0.00, 0.00);
    CreateStreamedObject(3274, 957.91, 1376.03, 355.34,   90.00, 0.00, 0.00);
    CreateStreamedObject(3675, 956.83, 1374.36, 354.21,   -90.00, 0.00, 0.00);
    CreateStreamedObject(3280, 956.71, 1375.02, 356.99,   0.00, 0.00, 0.00);
    CreateStreamedObject(3280, 956.71, 1373.42, 356.99,   0.00, 0.00, 0.00);
    CreateStreamedObject(3280, 956.71, 1371.82, 356.99,   0.00, 0.00, 0.00);
    CreateStreamedObject(3280, 956.71, 1370.22, 356.99,   0.00, 0.00, 0.00);
    CreateStreamedObject(3280, 958.31, 1375.02, 356.99,   0.00, 0.00, 0.00);
    CreateStreamedObject(3280, 958.31, 1373.42, 356.99,   0.00, 0.00, 0.00);
    CreateStreamedObject(3280, 958.31, 1371.82, 356.99,   0.00, 0.00, 0.00);
    CreateStreamedObject(3280, 958.31, 1370.22, 356.99,   0.00, 0.00, 0.00);
    CreateStreamedObject(18633, 959.12, 1381.15, 357.00,   90.00, 0.00, 0.00);
    CreateStreamedObject(18633, 959.02, 1381.15, 357.00,   90.00, 0.00, 0.00);
    CreateStreamedObject(18633, 958.72, 1381.15, 357.00,   90.00, 0.00, 0.00);
    CreateStreamedObject(18633, 960.12, 1381.15, 357.00,   90.00, 0.00, 0.00);
    CreateStreamedObject(18633, 959.84, 1381.15, 357.00,   90.00, 0.00, 0.00);
    CreateStreamedObject(18633, 960.22, 1381.15, 357.00,   90.00, 0.00, 0.00);
    CreateStreamedObject(18633, 961.12, 1381.15, 357.00,   90.00, 0.00, 0.00);
    CreateStreamedObject(18633, 961.22, 1381.15, 357.00,   90.00, 0.00, 0.00);
    CreateStreamedObject(18633, 960.94, 1381.15, 357.00,   90.00, 0.00, 0.00);
    CreateStreamedObject(18633, 953.52, 1374.18, 356.97,   90.00, 0.00, 180.00);
    CreateStreamedObject(18633, 953.75, 1374.17, 356.97,   90.00, 0.00, 180.00);
    CreateStreamedObject(18633, 961.43, 1381.00, 357.00,   90.00, 0.00, -90.00);
    CreateStreamedObject(18633, 961.43, 1381.10, 357.00,   90.00, 0.00, -90.00);
    CreateStreamedObject(18633, 961.43, 1380.70, 357.00,   90.00, 0.00, -90.00);
    CreateStreamedObject(18633, 961.43, 1379.20, 357.00,   90.00, 0.00, -90.00);
    CreateStreamedObject(18633, 961.43, 1379.40, 357.00,   90.00, 0.00, -90.00);
    CreateStreamedObject(18633, 961.43, 1379.50, 357.00,   90.00, 0.00, -90.00);
    CreateStreamedObject(18633, 961.43, 1379.70, 357.00,   90.00, 0.00, -90.00);
    CreateStreamedObject(18633, 961.43, 1379.10, 357.00,   90.00, 0.00, -90.00);
    CreateStreamedObject(18633, 952.26, 1373.78, 357.00,   90.00, 0.00, -90.00);
    CreateStreamedObject(3387, 962.14, 1378.45, 356.96,   0.00, 0.00, 0.00);
    CreateStreamedObject(3675, 958.53, 1375.29, 353.62,   -90.00, 0.00, 0.00);
    CreateStreamedObject(3274, 956.91, 1375.71, 354.19,   90.00, 0.00, 0.00);
    CreateStreamedObject(18633, 961.43, 1378.20, 357.00,   90.00, 0.00, -90.00);
    CreateStreamedObject(18633, 961.43, 1378.50, 357.00,   90.00, 0.00, -90.00);
    CreateStreamedObject(18633, 961.43, 1378.40, 357.00,   90.00, 0.00, -90.00);
    CreateStreamedObject(18633, 961.43, 1377.50, 357.00,   90.00, 0.00, -90.00);
    CreateStreamedObject(18633, 967.63, 1378.83, 357.00,   90.00, 0.00, -90.00);
    CreateStreamedObject(18633, 961.43, 1377.40, 357.00,   90.00, 0.00, -90.00);
    CreateStreamedObject(18633, 961.43, 1377.20, 357.00,   90.00, 0.00, -90.00);
    CreateStreamedObject(18633, 961.43, 1376.20, 357.00,   90.00, 0.00, -90.00);
    CreateStreamedObject(18633, 961.43, 1376.40, 357.00,   90.00, 0.00, -90.00);
    CreateStreamedObject(18633, 961.43, 1376.50, 357.00,   90.00, 0.00, -90.00);
    CreateStreamedObject(18633, 961.43, 1375.20, 357.00,   90.00, 0.00, -90.00);
    CreateStreamedObject(18633, 961.43, 1375.50, 357.00,   90.00, 0.00, -90.00);
    CreateStreamedObject(18633, 961.43, 1375.40, 357.00,   90.00, 0.00, -90.00);
    CreateStreamedObject(18633, 961.43, 1374.20, 357.00,   90.00, 0.00, -90.00);
    CreateStreamedObject(18633, 961.43, 1374.50, 357.00,   90.00, 0.00, -90.00);
    CreateStreamedObject(18633, 961.43, 1374.40, 357.00,   90.00, 0.00, -90.00);
    CreateStreamedObject(18633, 961.43, 1373.20, 357.00,   90.00, 0.00, -90.00);
    CreateStreamedObject(18633, 961.43, 1373.50, 357.00,   90.00, 0.00, -90.00);
    CreateStreamedObject(18633, 961.43, 1373.40, 357.00,   90.00, 0.00, -90.00);
    CreateStreamedObject(18633, 961.43, 1372.20, 357.00,   90.00, 0.00, -90.00);
    CreateStreamedObject(18633, 961.43, 1372.50, 357.00,   90.00, 0.00, -90.00);
    CreateStreamedObject(18633, 961.43, 1372.40, 357.00,   90.00, 0.00, -90.00);
    CreateStreamedObject(18633, 961.43, 1371.20, 357.00,   90.00, 0.00, -90.00);
    CreateStreamedObject(18633, 961.43, 1371.50, 357.00,   90.00, 0.00, -90.00);
    CreateStreamedObject(18633, 961.43, 1371.40, 357.00,   90.00, 0.00, -90.00);
    CreateStreamedObject(18633, 961.43, 1370.20, 357.00,   90.00, 0.00, -90.00);
    CreateStreamedObject(18633, 961.43, 1370.50, 357.00,   90.00, 0.00, -90.00);
    CreateStreamedObject(18633, 961.43, 1370.40, 357.00,   90.00, 0.00, -90.00);
    CreateStreamedObject(18633, 961.43, 1369.20, 357.00,   90.00, 0.00, -90.00);
    CreateStreamedObject(18633, 961.43, 1369.50, 357.00,   90.00, 0.00, -90.00);
    CreateStreamedObject(18633, 961.43, 1369.40, 357.00,   90.00, 0.00, -90.00);
    CreateStreamedObject(18633, 961.43, 1368.40, 357.00,   90.00, 0.00, -90.00);
    CreateStreamedObject(18633, 961.43, 1368.20, 357.00,   90.00, 0.00, -90.00);
    CreateStreamedObject(18633, 961.43, 1368.50, 357.00,   90.00, 0.00, -90.00);
    CreateStreamedObject(18633, 961.43, 1367.20, 357.00,   90.00, 0.00, -90.00);
    CreateStreamedObject(18633, 961.43, 1367.50, 357.00,   90.00, 0.00, -90.00);
    CreateStreamedObject(18633, 961.43, 1367.40, 357.00,   90.00, 0.00, -90.00);
    CreateStreamedObject(18633, 961.43, 1366.20, 357.00,   90.00, 0.00, -90.00);
    CreateStreamedObject(18633, 961.43, 1366.50, 357.00,   90.00, 0.00, -90.00);
    CreateStreamedObject(18633, 961.43, 1366.40, 357.00,   90.00, 0.00, -90.00);
    CreateStreamedObject(18633, 961.43, 1365.20, 357.00,   90.00, 0.00, -90.00);
    CreateStreamedObject(18633, 961.43, 1365.50, 357.00,   90.00, 0.00, -90.00);
    CreateStreamedObject(18633, 961.43, 1365.40, 357.00,   90.00, 0.00, -90.00);
    CreateStreamedObject(18633, 961.43, 1364.20, 357.00,   90.00, 0.00, -90.00);
    CreateStreamedObject(18633, 961.43, 1364.50, 357.00,   90.00, 0.00, -90.00);
    CreateStreamedObject(18633, 961.43, 1364.40, 357.00,   90.00, 0.00, -90.00);
    CreateStreamedObject(10444, 956.36, 1374.85, 355.87,   0.00, 0.00, 0.00);
    CreateStreamedObject(18749, 958.92, 1364.81, 358.60,   -15.00, 0.00, 180.00);
    CreateStreamedObject(18648, 957.98, 1371.42, 355.32,   0.00, 0.00, 0.00);
    CreateStreamedObject(18741, 956.36, 1374.85, 354.42,   0.00, 0.00, 0.00);
    CreateStreamedObject(1508, 949.97, 1360.40, 358.58,   0.00, 0.00, 0.00);
    CreateStreamedObject(2008, 950.65, 1366.61, 356.97,   0.00, 0.00, 0.00);
    CreateStreamedObject(2008, 952.83, 1366.65, 356.97,   0.00, 0.00, 0.00);

    //cars
    mc1 = AddStaticVehicle(562, 1797.8432,-1301.8840,13.5087, 357.3673, 7, 7);
    mc2 = AddStaticVehicle(562, 1827.1270, -1278.4496, 131.7344, 356.2112, 13, 13); // mc2
    mc3 = AddStaticVehicle(562,-1380.2383,-60.9142,5.8340,359.8493,122,1); // mc3
    mc4 = AddStaticVehicle(562,-1372.3546,-61.3774,5.8342,0.4200,122,1); // mc4
    mc5 = AddStaticVehicle(562,-1363.7715,-61.5484,5.8340,359.0742,122,1); // mc5
    mc6 = AddStaticVehicle(562,-1337.0522,-67.5196,5.8342,270.4945,122,1); // mc6
    mc7 = AddStaticVehicle(562,-1336.8188,-79.5637,5.8341,269.1048,122,1); // mc7
    mc8 = AddStaticVehicle(562,-1386.3369,-71.5868,5.8337,89.8659,122,1); // mc8
    mc9 = AddStaticVehicle(562,-1369.8386,-88.1138,5.8341,267.1925,122,1); // mc9
    mc10 = AddStaticVehicle(562,-1369.6626,-96.2473,5.8342,269.5889,122,1); // mc10
    mc11 = AddStaticVehicle(562,-1371.1698,-120.6941,5.8340,270.9391,122,1); // mc11
    ccar = AddStaticVehicle(562,2324.3391,-1270.5941,22.1586,180.6980,122,1); // ccar
    car = AddStaticVehicle(603,426.9448,2493.6545,17.0369,88.2769,21,36); // car
    truth = AddStaticVehicle(483,1834.5129,-1281.0243,131.3930,0.9327,13,13); // truth
   
    //menus
    shop = CreateMenu("Shop", 2, 200.0, 100.0, 150.0, 150.0);
    AddMenuItem(shop, 0, "Pistols");
    AddMenuItem(shop, 0, "Pistols");
    AddMenuItem(shop, 0, "Pistols");
    AddMenuItem(shop, 0, "Shotguns");
    AddMenuItem(shop, 0, "Shotguns");
    AddMenuItem(shop, 0, "Shotguns");
    AddMenuItem(shop, 0, "Sub Machine guns");
    AddMenuItem(shop, 0, "Sub Machine guns");
    AddMenuItem(shop, 0, "Sub Machine guns");
    AddMenuItem(shop, 0, "Machine guns");
    AddMenuItem(shop, 0, "Machine guns");
    AddMenuItem(shop, 0, "Rifles");
    AddMenuItem(shop, 1, "9mm($2000)");
    AddMenuItem(shop, 1, "Silenced pistol($1000)");
    AddMenuItem(shop, 1, "Desert Eagle($2500)");
    AddMenuItem(shop, 1, "Shotgun($2000)");
    AddMenuItem(shop, 1, "Sawn-Offs($5000)");
    AddMenuItem(shop, 1, "SPAS($4000)");
    AddMenuItem(shop, 1, "Tec9($3000)");
    AddMenuItem(shop, 1, "UZI($3000)");
    AddMenuItem(shop, 1, "SMG($3500)");
    AddMenuItem(shop, 1, "AK-47($2000)");
    AddMenuItem(shop, 1, "M4($2000)");
    AddMenuItem(shop, 1, "Sniper($6000)");

    //CAR ENGINE/LIGHTS
    ManualVehicleEngineAndLights();

    //rcon commands
    SendRconCommand("reloadfs ls_elevator");

    //car licence plate loop
    for(new i=0; i<MAX_VEHICLES; i++)
    {
        if(i == mc1 || i == mc2 || i == mc3 || i == mc4 || i == mc4 || i == mc5 || i == mc6 || i == mc7 || i == mc8 || i == mc9 || i == mc10 || i == mc11)
        {
            SetVehicleNumberPlate(i, "PARTY");
            SetVehicleToRespawn(i);
        }
        else if(i == car)
        {
            SetVehicleNumberPlate(i, "*LOL*");
            SetVehicleToRespawn(i);
        }
        else if(i == truth)
        {
            SetVehicleNumberPlate(i, "HTURT");
            SetVehicleToRespawn(i);
        }
        else if(i == ccar)
        {
            SetVehicleNumberPlate(i, "CCAR"); //sets the cars number plate
            SetVehicleToRespawn(i); //respawns it (VERY IMPORTANT!!!)
        }
        else
        {
            SetVehicleToRespawn(i);
        }
    }

    //timers
    SetTimer("ccc", 500, 1); //sets the timer
    SetTimer("fixcars", 5000, 1);
    SetTimer("msg", 60 * 30000, 1);
    SetTimer("ttt", 1000, false);

    for(new i=0; i<MAX_OBJECTS; i++)
    {
        if(IsValidObject(i))
        {
            a++;
        }
    }
    printf("Unstreamed Objects: %i", a);

    //tickcount
    StopTick = GetTickCount();
    t1 = StopTick - StartTick;
    printf("GameMode Loaded In: %i ms!", t1);
    return 1;
}

public OnGameModeExit()
{
    //tickcount
    new StartTick, StopTick;
    StartTick = GetTickCount();

    Vclear(); //clears all cars
    DestroyVehicle(ccar); //destroys the car
    DestroyAllObjects(); //destroys all objects
    Wait(5); //waits 5 ms
    DestroyPickup(out);
    DestroyPickup(in);
    a = 0;
   
    //tickcount
    StopTick = GetTickCount();
    t1 = StopTick - StartTick;
    printf("GameMode UnLoaded In: %i ms!", t1);
    return 1;
}

public OnPlayerConnect(playerid)
{
    CountPlayersOnline(); //counts and prints the # of players online
    SendConnectMessage(playerid); //sends the connect message
    UsePlayerPedAnims(); //use player ped anims
    GameTextForPlayer(playerid,"~R~PARTY TIME",3000,4); //game text
    Wait(5); //waits 5 ms
    return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    SendDisconnectMessage(playerid, reason); //disconnect message
    Wait(5); //waits 5 ms
    return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerFacingAngle(playerid, 80.5222); //sets the players angle
    SetPlayerPos(playerid, 1565.5916, -1358.9417, 330.0576); //sets the players position
    SetPlayerCameraPos(playerid, 1554.3995, -1357.9331, 329.4581); //sets the camera position
    SetPlayerCameraLookAt(playerid, 1565.5916, -1358.9417, 330.0576); //makes the camera look at the player
    return 1;
}

public OnPlayerSpawn(playerid)
{
    SetWeather(2); //sets the weather
    GivePlayerWeapon(playerid, PARACHUTE, 1); //gives the player a parachute
    GivePlayerWeapon(playerid, WEAPON_MP5, 999999); //gives the player a mp5
    SetPlayerHealthAndArmour(playerid, 100); //sets the players health to 100
    GivePlayerMoney(playerid, 350); //gives the player money
    SetPlayerSkillLevel(playerid,WEAPONSKILL_PISTOL,2000); //sets the players weapon skill
    SetPlayerSkillLevel(playerid,WEAPONSKILL_PISTOL_SILENCED,2000); //sets the players weapon skill
    SetPlayerSkillLevel(playerid,WEAPONSKILL_DESERT_EAGLE,2000); //sets the players weapon skill
    SetPlayerSkillLevel(playerid,WEAPONSKILL_SHOTGUN,2000); //sets the players weapon skill
    SetPlayerSkillLevel(playerid,WEAPONSKILL_SAWNOFF_SHOTGUN,2000); //sets the players weapon skill
    SetPlayerSkillLevel(playerid,WEAPONSKILL_SPAS12_SHOTGUN,2000); //sets the players weapon skill
    SetPlayerSkillLevel(playerid,WEAPONSKILL_MICRO_UZI,2000); //sets the players weapon skill
    SetPlayerSkillLevel(playerid,WEAPONSKILL_MP5,2000); //sets the players weapon skill
    SetPlayerSkillLevel(playerid,WEAPONSKILL_AK47,2000); //sets the players weapon skill
    SetPlayerSkillLevel(playerid,WEAPONSKILL_M4,2000); //sets the players weapon skill
    SetPlayerSkillLevel(playerid,WEAPONSKILL_SNIPERRIFLE,2000);//sets the players weapon skill
    SetPlayerPos(playerid, 959.8422, 1379.3899, 358.0047);
    SetPlayerFacingAngle(playerid, 207.0);
    Wait(5); //waits 5 ms
    return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
    SendDeathMessage(killerid, playerid, reason); //sends the death message
    GivePlayerMoney(playerid, -10); //takes away 10 bucks
    GivePlayerMoney(killerid, 100); //gives 100 bucks
    Wait(5); //waits 5 ms
    return 1;
}

public OnPlayerText(playerid, text[])
{
    if((GetTickCount() - GetPVarInt(playerid, "AntiSpam")) > 1000) //if the player spammed basically
    {
        new string[128], name[MAX_PLAYER_NAME]; //defines the players name and string
        GetPlayerName(playerid, name, sizeof(name)); //gets the players name
        format(string, sizeof(string), "%s (%i): %s", name, playerid, text); //formats the message
        SendClientMessageToAll(COLOR_WHITE, string); //sends the message to all
        SetPVarInt(playerid, "AntiSpam", GetTickCount()); //sets the players PVar
        SetPlayerChatBubble(playerid, text, COLOR_RED, 40, 5000); //sets the players chat bubble
        printf(" ", string); //ptints the chat
        Wait(5); //waits 5 ms
    }
    else
    {
        SendClientMessage(playerid, COLOR_RED, "You must wait at least 1 second before using the chat again."); //sends the antispam message
        Wait(5); //waits 5 ms
    }
    return 0;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    dcmd(kill, 4, cmdtext);
    dcmd(healme, 6, cmdtext);
    dcmd(help, 4, cmdtext);
    dcmd(rules, 5, cmdtext);
    dcmd(cars, 4, cmdtext);
    dcmd(area69, 6, cmdtext);
    dcmd(shop, 4, cmdtext);
    dcmd(me, 2, cmdtext);
    dcmd(spin, 4, cmdtext);
    dcmd(hop, 3, cmdtext);
    dcmd(goto, 4, cmdtext);
    return 0;
}

public OnVehicleSpawn(vehicleid)
{
    new i = vehicleid;

    if(i == mc1 || i == mc2 || i == mc3 || i == mc4 || i == mc4 || i == mc5 || i == mc6 || i == mc7 || i == mc8 || i == mc9 || i == mc10 || i == mc11)
    {
        ChangeVehiclePaintjob(vehicleid,0); // paint job
        AddVehicleComponent(vehicleid, 1035); // roof
        AddVehicleComponent(vehicleid, 1079); // rim
        AddVehicleComponent(vehicleid, 1037); // exhaust
        AddVehicleComponent(vehicleid, 1039); // side
        AddVehicleComponent(vehicleid, 1172); // front
        AddVehicleComponent(vehicleid, 1146); // Spoiler
        AddVehicleComponent(vehicleid, NITROX10); // Spoiler
    }
    else if(i == truth)
    {
        ChangeVehiclePaintjob(i, 0); // paint job
        AddVehicleComponent(vehicleid, NITROX10); // Nitrous
    }
    else if(i == ccar)
    {
        ChangeVehiclePaintjob(vehicleid,0); // paint job
        AddVehicleComponent(vehicleid, 1035); // roof
        AddVehicleComponent(vehicleid, 1079); // rim
        AddVehicleComponent(vehicleid, 1037); // exhaust
        AddVehicleComponent(vehicleid, 1039); // side
        AddVehicleComponent(vehicleid, 1172); // front
        AddVehicleComponent(vehicleid, 1146); // Spoiler
        AddVehicleComponent(vehicleid, NITROX10); // Nitrous
        SendClientMessageToAll(0xFF0000FF, "The ChaseCar Respawned!!!"); //message
    }
    return 1;
}

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if(vehicleid == ccar) //if vehicleid == ccar
    {
        new name[MAX_PLAYER_NAME], string[44]; //defines name and string
        GetPlayerName(playerid, name, sizeof(name)); //gets the players name
        format(string, sizeof(string), "%s has taken the ChaseCar!",name); //formats the message
        SendClientMessageToAll(0xFF0000FF, string); //sends the message
    }
    GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
    SetVehicleParamsEx(vehicleid, VEHICLE_PARAMS_ON, VEHICLE_PARAMS_ON, alarm, doors, bonnet, boot, objective);
    Wait(5); //waits 5 ms
    return 1;
}

public OnPlayerExitVehicle(playerid, vehicleid)
{
    if(vehicleid == ccar) //if vehicleid == ccar
    {
        new name[MAX_PLAYER_NAME], string[44]; //defines name and string
        GetPlayerName(playerid, name, sizeof(name)); //gets the players name
        format(string, sizeof(string), "%s has left the ChaseCar!",name); //formats the message
        SendClientMessageToAll(0xFF0000FF, string); //sends the message
    }
    GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
    SetVehicleParamsEx(vehicleid, VEHICLE_PARAMS_OFF, VEHICLE_PARAMS_OFF, alarm, doors, bonnet, boot, objective);
    Wait(5); //waits 5 ms
    return 1;
}

public OnPlayerUpdate(playerid)
{
    if(!IsPlayerConnected(playerid)) return 0; //if player isnt connected, return 0

    // No weapons in interiors
    if(GetPlayerInterior(playerid) != 0 && GetPlayerWeapon(playerid) != 0)
    {
        if(!IsPlayerAdmin(playerid)) //is player admin?
        {
            SendClientMessage(playerid, COLOR_RED, "NO WEAPONS IN INTERIORS!"); //message
            SetPlayerArmedWeapon(playerid,0); // fists
            Wait(5); //waits 5 ms
            return 0; // no syncing until they change their weapon
        }
    }

    // Don't allow minigun
    if(GetPlayerWeapon(playerid) == WEAPON_MINIGUN)
    {
        if(!IsPlayerAdmin(playerid)) //is player admin?
        {
            SendClientMessage(playerid, COLOR_RED, "NO MINIGUUNS!"); //message
            Kick(playerid); //kicks the player
        }
        return 0;
    }

    //No jetpacks allowed
    if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USEJETPACK)
    {
        if(!IsPlayerAdmin(playerid)) //is player admin?
        {
            SendClientMessage(playerid, COLOR_RED, "NO JETPACKS!"); //message
            Kick(playerid); //kicks the player
        }
        return 0;
    }
    return 1;
}

public OnPlayerSelectedMenuRow(playerid, row)
{
new Menu:CurrentMenu = GetPlayerMenu(playerid); //defines CurrentMenu

if(CurrentMenu == shop) //is CurrentMenu == shop
{
    switch(row) //switches via row
    {
        case 0: //Pistol
        {
        if(GetPlayerMoney(playerid) < 2000) return SendClientMessage(playerid, COLOR_RED, "You don't have enough cash.");
        GivePlayerWeapon(playerid,22,300);
        GivePlayerMoney(playerid, -2000);
        ShowMenuForPlayer(shop,playerid);
        }
        case 1: //Slienced
        {
        if(GetPlayerMoney(playerid) < 1000) return SendClientMessage(playerid, COLOR_RED, "You don't have enough cash.");
        GivePlayerWeapon(playerid,23,500);
        GivePlayerMoney(playerid, -1000);
        ShowMenuForPlayer(shop,playerid);
        }
        case 2: //Deag;e
        {
        if(GetPlayerMoney(playerid) < 2500) return SendClientMessage(playerid, COLOR_RED, "You don't have enough cash.");
        GivePlayerWeapon(playerid,24,150);
        GivePlayerMoney(playerid,-2500);
        ShowMenuForPlayer(shop,playerid);
        }
        case 3: //Shotugn
        {
        if(GetPlayerMoney(playerid) < 2000) return SendClientMessage(playerid, COLOR_RED, "You don't have enough cash.");
        GivePlayerWeapon(playerid,25,100);
        GivePlayerMoney(playerid,-2000);
        ShowMenuForPlayer(shop,playerid);
        }
        case 4: //Sawn-offs
        {
        if(GetPlayerMoney(playerid) < 5000) return SendClientMessage(playerid, COLOR_RED, "You don't have enough cash.");
        GivePlayerWeapon(playerid,26,100);
        GivePlayerMoney(playerid,-5000);
        ShowMenuForPlayer(shop,playerid);
        }
        case 5: //SPAS
        {
        if(GetPlayerMoney(playerid) < 4000) return SendClientMessage(playerid, COLOR_RED, "You don't have enough cash.");
        GivePlayerWeapon(playerid,27,100);
        GivePlayerMoney(playerid,-4000);
        ShowMenuForPlayer(shop,playerid);
        }
        case 6: //tec9
        {
        if(GetPlayerMoney(playerid) < 3000) return SendClientMessage(playerid, COLOR_RED, "You don't have enough cash.");
        GivePlayerWeapon(playerid,32,180);
        GivePlayerMoney(playerid,-3000);
        ShowMenuForPlayer(shop,playerid);
        }
        case 7: //UZI
        {
        if(GetPlayerMoney(playerid) < 3000) return SendClientMessage(playerid, COLOR_RED, "You don't have enough cash.");
        GivePlayerWeapon(playerid,28,180);
        GivePlayerMoney(playerid,-3000);
        ShowMenuForPlayer(shop,playerid);
        }
        case 8: //SMG
        {
        if(GetPlayerMoney(playerid) < 3500) return SendClientMessage(playerid, COLOR_RED, "You don't have enough cash.");
        GivePlayerWeapon(playerid,29,120);
        GivePlayerMoney(playerid,-3500);
        ShowMenuForPlayer(shop,playerid);
        }
        case 9: //AK-47
        {
        if(GetPlayerMoney(playerid) < 2000) return SendClientMessage(playerid, COLOR_RED, "You don't have enough cash.");
        GivePlayerWeapon(playerid,30,150);
        GivePlayerMoney(playerid,-2000);
        ShowMenuForPlayer(shop,playerid);
        }
        case 10: //M4
        {
        if(GetPlayerMoney(playerid) < 2000) return SendClientMessage(playerid, COLOR_RED, "You don't have enough cash.");
        GivePlayerWeapon(playerid,31,150);
        GivePlayerMoney(playerid,-2000);
        ShowMenuForPlayer(shop,playerid);
        }
        case 11: //sniper
        {
        if(GetPlayerMoney(playerid) < 6000) return SendClientMessage(playerid, COLOR_RED, "You don't have enough cash.");
        GivePlayerWeapon(playerid,34,150);
        GivePlayerMoney(playerid,-6000);
        ShowMenuForPlayer(shop,playerid);
        }
    }
}
return 1;
}

public ccc() //public
{
    for(new i=0; i < MAX_PLAYERS; i++) //loop
    {
        if(IsPlayerInCar(i)) //if player is in car
        {
            if(GetPlayerVehicleID(i) == ccar) //if player car == ccar
            {
                GivePlayerMoney(i, 100); //gives player money
            }
        }
    }
}

public fixcars()
{
    for(new i=0; i<MAX_VEHICLES; i++) //loop
    {
        if(i == ccar) //if the car is ccar
        {
        }
        else
        {
            RepairVehicle(i); //repairs it
            SetVehicleHealth(i, 1000); //sets the cars health
            Wait(1); //waits 1 ms
        }
    }
}

public msg()
{
    ClearChat();
    SendClientMessageToAll(COLOR_RED, "Please remember to use /help and follow the /rules!!!!!"); //message
    SendClientMessageToAll(COLOR_RED, "Also, please know that this server is about %%42 done. :D THX!"); //message
    Wait(5); //waits 5 ms
}

public ttt()
{
    for(new i=0; i<MAX_VEHICLES; i++)
    {
        if(i == mc1 || i == mc2 || i == mc3 || i == mc4 || i == mc4 || i == mc5 || i == mc6 || i == mc7 || i == mc8 || i == mc9 || i == mc10 || i == mc11 || i == car || i == ccar || i == truth)
        {
            n1 = CreateObject(18648,0,0,0,0,0,0);
            n2 = CreateObject(18648,0,0,0,0,0,0);
            AttachObjectToVehicle(n1, i, -0.7, 0.0, -0.70, 0.0, 0.0, 0.0);
            AttachObjectToVehicle(n2, i, 0.7, 0.0, -0.70, 0.0, 0.0, 0.0);
            Wait(5); //waits 5 ms
        }
    }
}

dcmd_healme(playerid, params[])
{
    #pragma unused params
    SetPlayerHealthAndArmour(playerid, 100); //sets the players health
    SendClientMessage(playerid, COLOR_RED, "You have been healed!"); //sends the message
    return 1;
}

dcmd_kill(playerid, params[])
{
    #pragma unused params
    SetPlayerHealthAndArmour(playerid, 0); //sets the players health
    SendClientMessage(playerid, COLOR_RED, "You have been killed!"); //sends the message
    return 1;
}

dcmd_cars(playerid, params[])
{
    #pragma unused params
    SetPlayerPos(playerid, -1377.9780, -103.9513, 6.0000); //sets the players position
    SetPlayerFacingAngle(playerid, 1.3191); //sets the players angle
    return 1;
}

dcmd_area69(playerid, params[])
{
    #pragma unused params
    Wait(5); //waits 5 ms
    SetPlayerPos(playerid, 214.4333, 1880.9895, 13.1879); //sets the players position
    SetPlayerFacingAngle(playerid, 1.3191); //sets the players angle
    return 1;
}

dcmd_me(playerid, params[])
{
    new pname[MAX_PLAYER_NAME], str[128];
    GetPlayerName(playerid, pname, sizeof(pname));
    format(str, sizeof(str), "*%s %s", pname, params);
    SendClientMessageToAll(COLOR_YELLOW, str);
    return 1;
}

dcmd_hop(playerid, params[])
{
    #pragma unused params
    if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,COLOR_YELLOW,"You need to be in a vehicle"); //vehicle message
    SetVehicleVelocity(GetPlayerVehicleID(playerid), 0, 0, 5); //sets the vehicles velocity
    return 1;
}

dcmd_spin(playerid, params[])
{
    #pragma unused params
    if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,COLOR_YELLOW,"You need to be in a vehicle"); //vehicle message
    SetVehicleAngularVelocity(GetPlayerVehicleID(playerid), 0, 0, 50.0); //sets the vehicles velocity
    return 1;
}

dcmd_help(playerid, params[])
{
    #pragma unused params
    SendClientMessage(playerid, COLOR_RED, "-------HELP-------"); //message
    SendClientMessage(playerid, COLOR_RED, "COMMANDS: /help, /rules, /kill, /healme, /cars, /me, /spin, /hop, /shop, /area69"); //message
    SendClientMessage(playerid, COLOR_RED, "Cars will automatically fix themselvs"); //message
    SendClientMessage(playerid, COLOR_RED, "Cars with licence plate: PARTY will tune themselvs"); //message
    SendClientMessage(playerid, COLOR_RED, "If you are in the car with licence plate: CCAR you will get $200 a second."); //message
    SendClientMessage(playerid, COLOR_RED, "This vehicle, CCAR, is the ChaseCar hence the CCAR."); //message
    SendClientMessage(playerid, COLOR_RED, "-------HELP-------"); //message
    return 1;
}

dcmd_rules(playerid, params[])
{
    #pragma unused params
    SendClientMessage(playerid, COLOR_RED, "-------RULES-------"); //message
    SendClientMessage(playerid, COLOR_RED, "Do Not Spawnkill"); //message
    SendClientMessage(playerid, COLOR_RED, "Do Not Hack"); //message
    SendClientMessage(playerid, COLOR_RED, "Do Not Cheat"); //message
    SendClientMessage(playerid, COLOR_RED, "Do Not Be An Asshole"); //message
    SendClientMessage(playerid, COLOR_RED, "Have Fun"); //message
    SendClientMessage(playerid, COLOR_RED, "-------RULES-------"); //message
    return 1;
}

dcmd_goto(playerid, params[])
{
    Wait(5); //waits 5 ms
    new otherplayer = strval(params); //strval
    if(!IsPlayerConnected(otherplayer)) return SendClientMessage(playerid,COLOR_RED,"The player is not connected");//!connected message
    Goto(playerid, otherplayer); //goto
    return 1;
}

dcmd_shop(playerid, params[])
{
    #pragma unused params
    ShowMenuForPlayer(shop,playerid); //shows the shop menu
    return 1;
}

stock CreateStreamedObject(modelid,Float:x,Float:y,Float:z,Float:rx,Float:ry,Float:rz)
{
    ObjectID++; //ObjectID
    ObjectModel[ObjectID] = modelid; //Model
    ObjectPos[ObjectID][0] = x; //XPos
    ObjectPos[ObjectID][1] = y; //YPos
    ObjectPos[ObjectID][2] = z; //ZPos
    ObjectRotation[ObjectID][0] = rx; //RotationX
    ObjectRotation[ObjectID][1] = ry;//RotationY
    ObjectRotation[ObjectID][2] = rz; //RotationZ
    ObjectUsed[ObjectID] = 1; //Disable/enable the object, it's starting off being enabled.
}

stock DestroyStreamedObject(ObjectId) //Destroys the object
{
    ObjectUsed[ObjectId] = 0;
    for(new i; i<MAX_PLAYERS; i++)
    {
        if(ObjectStreamed[i][ObjectId] == 1)
        {
            ObjectStreamed[i][ObjectId] = 0;
            DestroyPlayerObject(i, ObjectIDS[i][ObjectId]);
        }
    }
}

stock SetObjectDistance(ObjectId, Float:Dist) //Sets the view distance of a object
{
    ObjectDistance[ObjectId] = Dist;
}

public Stream()
{
    for(new i; i<MAX_PLAYERS; i++)//Goes through all players
    {
        if(IsPlayerConnected(i)) //All online players
        {
            for(new S; S<ObjectID+1; S++) //All active Checkpoints
            {
                if(ObjectUsed[S] == 1) //Checks if the object is enabled
                {
                    if(IsPlayerInRangeOfPoint(i, dist, ObjectPos[S][0], ObjectPos[S][1], ObjectPos[S][2]) && ObjectStreamed[i][S] == 0)//Is the player close enough to the object
                    {
                        ObjectIDS[i][S] = CreatePlayerObject(i, ObjectModel[S], ObjectPos[S][0], ObjectPos[S][1], ObjectPos[S][2], ObjectRotation[S][0], ObjectRotation[S][1], ObjectRotation[S][2]);//Create the object
                        ObjectStreamed[i][S] = 1; //Shows the object streamed for the player
                        continue;
                    }
                }
                if(!IsPlayerInRangeOfPoint(i, dist, ObjectPos[S][0], ObjectPos[S][1], ObjectPos[S][2]) && ObjectStreamed[i][S] == 1) //If the object isn't in distance and the player is viewing, then we destory it!
                {
                    ObjectStreamed[i][S] = 0;
                    DestroyPlayerObject(i, ObjectIDS[i][S]);
                    continue;
                }
            }
        }
    }
    return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == in)
    {
        SetPlayerPos(playerid, 955.5032, 1378.1626, 358.00);
    }
    if(pickupid == out)
    {
        SetPlayerPos(playerid, 159.5729, 1903.3146, 18.7518);
    }
    return 1;
}
BUT, the objects are never created!!! I get no warnings or errors... idk what to do. And i really need the streamer because i like to have a lot of maps. So what do i do? How can i fix it? Thanks in advance.
Reply
#2

Well xObjects might be old though i reckon in my oppinion its the best streamer atm, try it, look for a topic around there are heaps of these topics around
Reply
#3

well thanks... but i wanted to make MY streamer work... is thera tny way i can do this? PLEASE!
Reply
#4

anyone i just need to fix my streamer!
Reply
#5

use the streamer incognito !
Reply
#6

................my head is about to freakin explode! CAN SOMEONE JUST TELL ME HOW TO FREAKIN FIX MY STREAMER?? IS THAT TOO MUCH TO FREAKIN ASK HOLEY SHIT!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Reply
#7

zomg... srry bout that... maybe i shouldnt even bother askin on here anymore. maybe i shud just quit. o well. o wait.. no! anyway... for the lov of freakin gawd.. can som1 reply already ... this is a slight issue... !!! THX...
Reply
#8

2 people already answered ur question xObjects is too old so use something like Incognito or maybe just re download ur streamer maybe its bugged and if it has a plugin then check if u added it to "server.cfg"
Reply
#9

use incognitos streamer
Reply
#10

fine. fine. i guess ... ................... nevermind. !!!!! nevermind. But, how is it too old and how can i make a streamer that works? actually.. nev the second question. glkajd. thanks i guess. sorry im such a .... :/
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)