[FilterScript] Simple NJAdmin script ( saves , cookies ,cakes, biscuit , icecreams etc)
#1

hello everyone this is my new admin fs i just created for people who dont know how to create a admin system! i just added
pawn Code:
Cookies, Cakes, Biscuits, IceCreams etc
hope you guys like this !


bug fixed v1.1
Code:
/*


                FilterScript created by (Namer)

*/


//******************************** ( includes ) **************//


#include <a_samp>
#include <YSI\y_ini>  //If you have installed YSI, then you shouldn't have any problem
#include <foreach>
#include <sscanf2>
#include <zcmd>


//******************************** ( Dialogs and User Path ) **************//
#define dregister 2011 //Defining register dialog so it won't mixed up with the other dialogs
#define dlogin 2012 //Defining login dialog so it won't mixed up with the other dialogs
#define UserPath "Users/%s.ini" /*Will define user's account path. In this case, we will save it in Scriptfiles/Users. So create a file inside of your Scriptfiles folder called Users*/

#define MAX_GATES               4
//******************************** ( Bools and new ) **************//
new Float:JailCellSpawns[][3] =
{
        {183.7007, 1465.7400, 10.5859},
        {184.3471, 1439.3838, 10.5912},
        {229.0187, 1455.3315, 10.5859}
};

new InJail[MAX_PLAYERS];
new Gate[MAX_GATES],
        bool:Open[MAX_GATES char];

new Float:FX[MAX_PLAYERS], Float:FY[MAX_PLAYERS], Float:FZ[MAX_PLAYERS]; // X, Y, Z we will store the coordinates at when we freeze someone
new IsFrozen[MAX_PLAYERS]; // The variable we will use to check if a player is frozen or not
new playerb; // Definition for the player we're going to freeze, I like to keep it in public to avoid making new variable under each command



//******************************** ( Forwards ) **************//
forward loadaccount_user(playerid, name[], value[]); //forwarding a new function to load user's data
forward UnJail(pId);


//******************************** ( Whirlpool native ) **************//
native WP_Hash(buffer[],len,const str[]); // Whirlpool native, add it at the top of your script under includes



//******************************** ( Total Colors ) **************//
#define COLOR_BLUE 0x3700FFFF
#define COLOR_RED 0xFF0000FF
#define COLOR_PINK 0xF797CEFF
#define COLOR_PURPLE 0xF20CD0FF
#define COLOR_COLORGREEN 0x00FFAAFF
#define COLOR_LIGHTGREEN 0x00FF26FF
#define COLOR_YELLOW 0xE0FF47FF
#define COLOR_ORANGE 0xF5BE5FFF
#define COLOR_BROWN 0x9C761FFF
#define red 0xF60000AA
#define COLOR_GREEN   0x21DD00FF
#define COLOR_BLACK 0x000000AA
#define orange          0xFF8000C8
#define COLOR_MESSAGE_YELLOW            0xFFDD00AA



//******************************** ( Players Enum to Store Players Data ) **************//
//We will create an enum to store player's data.
enum PlayerInfo
{
    Pass[129], //User's password
    Adminlevel, //User's admin level
    Money, //User's money
    Scores, //User's scores
    Kills, //User's kills
    Deaths, //User's deaths
    Skin, //Users Skin
    Cookies, // Users Cookies ( Awards )
    Cakes, // Users Cakes ( Awards )
    Biscuit, // Users Biscuits ( Awards )
    Icecream,// Users Iceream ( Awards )
}
new pInfo[MAX_PLAYERS][PlayerInfo]; /*This will create a new variable so we can later use it to saving/loading user's info.*/



stock Path(playerid) //Will create a new stock so we can easily use it later to load/save user's data in user's path
{
    new str[128],name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));
    format(str,sizeof(str),UserPath,name);
    return str;
}


main()
{
        print("Coolest fs  made by Namer");
        print("AWesome Look Namer");
}


public OnFilterScriptInit()
{
        SetGameModeText("Dm,Stunts,Racing,Freeroam");
        Gate[0] = CreateObject(980, 288.21933, 1411.60046, 12.11350,   0.00000, 0.00000, -90.00000, 0.0);
        Gate[1] = CreateObject(983, 205.0506, 1425.8093, 10.8416,      90.0000, 0.0000, 49.0000, 0.0);
        Gate[2] = CreateObject(983, 276.71869, 1392.78369, 10.67510,   90.00000, 2.00000, 0.00000, 0.0);
        Gate[3] = CreateObject(983, 269.75021, 1413.76233, 10.15275,   0.00000, 0.00000, 4.00000, 0.0);
        Open{0} = true;
        Open{1} = true;
        Open{2} = true;
        Open{3} = false;
        //
        CreateObject(983, 269.75021, 1413.76233, 8.69814,   0.00000, 0.00000, 4.00000);
        CreateObject(987, 288.51996, 1388.31311, 10.50784,   0.00000, 0.00000, 92.00000);
        CreateObject(987, 288.93970, 1376.37878, 10.50784,   0.00000, 0.00000, 92.00000);
        CreateObject(987, 288.82794, 1364.36719, 10.57022,   0.00000, 0.00000, 90.00000);
        CreateObject(987, 288.76044, 1352.42249, 10.57022,   0.00000, 0.00000, 90.00000);
        CreateObject(987, 288.49316, 1340.50122, 10.47380,   0.00000, 0.00000, 89.00000);
        CreateObject(987, 288.50732, 1336.09851, 10.47380,   0.00000, 0.00000, 90.00000);
        CreateObject(987, 288.34271, 1393.97974, 9.43307,   0.00000, 0.00000, 92.00000);
        CreateObject(987, 288.10571, 1417.42542, 9.43307,   0.00000, 0.00000, 92.00000);
        CreateObject(987, 287.93698, 1405.28296, 7.54660,   0.00000, 0.00000, 180.00000);
        CreateObject(987, 276.23441, 1417.42676, 7.57473,   0.00000, 0.00000, 0.00000);
        CreateObject(987, 276.66599, 1335.91370, 10.47380,   0.00000, 0.00000, 0.00000);
        CreateObject(987, 264.74213, 1335.91150, 10.47380,   0.00000, 0.00000, 0.00000);
        CreateObject(987, 252.81436, 1335.91602, 10.51380,   0.00000, 0.00000, 0.00000);
        CreateObject(987, 240.86060, 1335.93164, 10.51380,   0.00000, 0.00000, 0.00000);
        CreateObject(987, 228.95714, 1335.95337, 10.51380,   0.00000, 0.00000, 0.00000);
        CreateObject(987, 216.98071, 1335.95496, 10.51380,   0.00000, 0.00000, 0.00000);
        CreateObject(987, 205.04987, 1335.94116, 10.51380,   0.00000, 0.00000, 0.00000);
        CreateObject(987, 181.08572, 1335.85815, 10.51380,   0.00000, 0.00000, 0.00000);
        CreateObject(987, 193.07104, 1335.87988, 10.51380,   0.00000, 0.00000, 0.00000);
        CreateObject(987, 169.11313, 1335.83289, 10.51380,   0.00000, 0.00000, 0.00000);
        CreateObject(987, 157.23021, 1335.93066, 10.43884,   0.00000, 0.00000, 0.00000);
        CreateObject(987, 145.62036, 1335.85583, 10.43884,   0.00000, 0.00000, 0.00000);
        CreateObject(987, 133.70871, 1335.87122, 10.43884,   0.00000, 0.00000, 0.00000);
        CreateObject(987, 121.77758, 1335.85645, 10.43884,   0.00000, 0.00000, 0.00000);
        CreateObject(987, 111.28864, 1335.89197, 10.43884,   0.00000, 0.00000, 0.00000);
        CreateObject(987, 111.60497, 1347.87561, 10.43880,   0.00000, 0.00000, -91.00000);
        CreateObject(987, 111.79067, 1359.83826, 10.43880,   0.00000, 0.00000, -91.00000);
        CreateObject(987, 111.89973, 1371.56396, 10.43880,   0.00000, 0.00000, -91.00000);
        CreateObject(987, 111.66721, 1383.50586, 10.43880,   0.00000, 0.00000, -89.00000);
        CreateObject(987, 111.25101, 1395.41882, 10.43880,   0.00000, 0.00000, -88.00000);
        CreateObject(987, 111.09192, 1407.27783, 10.43880,   0.00000, 0.00000, -89.00000);
        CreateObject(987, 110.84692, 1419.26990, 10.43880,   0.00000, 0.00000, -89.00000);
        CreateObject(987, 110.72574, 1431.13660, 10.43880,   0.00000, 0.00000, -89.00000);
        CreateObject(987, 110.74675, 1443.05505, 10.43880,   0.00000, 0.00000, -90.00000);
        CreateObject(987, 110.69527, 1455.00696, 10.43880,   0.00000, 0.00000, -90.00000);
        CreateObject(987, 110.49503, 1466.93054, 10.43880,   0.00000, 0.00000, -89.00000);
        CreateObject(987, 110.49501, 1478.87158, 10.43880,   0.00000, 0.00000, -90.00000);
        CreateObject(987, 110.46492, 1484.88867, 10.43880,   0.00000, 0.00000, -90.00000);
        CreateObject(987, 122.40503, 1484.82544, 10.43880,   0.00000, 0.00000, 180.00000);
        CreateObject(987, 134.31830, 1484.84924, 10.43880,   0.00000, 0.00000, 180.00000);
        CreateObject(987, 146.16803, 1484.87207, 10.43880,   0.00000, 0.00000, 180.00000);
        CreateObject(987, 158.06267, 1484.73743, 10.43880,   0.00000, 0.00000, 180.00000);
        CreateObject(987, 170.07661, 1484.73279, 10.43880,   0.00000, 0.00000, 180.00000);
        CreateObject(987, 181.95824, 1484.76648, 10.43880,   0.00000, 0.00000, 180.00000);
        CreateObject(987, 193.98875, 1484.77173, 10.43880,   0.00000, 0.00000, 180.00000);
        CreateObject(987, 205.93217, 1484.77075, 10.43880,   0.00000, 0.00000, 180.00000);
        CreateObject(987, 217.86893, 1484.81409, 10.43880,   0.00000, 0.00000, 180.00000);
        CreateObject(987, 229.76375, 1484.82544, 10.43880,   0.00000, 0.00000, 180.00000);
        CreateObject(987, 241.67352, 1484.82214, 10.43880,   0.00000, 0.00000, 180.00000);
        CreateObject(987, 253.59207, 1484.79651, 10.43880,   0.00000, 0.00000, 180.00000);
        CreateObject(987, 265.55624, 1484.79114, 10.43880,   0.00000, 0.00000, 180.00000);
        CreateObject(987, 277.49246, 1484.82117, 10.43880,   0.00000, 0.00000, 180.00000);
        CreateObject(987, 287.48776, 1484.81262, 10.43880,   0.00000, 0.00000, 180.00000);
        CreateObject(987, 287.61713, 1472.87610, 10.43880,   0.00000, 0.00000, 90.00000);
        CreateObject(987, 287.55554, 1460.92261, 10.43880,   0.00000, 0.00000, 90.00000);
        CreateObject(987, 287.66757, 1448.91492, 10.43880,   0.00000, 0.00000, 90.00000);
        CreateObject(987, 287.87228, 1436.94287, 10.43880,   0.00000, 0.00000, 91.00000);
        CreateObject(987, 287.93631, 1429.15088, 10.43880,   0.00000, 0.00000, 90.00000);
        CreateObject(987, 287.99115, 1421.09863, 10.43880,   0.00000, 0.00000, 90.00000);
        CreateObject(987, 275.93176, 1405.39893, 7.71610,   0.00000, 0.00000, -86.00000);
        CreateObject(987, 276.79221, 1392.09204, 7.71613,   0.00000, 0.00000, -90.00000);
        CreateObject(3279, 282.39069, 1400.08984, 9.55020,   0.00000, 0.00000, -90.00000);
        CreateObject(3279, 282.39069, 1421.75378, 9.54600,   0.00000, 0.00000, 90.00000);
        CreateObject(987, 276.24475, 1429.27942, 9.36279,   0.00000, 0.00000, -90.00000);
        CreateObject(987, 276.78156, 1380.11572, 7.71613,   0.00000, 0.00000, -90.00000);
        CreateObject(987, 276.73495, 1368.19067, 7.71613,   0.00000, 0.00000, -90.00000);
        CreateObject(987, 276.72067, 1356.23901, 7.71613,   0.00000, 0.00000, -90.00000);
        CreateObject(987, 276.71921, 1344.22937, 7.71610,   0.00000, 0.00000, -180.00000);
        CreateObject(987, 264.79147, 1344.26306, 7.71610,   0.00000, 0.00000, -180.00000);
        CreateObject(987, 246.98703, 1344.28101, 7.71610,   0.00000, 0.00000, -180.00000);
        CreateObject(4079, 151.03078, 1445.55554, 22.30871,   0.00000, 0.00000, 0.00000);
        CreateObject(978, 293.75192, 1405.01172, 9.48119,   0.00000, 0.00000, 0.00000);
        CreateObject(978, 303.58807, 1405.00024, 8.94109,   0.00000, 0.00000, 0.00000);
        CreateObject(978, 313.47214, 1404.88879, 8.25686,   0.00000, 0.00000, -2.00000);
        CreateObject(978, 323.39240, 1404.61230, 7.39898,   0.00000, 0.00000, -2.00000);
        CreateObject(978, 293.85504, 1417.59790, 9.45577,   0.00000, 0.00000, -180.00000);
        CreateObject(978, 303.71906, 1417.38757, 8.92076,   0.00000, 0.00000, -182.00000);
        CreateObject(978, 313.48343, 1416.98840, 8.22447,   0.00000, 0.00000, -182.00000);
        CreateObject(978, 323.47519, 1416.60583, 7.88686,   0.00000, 0.00000, -182.00000);
        CreateObject(0, 321.96030, 1406.74500, 10.44974,   0.00000, 0.00000, 0.00000);
        CreateObject(4697, 250.83678, 1338.33228, 9.67920,   0.00000, 0.00000, -90.00000);
        CreateObject(983, 260.34555, 1376.47656, 10.28203,   0.00000, 0.00000, -90.00000);
        CreateObject(983, 253.94746, 1376.44775, 10.29158,   0.00000, 0.00000, -90.00000);
        CreateObject(983, 247.63139, 1376.47900, 10.29430,   0.00000, 0.00000, -90.00000);
        CreateObject(983, 137.01170, 1352.53125, 13.49212,   0.00000, 0.00000, -90.00000);
        CreateObject(983, 238.00044, 1366.93628, 10.30576,   0.00000, 0.00000, 0.00000);
        CreateObject(983, 238.04744, 1360.40649, 10.38450,   0.00000, 0.00000, 0.00000);
        CreateObject(983, 237.95865, 1347.65979, 10.27873,   0.00000, 0.00000, 0.00000);
        CreateObject(983, 237.98926, 1354.06653, 10.27873,   0.00000, 0.00000, 0.00000);
        CreateObject(983, 238.01952, 1373.29089, 10.30576,   0.00000, 0.00000, 0.00000);
        CreateObject(8407, 269.53937, 1375.99243, 10.59500,   0.00000, 0.00000, 180.00000);
        CreateObject(983, 266.69986, 1376.64880, 10.28200,   0.00000, 0.00000, -88.00000);
        CreateObject(3268, 220.05811, 1354.21399, 9.53448,   0.00000, 0.00000, -90.00000);
        CreateObject(983, 233.31348, 1344.26404, 8.95615,   90.00000, 0.00000, 90.00000);
        CreateObject(983, 206.93341, 1344.21484, 8.89996,   90.00000, 0.00000, 90.00000);
        CreateObject(987, 246.98703, 1344.28101, 7.71610,   0.00000, 0.00000, -180.00000);
        CreateObject(4874, 164.61104, 1360.35815, 13.25526,   0.00000, 0.00000, 180.00000);
        CreateObject(983, 204.06564, 1344.28918, 10.24658,   90.00000, 0.00000, 90.00000);
        CreateObject(983, 204.49896, 1344.28552, 11.26427,   90.00000, 0.00000, 90.00000);
        CreateObject(987, 198.57414, 1380.25598, 7.16432,   0.00000, 0.00000, -180.00000);
        CreateObject(987, 133.72916, 1352.43933, 7.89542,   0.00000, 0.00000, -270.00000);
        CreateObject(3279, 116.16420, 1340.62415, 9.38161,   0.00000, 0.00000, 90.00000);
        CreateObject(987, 133.78322, 1364.33618, 7.87483,   0.00000, 0.00000, -180.00000);
        CreateObject(987, 121.79222, 1364.40906, 7.74424,   0.00000, 0.00000, -270.00000);
        CreateObject(987, 121.79200, 1376.32446, 7.77732,   0.00000, 0.00000, -270.00000);
        CreateObject(987, 121.78685, 1388.27515, 7.79481,   0.00000, 0.00000, -270.00000);
        CreateObject(987, 121.82859, 1400.25647, 7.73608,   0.00000, 0.00000, -309.00000);
        CreateObject(987, 129.35222, 1409.53223, 7.71409,   0.00000, 0.00000, -309.00000);
        CreateObject(19359, 124.61724, 1419.05286, 11.27160,   0.00000, 0.00000, 42.00000);
        CreateObject(19359, 126.80047, 1417.04358, 11.27160,   0.00000, 0.00000, 54.00000);
        CreateObject(19359, 127.88307, 1416.25537, 11.27160,   0.00000, 0.00000, 56.00000);
        CreateObject(19359, 124.95607, 1419.24719, 13.65280,   0.00000, 10.00000, 42.00000);
        CreateObject(19359, 127.36001, 1417.16565, 13.65280,   0.00000, 10.00000, 55.00000);
        CreateObject(19359, 177.35410, 1471.66760, 11.22416,   0.00000, 0.00000, 52.00000);
        CreateObject(19359, 179.80174, 1469.05884, 11.22420,   0.00000, 0.00000, 38.00000);
        CreateObject(19359, 178.75645, 1470.07629, 11.22420,   0.00000, 0.00000, 38.00000);
        CreateObject(19359, 179.71095, 1468.35413, 13.66359,   0.00000, 0.00000, 42.00000);
        CreateObject(19359, 175.84700, 1472.27686, 13.76463,   0.00000, 0.00000, 52.00000);
        CreateObject(2946, 180.88831, 1465.23108, 9.59220,   0.00000, 0.00000, 0.00000);
        CreateObject(987, 258.91483, 1344.30127, 7.71610,   0.00000, 0.00000, -180.00000);
        CreateObject(987, 179.15833, 1464.80969, 9.34422,   0.00000, 0.00000, 60.00000);
        CreateObject(987, 276.22934, 1453.20862, 9.25083,   0.00000, 0.00000, -90.00000);
        CreateObject(987, 276.23364, 1465.14282, 9.20279,   0.00000, 0.00000, -90.00000);
        CreateObject(987, 276.10858, 1475.22791, 9.43163,   0.00000, 0.00000, -90.00000);
        CreateObject(987, 264.07336, 1475.23352, 9.25602,   0.00000, 0.00000, 0.00000);
        CreateObject(987, 252.07521, 1475.23047, 9.13330,   0.00000, 0.00000, 0.00000);
        CreateObject(987, 240.18167, 1475.22266, 9.14294,   0.00000, 0.00000, 0.00000);
        CreateObject(987, 228.21965, 1475.21875, 9.18374,   0.00000, 0.00000, 0.00000);
        CreateObject(987, 216.25357, 1475.28992, 9.11703,   0.00000, 0.00000, 0.00000);
        CreateObject(987, 204.28136, 1475.30298, 9.12844,   0.00000, 0.00000, 0.00000);
        CreateObject(987, 192.38100, 1475.26086, 9.20087,   0.00000, 0.00000, 0.00000);
        CreateObject(987, 185.15015, 1475.28357, 9.22388,   0.00000, 0.00000, 0.00000);
        CreateObject(983, 270.47461, 1380.13403, 10.22307,   0.00000, 0.00000, 0.00000);
        CreateObject(983, 270.46289, 1386.50232, 10.22307,   0.00000, 0.00000, 0.00000);
        CreateObject(983, 270.45944, 1392.92163, 10.22307,   0.00000, 0.00000, 0.00000);
        CreateObject(983, 270.46362, 1399.31812, 10.22307,   0.00000, 0.00000, 0.00000);
        CreateObject(983, 270.25989, 1405.72681, 10.22310,   0.00000, 0.00000, 4.00000);
        CreateObject(1459, 327.68820, 1414.84424, 7.08767,   0.00000, 0.00000, -90.00000);
        CreateObject(1459, 327.72482, 1412.09631, 7.06116,   0.00000, 0.00000, -90.00000);
        CreateObject(1459, 320.68723, 1410.17798, 7.58659,   0.00000, 0.00000, -90.00000);
        CreateObject(1459, 320.73755, 1406.87219, 7.50322,   0.00000, 0.00000, -90.00000);
        CreateObject(1459, 313.58057, 1411.52466, 8.15470,   0.00000, 0.00000, -90.00000);
        CreateObject(1459, 313.65356, 1414.92432, 8.08090,   0.00000, 0.00000, -90.00000);
        CreateObject(1459, 305.83316, 1410.71326, 8.63556,   0.00000, 0.00000, -90.00000);
        CreateObject(1459, 305.86221, 1407.21814, 8.66324,   0.00000, 0.00000, -90.00000);
        CreateObject(1459, 294.04358, 1407.19727, 9.72257,   0.00000, 0.00000, -90.00000);
        CreateObject(1459, 294.10254, 1415.56226, 9.61897,   0.00000, 0.00000, -90.00000);
        CreateObject(983, 247.63139, 1376.47900, 10.29430,   0.00000, 0.00000, -90.00000);
        CreateObject(983, 143.44983, 1352.55078, 13.49212,   0.00000, 0.00000, -90.00000);
        CreateObject(983, 149.83524, 1352.59863, 13.49212,   0.00000, 0.00000, -90.00000);
        CreateObject(983, 156.24026, 1352.65112, 13.49212,   0.00000, 0.00000, -90.00000);
        CreateObject(983, 157.85283, 1352.66235, 13.49212,   0.00000, 0.00000, -90.00000);
        CreateObject(987, 264.32809, 1417.41040, 9.40169,   0.00000, 0.00000, 0.00000);
        CreateObject(987, 252.34616, 1417.46802, 9.43182,   0.00000, 0.00000, 0.00000);
        CreateObject(987, 240.43347, 1417.54883, 9.43182,   0.00000, 0.00000, 0.00000);
        CreateObject(987, 228.47084, 1417.50891, 9.43182,   0.00000, 0.00000, 0.00000);
        CreateObject(987, 207.11124, 1424.55872, 9.43180,   0.00000, 0.00000, -36.00000);
        CreateObject(987, 216.78419, 1417.53406, 9.43182,   0.00000, 0.00000, 0.00000);
        CreateObject(983, 206.06335, 1425.09106, 12.45510,   90.00000, 0.00000, 63.00000);
        CreateObject(987, 193.84038, 1434.68359, 9.43180,   0.00000, 0.00000, -36.00000);
        CreateObject(983, 204.12318, 1426.74255, 12.45510,   90.00000, 0.00000, 40.00000);
        CreateObject(983, 206.54492, 1424.84998, 12.45510,   90.00000, 0.00000, 63.00000);
        CreateObject(983, 203.83289, 1427.07825, 12.45510,   90.00000, 0.00000, 40.00000);
        CreateObject(987, 181.87366, 1434.60852, 9.43180,   0.00000, 0.00000, 0.00000);
        CreateObject(987, 174.23967, 1443.76501, 9.43180,   0.00000, 0.00000, -50.00000);
        CreateObject(987, 170.36235, 1448.30029, 9.43180,   0.00000, 0.00000, -50.00000);
        CreateObject(983, 175.94441, 1446.29150, 15.01090,   0.00000, 0.00000, -44.00000);
        CreateObject(983, 180.24887, 1457.08191, 15.01090,   0.00000, 0.00000, -10.00000);
        CreateObject(983, 179.35262, 1452.45728, 15.01090,   0.00000, 0.00000, -10.00000);
        CreateObject(983, 176.59238, 1446.95825, 15.01090,   0.00000, 0.00000, -44.00000);
        CreateObject(983, 270.16821, 1407.07678, 10.22310,   0.00000, 0.00000, 4.00000);
        CreateObject(8417, 254.79419, 1454.89429, 9.66511,   0.00000, 0.00000, 0.00000);
        CreateObject(8416, 265.49979, 1464.84436, 11.76491,   0.00000, 0.00000, 0.00000);
        CreateObject(8416, 244.10144, 1444.87024, 11.78921,   0.00000, 0.00000, -180.00000);
        CreateObject(946, 238.40977, 1438.03406, 11.78010,   0.00000, 0.00000, -90.00000);
        CreateObject(946, 238.60370, 1469.02368, 11.78010,   0.00000, 0.00000, -90.00000);
        CreateObject(946, 238.39494, 1458.12427, 11.78010,   0.00000, 0.00000, -90.00000);
        CreateObject(946, 238.55315, 1449.16003, 11.78010,   0.00000, 0.00000, -90.00000);
        CreateObject(946, 272.91534, 1469.21021, 11.78010,   0.00000, 0.00000, 90.00000);
        CreateObject(946, 272.76648, 1458.18396, 11.78010,   0.00000, 0.00000, 90.00000);
        CreateObject(946, 272.86075, 1449.06348, 11.78010,   0.00000, 0.00000, 90.00000);
        CreateObject(946, 272.66916, 1438.11572, 11.78010,   0.00000, 0.00000, 90.00000);
        CreateObject(987, 276.23459, 1441.24707, 9.36280,   0.00000, 0.00000, -90.00000);
        CreateObject(2114, 248.28181, 1436.87244, 9.73000,   0.00000, 0.00000, 0.00000);
        CreateObject(2114, 256.59625, 1455.90735, 9.73000,   0.00000, 0.00000, 0.00000);
        CreateObject(2114, 257.02316, 1455.45300, 9.73000,   0.00000, 0.00000, 0.00000);
        CreateObject(2114, 239.23036, 1449.49805, 9.73000,   0.00000, 0.00000, 0.00000);
        CreateObject(2114, 253.09500, 1451.41382, 9.73000,   0.00000, 0.00000, 0.00000);
        CreateObject(2114, 269.09210, 1470.26221, 9.73000,   0.00000, 0.00000, 0.00000);
        CreateObject(2114, 266.37064, 1440.97180, 9.73000,   0.00000, 0.00000, 0.00000);
        CreateObject(2114, 268.90445, 1448.84851, 9.73000,   0.00000, 0.00000, 0.00000);
        CreateObject(2114, 269.19659, 1458.00256, 9.73000,   0.00000, 0.00000, 0.00000);
        CreateObject(2114, 242.69757, 1469.02771, 9.73000,   0.00000, 0.00000, 0.00000);
        CreateObject(2114, 262.07114, 1462.04773, 9.73000,   0.00000, 0.00000, 0.00000);
        CreateObject(1280, 233.73959, 1436.20007, 9.92370,   0.00000, 0.00000, 0.00000);
        CreateObject(1280, 233.73613, 1438.81848, 9.92370,   0.00000, 0.00000, 0.00000);
        CreateObject(1280, 233.73273, 1441.43689, 9.92370,   0.00000, 0.00000, 0.00000);
        CreateObject(3279, 282.39069, 1478.91040, 9.54600,   0.00000, 0.00000, -180.00000);
        CreateObject(3279, 282.39069, 1340.62415, 9.55020,   0.00000, 0.00000, 90.00000);
        CreateObject(3279, 116.16420, 1478.91040, 9.33230,   0.00000, 0.00000, 0.00000);
        CreateObject(2889, 128.29042, 1371.01233, 13.40006,   0.00000, 0.00000, 0.00000);
        CreateObject(3267, 128.35226, 1371.05176, 12.54220,   0.00000, 0.00000, 135.00000);
        CreateObject(2892, 288.73474, 1464.66077, 9.40744,   0.00000, 0.00000, 0.00000);
        CreateObject(2892, 288.60623, 1454.65833, 9.40744,   0.00000, 0.00000, 0.00000);
        CreateObject(2892, 289.01355, 1444.61963, 9.40744,   0.00000, 0.00000, 0.00000);
        CreateObject(2892, 288.85312, 1433.71509, 9.40744,   0.00000, 0.00000, 0.00000);
        CreateObject(2892, 288.82550, 1423.62610, 9.40744,   0.00000, 0.00000, 0.00000);
        CreateObject(2892, 288.75546, 1475.17371, 9.40744,   0.00000, 0.00000, 0.00000);
        CreateObject(2892, 288.63126, 1481.89172, 9.40744,   0.00000, 0.00000, 0.00000);
        CreateObject(2892, 283.16711, 1486.24255, 9.48710,   0.00000, 0.00000, -91.00000);
        CreateObject(2892, 273.30704, 1486.36145, 9.48710,   0.00000, 0.00000, -91.00000);
        CreateObject(2892, 263.58731, 1486.49768, 9.48710,   0.00000, 0.00000, -89.00000);
        CreateObject(2892, 253.58600, 1486.49622, 9.48710,   0.00000, 0.00000, -89.00000);
        CreateObject(2892, 243.52536, 1486.45435, 9.48710,   0.00000, 0.00000, -89.00000);
        CreateObject(2892, 233.42549, 1486.37341, 9.48710,   0.00000, 0.00000, -89.00000);
        CreateObject(2892, 223.44551, 1486.57544, 9.48710,   0.00000, 0.00000, -89.00000);
        CreateObject(2892, 213.20064, 1486.52234, 9.48710,   0.00000, 0.00000, -89.00000);
        CreateObject(2892, 203.18065, 1486.49951, 9.48710,   0.00000, 0.00000, -89.00000);
        CreateObject(2892, 192.86057, 1486.45679, 9.48710,   0.00000, 0.00000, -89.00000);
        CreateObject(2892, 182.69566, 1486.41907, 9.48710,   0.00000, 0.00000, -89.00000);
        CreateObject(2892, 172.36852, 1486.30615, 9.48710,   0.00000, 0.00000, -89.00000);
        CreateObject(2892, 162.26884, 1486.38159, 9.48710,   0.00000, 0.00000, -89.00000);
        CreateObject(2892, 151.92967, 1486.51904, 9.48710,   0.00000, 0.00000, -89.00000);
        CreateObject(2892, 141.76582, 1486.48389, 9.48710,   0.00000, 0.00000, -89.00000);
        CreateObject(2892, 131.37900, 1486.54138, 9.48710,   0.00000, 0.00000, -89.00000);
        CreateObject(2892, 120.89657, 1486.45703, 9.48710,   0.00000, 0.00000, -89.00000);
        CreateObject(2892, 110.97488, 1486.44922, 9.52709,   0.00000, 0.00000, -89.00000);
        CreateObject(2892, 109.14800, 1480.54248, 9.66038,   0.00000, 6.00000, 0.00000);
        CreateObject(2892, 109.10692, 1472.22998, 9.66038,   0.00000, 6.00000, 0.00000);
        CreateObject(2892, 109.07678, 1462.18323, 9.55589,   0.00000, 0.00000, 0.00000);
        CreateObject(2892, 108.86933, 1452.02991, 9.55589,   0.00000, 0.00000, 0.00000);
        CreateObject(2892, 108.74387, 1441.91797, 9.55589,   0.00000, 0.00000, 0.00000);
        CreateObject(2892, 108.92871, 1431.52429, 9.55589,   0.00000, 0.00000, 0.00000);
        CreateObject(2892, 108.58258, 1421.57312, 9.55589,   0.00000, 0.00000, 0.00000);
        CreateObject(2892, 109.25375, 1410.97949, 9.50931,   0.00000, 0.00000, 0.00000);
        CreateObject(2892, 109.44324, 1400.96606, 9.49999,   0.00000, 0.00000, 0.00000);
        CreateObject(2892, 109.38981, 1391.02942, 9.49999,   0.00000, 0.00000, 0.00000);
        CreateObject(2892, 109.73940, 1381.16003, 9.49999,   0.00000, 0.00000, 0.00000);
        CreateObject(2892, 110.10795, 1371.19104, 9.49999,   0.00000, 0.00000, 0.00000);
        CreateObject(2892, 109.91093, 1361.10376, 9.49999,   0.00000, 0.00000, 0.00000);
        CreateObject(2892, 109.97990, 1350.81543, 9.49999,   0.00000, 0.00000, 0.00000);
        CreateObject(2892, 109.80263, 1340.54297, 9.49999,   0.00000, 0.00000, 0.00000);
        CreateObject(2892, 115.21912, 1334.41833, 10.01149,   0.00000, -26.00000, -90.00000);
        CreateObject(2892, 125.15380, 1334.32080, 10.04902,   0.00000, -24.00000, -90.00000);
        CreateObject(2892, 135.06482, 1334.33264, 10.04902,   0.00000, -24.00000, -90.00000);
        CreateObject(2892, 145.08080, 1334.13037, 10.04904,   0.00000, -20.00000, -90.00000);
        CreateObject(2892, 155.33281, 1334.29102, 9.82923,   0.00000, -14.00000, -91.00000);
        CreateObject(2892, 165.00343, 1334.28186, 9.82923,   0.00000, -14.00000, -91.00000);
        CreateObject(2892, 174.83781, 1334.28455, 9.82923,   0.00000, -14.00000, -91.00000);
        CreateObject(2892, 184.75806, 1334.24719, 9.82923,   0.00000, -14.00000, -91.00000);
        CreateObject(2892, 194.57788, 1333.98682, 9.82920,   0.00000, -14.00000, -91.00000);
        CreateObject(2892, 204.61070, 1333.49146, 9.82920,   0.00000, -10.00000, -91.00000);
        CreateObject(2892, 214.64429, 1333.26807, 9.82920,   0.00000, -10.00000, -91.00000);
        CreateObject(2892, 224.90894, 1333.28906, 9.82920,   0.00000, -10.00000, -91.00000);
        CreateObject(2892, 235.52586, 1333.48352, 9.82920,   0.00000, -10.00000, -91.00000);
        CreateObject(2892, 245.33762, 1333.93579, 9.60968,   0.00000, -8.00000, -89.00000);
        CreateObject(2892, 254.98160, 1333.89587, 9.50990,   0.00000, -8.00000, -89.00000);
        CreateObject(2892, 265.01306, 1333.91943, 9.50990,   0.00000, -8.00000, -89.00000);
        CreateObject(2892, 274.32355, 1333.94653, 9.50990,   0.00000, -8.00000, -89.00000);
        CreateObject(2892, 284.29565, 1334.04456, 9.50990,   0.00000, -8.00000, -89.00000);
        CreateObject(2892, 289.45456, 1395.23730, 9.40740,   0.00000, 0.00000, 2.00000);
        CreateObject(2892, 289.63773, 1385.11487, 9.40740,   0.00000, 0.00000, 2.00000);
        CreateObject(2892, 289.81223, 1375.21155, 9.40740,   0.00000, 0.00000, 2.00000);
        CreateObject(2892, 289.97467, 1365.42871, 9.40740,   0.00000, 0.00000, 2.00000);
        CreateObject(2892, 290.18210, 1355.33826, 9.40740,   0.00000, 0.00000, 2.00000);
        CreateObject(2892, 289.98953, 1345.23071, 9.40740,   0.00000, 0.00000, 2.00000);
        CreateObject(2892, 289.62729, 1337.73657, 9.40740,   0.00000, 0.00000, 2.00000);
        CreateObject(983, 193.82533, 1431.47681, 10.23170,   0.00000, 0.00000, 0.00000);
        CreateObject(3279, 189.23833, 1430.17993, 9.54600,   0.00000, 0.00000, 0.00000);
        CreateObject(2889, 282.73322, 1451.31152, 13.38654,   0.00000, 0.00000, 0.00000);
        CreateObject(3267, 282.73871, 1451.24072, 12.54220,   0.00000, 0.00000, 18.00000);
        CreateObject(983, 193.78371, 1429.82886, 10.23170,   0.00000, 0.00000, 0.00000);
        CreateObject(983, 190.71860, 1425.01196, 10.23170,   0.00000, 0.00000, -90.00000);
        CreateObject(983, 187.53644, 1425.00464, 10.23170,   0.00000, 0.00000, -90.00000);
        CreateObject(983, 184.34677, 1428.18213, 10.23170,   0.00000, 0.00000, 0.00000);
        CreateObject(983, 184.34837, 1431.25720, 10.23170,   0.00000, 0.00000, 0.00000);
        CreateObject(983, 258.85455, 1408.70422, 10.23170,   0.00000, 0.00000, -90.00000);
        CreateObject(983, 252.47458, 1408.67432, 10.23170,   0.00000, 0.00000, -90.00000);
        CreateObject(983, 246.06715, 1408.66577, 10.23170,   0.00000, 0.00000, -90.00000);
        CreateObject(983, 240.77394, 1406.15039, 10.23170,   0.00000, 0.00000, -40.00000);
        CreateObject(983, 231.46169, 1408.65662, 10.23170,   0.00000, 0.00000, -90.00000);
        CreateObject(983, 226.74742, 1408.70093, 10.23170,   0.00000, 0.00000, -90.00000);
        CreateObject(984, 217.20192, 1408.68115, 10.22788,   0.00000, 0.00000, 90.00000);
        CreateObject(984, 204.40706, 1408.68506, 10.22788,   0.00000, 0.00000, 90.00000);
        CreateObject(984, 199.08636, 1421.20398, 10.22790,   0.00000, 0.00000, 54.00000);
        CreateObject(984, 230.50214, 1403.82166, 10.22790,   0.00000, 0.00000, -40.00000);
        CreateObject(984, 234.58168, 1398.71936, 10.22790,   0.00000, 0.00000, -40.00000);
        CreateObject(8407, 225.10242, 1398.83923, 10.59500,   0.00000, 0.00000, 140.00000);
        CreateObject(2889, 243.33917, 1340.26172, 13.38654,   0.00000, 0.00000, 0.00000);
        CreateObject(3267, 243.40858, 1340.23914, 12.54220,   0.00000, 0.00000, -127.00000);
        CreateObject(2889, 132.55281, 1449.44055, 37.94512,   0.00000, 0.00000, 0.00000);
        CreateObject(3267, 132.64880, 1449.40210, 37.10550,   0.00000, 0.00000, 55.00000);
        CreateObject(984, 212.37071, 1417.42322, 10.22788,   0.00000, 0.00000, 90.00000);
        CreateObject(1694, 145.56618, 1463.67773, 43.59899,   0.00000, 0.00000, 0.00000);
        CreateObject(3876, 142.78333, 1462.30750, 4.55381,   0.00000, 0.00000, 0.00000);
        CreateObject(3876, 149.65019, 1457.00610, -0.00150,   0.00000, 0.00000, 0.00000);
        CreateObject(3876, 152.61699, 1464.25378, 11.06563,   0.00000, 0.00000, 0.00000);
        CreateObject(3398, 276.15268, 1417.37610, 17.25294,   0.00000, 0.00000, -120.00000);
        CreateObject(3398, 275.91058, 1475.03223, 17.25290,   0.00000, 0.00000, -40.00000);
        CreateObject(3398, 185.25089, 1475.14697, 17.25290,   0.00000, 0.00000, 47.00000);
        CreateObject(3398, 178.24210, 1439.30444, 17.25290,   0.00000, 0.00000, 120.00000);
        CreateObject(3398, 254.93834, 1378.85986, 17.25290,   0.00000, 0.00000, 0.00000);
        CreateObject(984, 191.47559, 1408.68567, 10.22788,   0.00000, 0.00000, 90.00000);
        CreateObject(984, 178.55435, 1408.71729, 10.22788,   0.00000, 0.00000, 90.00000);
        CreateObject(984, 157.45491, 1411.89392, 10.22790,   0.00000, 0.00000, 60.00000);
        CreateObject(984, 169.34641, 1408.71289, 10.22788,   0.00000, 0.00000, 90.00000);
        CreateObject(984, 156.73291, 1412.33643, 10.22790,   0.00000, 0.00000, 60.00000);
        CreateObject(14791, 229.20885, 1469.77234, 11.57798,   0.00000, 0.00000, 0.00000);
        CreateObject(14791, 229.13181, 1462.06873, 11.57798,   0.00000, 0.00000, 0.00000);
        CreateObject(1985, 225.33624, 1466.81543, 11.94075,   0.00000, 0.00000, 0.00000);
        CreateObject(1985, 224.81705, 1467.59607, 11.94075,   0.00000, 0.00000, 0.00000);
        CreateObject(1985, 224.38718, 1466.52466, 11.94075,   0.00000, 0.00000, 0.00000);
        CreateObject(14782, 179.41785, 1454.93994, 10.55500,   0.00000, 0.00000, 78.00000);
        CreateObject(955, 182.87411, 1469.77100, 9.96571,   0.00000, 0.00000, 60.00000);
        CreateObject(956, 183.49854, 1471.02844, 9.95786,   0.00000, 0.00000, 60.00000);
        CreateObject(2629, 203.01633, 1471.77563, 9.57171,   0.00000, 0.00000, 0.00000);
        CreateObject(2631, 202.96709, 1470.69104, 9.53984,   0.00000, 0.00000, -90.00000);
        CreateObject(2631, 200.98209, 1470.70166, 9.53984,   0.00000, 0.00000, -90.00000);
        CreateObject(2632, 204.99684, 1470.69653, 9.55250,   0.00000, 0.00000, 90.00000);
        CreateObject(1281, 210.33310, 1470.62537, 10.34920,   0.00000, 0.00000, 0.00000);
        CreateObject(1281, 213.55740, 1470.62537, 10.34920,   0.00000, 0.00000, 0.00000);
        CreateObject(1281, 217.12250, 1470.62537, 10.34920,   0.00000, 0.00000, 0.00000);
        CreateObject(1281, 197.69630, 1470.62537, 10.34920,   0.00000, 0.00000, 0.00000);
        CreateObject(1281, 194.35899, 1470.62537, 10.34920,   0.00000, 0.00000, 0.00000);
        CreateObject(984, 268.36951, 1402.20374, 10.22790,   0.00000, 0.00000, 0.00000);
        CreateObject(983, 265.24298, 1408.69519, 10.23170,   0.00000, 0.00000, -90.00000);
        CreateObject(984, 268.36118, 1389.41968, 10.22790,   0.00000, 0.00000, 0.00000);
        CreateObject(984, 268.37003, 1384.74512, 10.22790,   0.00000, 0.00000, 0.00000);
        CreateObject(984, 261.93765, 1378.36707, 10.22790,   0.00000, 0.00000, -90.00000);
        CreateObject(984, 249.14322, 1378.35559, 10.22790,   0.00000, 0.00000, -90.00000);
        CreateObject(984, 244.44501, 1378.36841, 10.22790,   0.00000, 0.00000, -90.00000);
        CreateObject(983, 242.89607, 1376.48950, 10.28600,   0.00000, 0.00000, -90.00000);
        CreateObject(983, 238.02824, 1375.14539, 10.30576,   0.00000, 0.00000, 0.00000);
        CreateObject(18850, 139.05617, 1387.56152, -2.63254,   0.00000, 0.00000, 0.00000);
        //
        AddStaticVehicle(490,213.9689,1355.8521,10.7149,358.7631,0,0);
        AddStaticVehicle(490,148.5431,1411.3468,10.7150,179.9983,0,0);
        AddStaticVehicle(497,138.8797,1386.7968,10.8018,2.4932,0,0);
        AddStaticVehicle(541,273.4016,1349.1350,10.2109,179.0862,0,0);
        AddStaticVehicle(401,268.5892,1371.8995,10.3652,1.2857,0,0);
        return 1;
}


public OnFilterScriptExit()
{
    return 1;
}


/*OnPlayerConnect will be called when players is connected to your server. So now we will need to show a register or login dialog*/
public OnPlayerConnect(playerid)
{
        new name[MAX_PLAYER_NAME]; //Making a new variable called 'name'. name[MAX_PLAYER_NAME] is created so we can use it to get player's name.
        GetPlayerName(playerid,name,sizeof(name)); //Get player's name
        if( fexist(Path(playerid))) /* Check if the connected user is registered or not. fexist stands for file exist. So if file exist in the files(Path(playerid)),*/
        {// then
                 INI_ParseFile(Path(playerid),"loadaccount_%s", .bExtra = true, .extra = playerid); //Will load user's data using INI_Parsefile.
                 ShowPlayerDialog(playerid,dlogin,DIALOG_STYLE_PASSWORD,"Login","Welcome back. This account is registered. \nInsert your password to login to your account","Login","Quit");/*A dialog with input style will appear so you can insert your password to login.*/
        }
        else //If the connected user is not registered,
        {   //then we will 'force' him to register :)
                 ShowPlayerDialog(playerid,dregister,DIALOG_STYLE_INPUT,"Register","Welcome! This account is not registered.\nEnter your own password to create a new account.","Register","Quit");
                 return 1;
        }
        GivePlayerMoney(playerid,pInfo[playerid][Money]);
        SetPlayerScore(playerid,pInfo[playerid][Scores]);
        SetPlayerSkin(playerid,pInfo[playerid][Skin]);
        InJail[playerid] = 0;
        RemoveBuildingForPlayer(playerid, 3682, 247.9297, 1461.8594, 33.4141, 0.25);
        RemoveBuildingForPlayer(playerid, 3682, 192.2734, 1456.1250, 33.4141, 0.25);
        RemoveBuildingForPlayer(playerid, 3682, 199.7578, 1397.8828, 33.4141, 0.25);
        RemoveBuildingForPlayer(playerid, 3683, 133.7422, 1356.9922, 17.0938, 0.25);
        RemoveBuildingForPlayer(playerid, 3683, 166.7891, 1356.9922, 17.0938, 0.25);
        RemoveBuildingForPlayer(playerid, 3683, 166.7891, 1392.1563, 17.0938, 0.25);
        RemoveBuildingForPlayer(playerid, 3683, 133.7422, 1392.1563, 17.0938, 0.25);
        RemoveBuildingForPlayer(playerid, 3683, 166.7891, 1426.9141, 17.0938, 0.25);
        RemoveBuildingForPlayer(playerid, 3683, 133.7422, 1426.9141, 17.0938, 0.25);
        RemoveBuildingForPlayer(playerid, 3288, 221.5703, 1374.9688, 9.5859, 0.25);
        RemoveBuildingForPlayer(playerid, 3289, 212.0781, 1426.0313, 9.5859, 0.25);
        RemoveBuildingForPlayer(playerid, 3290, 218.2578, 1467.5391, 9.5859, 0.25);
        RemoveBuildingForPlayer(playerid, 3291, 246.5625, 1435.1953, 9.6875, 0.25);
        RemoveBuildingForPlayer(playerid, 3291, 246.5625, 1410.5391, 9.6875, 0.25);
        RemoveBuildingForPlayer(playerid, 3291, 246.5625, 1385.8906, 9.6875, 0.25);
        RemoveBuildingForPlayer(playerid, 3291, 246.5625, 1361.2422, 9.6875, 0.25);
        RemoveBuildingForPlayer(playerid, 3290, 190.9141, 1371.7734, 9.5859, 0.25);
        RemoveBuildingForPlayer(playerid, 3289, 183.7422, 1444.8672, 9.5859, 0.25);
        RemoveBuildingForPlayer(playerid, 3289, 222.5078, 1444.6953, 9.5859, 0.25);
        RemoveBuildingForPlayer(playerid, 3289, 221.1797, 1390.2969, 9.5859, 0.25);
        RemoveBuildingForPlayer(playerid, 3288, 223.1797, 1421.1875, 9.5859, 0.25);
        RemoveBuildingForPlayer(playerid, 3683, 133.7422, 1459.6406, 17.0938, 0.25);
        RemoveBuildingForPlayer(playerid, 3289, 207.5391, 1371.2422, 9.5859, 0.25);
        RemoveBuildingForPlayer(playerid, 3424, 220.6484, 1355.1875, 9.5859, 0.25);
        RemoveBuildingForPlayer(playerid, 3424, 221.7031, 1404.5078, 9.5859, 0.25);
        RemoveBuildingForPlayer(playerid, 3424, 210.4141, 1444.8438, 9.5859, 0.25);
        RemoveBuildingForPlayer(playerid, 3424, 262.5078, 1465.2031, 9.5859, 0.25);
        RemoveBuildingForPlayer(playerid, 3259, 220.6484, 1355.1875, 9.5859, 0.25);
        RemoveBuildingForPlayer(playerid, 3636, 133.7422, 1356.9922, 17.0938, 0.25);
        RemoveBuildingForPlayer(playerid, 3636, 166.7891, 1356.9922, 17.0938, 0.25);
        RemoveBuildingForPlayer(playerid, 3256, 190.9141, 1371.7734, 9.5859, 0.25);
        RemoveBuildingForPlayer(playerid, 16392, 150.0781, 1378.3438, 11.8438, 0.25);
        RemoveBuildingForPlayer(playerid, 3636, 166.7891, 1392.1563, 17.0938, 0.25);
        RemoveBuildingForPlayer(playerid, 3636, 133.7422, 1392.1563, 17.0938, 0.25);
        RemoveBuildingForPlayer(playerid, 3258, 207.5391, 1371.2422, 9.5859, 0.25);
        RemoveBuildingForPlayer(playerid, 3675, 205.6484, 1394.1328, 10.1172, 0.25);
        RemoveBuildingForPlayer(playerid, 3675, 205.6484, 1392.1563, 16.2969, 0.25);
        RemoveBuildingForPlayer(playerid, 3675, 205.6484, 1394.1328, 23.7813, 0.25);
        RemoveBuildingForPlayer(playerid, 3675, 207.3594, 1390.5703, 19.1484, 0.25);
        RemoveBuildingForPlayer(playerid, 3675, 206.5078, 1387.8516, 27.4922, 0.25);
        RemoveBuildingForPlayer(playerid, 3673, 199.7578, 1397.8828, 33.4141, 0.25);
        RemoveBuildingForPlayer(playerid, 3257, 221.5703, 1374.9688, 9.5859, 0.25);
        RemoveBuildingForPlayer(playerid, 3258, 221.1797, 1390.2969, 9.5859, 0.25);
        RemoveBuildingForPlayer(playerid, 3675, 203.9531, 1409.9141, 16.2969, 0.25);
        RemoveBuildingForPlayer(playerid, 3674, 199.3828, 1407.1172, 35.8984, 0.25);
        RemoveBuildingForPlayer(playerid, 3675, 204.6406, 1409.8516, 11.4063, 0.25);
        RemoveBuildingForPlayer(playerid, 3675, 206.5078, 1404.2344, 18.2969, 0.25);
        RemoveBuildingForPlayer(playerid, 3675, 206.5078, 1400.6563, 22.4688, 0.25);
        RemoveBuildingForPlayer(playerid, 3259, 221.7031, 1404.5078, 9.5859, 0.25);
        RemoveBuildingForPlayer(playerid, 3675, 207.3594, 1409.0000, 19.7578, 0.25);
        RemoveBuildingForPlayer(playerid, 3257, 223.1797, 1421.1875, 9.5859, 0.25);
        RemoveBuildingForPlayer(playerid, 3258, 212.0781, 1426.0313, 9.5859, 0.25);
        RemoveBuildingForPlayer(playerid, 3636, 166.7891, 1426.9141, 17.0938, 0.25);
        RemoveBuildingForPlayer(playerid, 3636, 133.7422, 1426.9141, 17.0938, 0.25);
        RemoveBuildingForPlayer(playerid, 16391, 239.2969, 1367.9922, 11.8359, 0.25);
        RemoveBuildingForPlayer(playerid, 3255, 246.5625, 1361.2422, 9.6875, 0.25);
        RemoveBuildingForPlayer(playerid, 3255, 246.5625, 1385.8906, 9.6875, 0.25);
        RemoveBuildingForPlayer(playerid, 3255, 246.5625, 1410.5391, 9.6875, 0.25);
        RemoveBuildingForPlayer(playerid, 3258, 183.7422, 1444.8672, 9.5859, 0.25);
        RemoveBuildingForPlayer(playerid, 3259, 210.4141, 1444.8438, 9.5859, 0.25);
        RemoveBuildingForPlayer(playerid, 3258, 222.5078, 1444.6953, 9.5859, 0.25);
        RemoveBuildingForPlayer(playerid, 16086, 232.2891, 1434.4844, 13.5000, 0.25);
        RemoveBuildingForPlayer(playerid, 16393, 149.3750, 1452.9375, 11.8516, 0.25);
        RemoveBuildingForPlayer(playerid, 16394, 238.2734, 1452.9375, 11.8359, 0.25);
        RemoveBuildingForPlayer(playerid, 3673, 192.2734, 1456.1250, 33.4141, 0.25);
        RemoveBuildingForPlayer(playerid, 3674, 183.0391, 1455.7500, 35.8984, 0.25);
        RemoveBuildingForPlayer(playerid, 3636, 133.7422, 1459.6406, 17.0938, 0.25);
        RemoveBuildingForPlayer(playerid, 3675, 196.0234, 1462.0156, 10.1172, 0.25);
        RemoveBuildingForPlayer(playerid, 3675, 198.0000, 1462.0156, 16.2969, 0.25);
        RemoveBuildingForPlayer(playerid, 3675, 196.0234, 1462.0156, 23.7813, 0.25);
        RemoveBuildingForPlayer(playerid, 3675, 180.2422, 1460.3203, 16.2969, 0.25);
        RemoveBuildingForPlayer(playerid, 3675, 180.3047, 1461.0078, 11.4063, 0.25);
        RemoveBuildingForPlayer(playerid, 3256, 218.2578, 1467.5391, 9.5859, 0.25);
        RemoveBuildingForPlayer(playerid, 3675, 199.5859, 1463.7266, 19.1484, 0.25);
        RemoveBuildingForPlayer(playerid, 3675, 181.1563, 1463.7266, 19.7578, 0.25);
        RemoveBuildingForPlayer(playerid, 3675, 185.9219, 1462.8750, 18.2969, 0.25);
        RemoveBuildingForPlayer(playerid, 3675, 202.3047, 1462.8750, 27.4922, 0.25);
        RemoveBuildingForPlayer(playerid, 3675, 189.5000, 1462.8750, 22.4688, 0.25);
        RemoveBuildingForPlayer(playerid, 3255, 246.5625, 1435.1953, 9.6875, 0.25);
        RemoveBuildingForPlayer(playerid, 3675, 254.6797, 1451.8281, 27.4922, 0.25);
        RemoveBuildingForPlayer(playerid, 3675, 253.8203, 1458.1094, 23.7813, 0.25);
        RemoveBuildingForPlayer(playerid, 3675, 255.5313, 1454.5469, 19.1484, 0.25);
        RemoveBuildingForPlayer(playerid, 3675, 253.8203, 1456.1328, 16.2969, 0.25);
        RemoveBuildingForPlayer(playerid, 3675, 253.8203, 1458.1094, 10.1172, 0.25);
        RemoveBuildingForPlayer(playerid, 3259, 262.5078, 1465.2031, 9.5859, 0.25);
        RemoveBuildingForPlayer(playerid, 3675, 254.6797, 1468.2109, 18.2969, 0.25);
        RemoveBuildingForPlayer(playerid, 3673, 247.9297, 1461.8594, 33.4141, 0.25);
        RemoveBuildingForPlayer(playerid, 3675, 254.6797, 1464.6328, 22.4688, 0.25);
        RemoveBuildingForPlayer(playerid, 3674, 247.5547, 1471.0938, 35.8984, 0.25);
        RemoveBuildingForPlayer(playerid, 3675, 255.5313, 1472.9766, 19.7578, 0.25);
        RemoveBuildingForPlayer(playerid, 3675, 252.8125, 1473.8281, 11.4063, 0.25);
        RemoveBuildingForPlayer(playerid, 3675, 252.1250, 1473.8906, 16.2969, 0.25);
        RemoveBuildingForPlayer(playerid, 16089, 342.1250, 1431.0938, 5.2734, 0.25);
        RemoveBuildingForPlayer(playerid, 16090, 315.7734, 1431.0938, 5.2734, 0.25);
        RemoveBuildingForPlayer(playerid, 16091, 289.7422, 1431.0938, 5.2734, 0.25);
        RemoveBuildingForPlayer(playerid, 16087, 358.6797, 1430.4531, 11.6172, 0.25);
        return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
        pInfo[killerid][Kills]++;//Will give 1 kill to killer and it will be saved inside of his/her account
        pInfo[playerid][Deaths]++;//Will give 1 death each time they die and it will be saved inside of his/her account
        SavePlayerData(playerid);
        return 1;
}

public OnPlayerSpawn(playerid)
{
        if(InJail[playerid] == 1)
        {
                new rand = random(sizeof(JailCellSpawns));
                SetPlayerPos(playerid, JailCellSpawns[rand][0], JailCellSpawns[rand][1], JailCellSpawns[rand][2]);
                SendClientMessage(playerid, red, "Jail Time Did Not End Yet");
                SetPlayerSkin(playerid, 0);
                SetPlayerArmour(playerid, 0);
                SetPlayerHealth(playerid, 50);
                ResetPlayerWeapons(playerid);
                GameTextForPlayer(playerid, "~r~Back To Jail",10000,3);
                return 1;
        }
        return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    //Same as OnDialogResponse, we will save their stats inside of their user's account
        new INI:file = INI_Open(Path(playerid)); //will open their file
        INI_SetTag(file,"Player's Data");//We will set a tag inside of user's account called "Player's Data"
        INI_WriteInt(file,"AdminLevel",pInfo[playerid][Adminlevel]); //If you've set his/her admin level, then his/her admin level will be saved inside of his/her account
        INI_WriteInt(file,"Money",GetPlayerMoney(playerid));//We will save his money inside of his account
        INI_WriteInt(file,"Scores",GetPlayerScore(playerid));//We will save his score inside of his account
        INI_WriteInt(file,"Kills",pInfo[playerid][Kills]);//As explained above
        INI_WriteInt(file,"Deaths",pInfo[playerid][Deaths]);//As explained above
        INI_WriteInt(file,"Skin",pInfo[playerid][Skin]);
        INI_WriteInt(file,"Cookies",pInfo[playerid][Cookies]);
        INI_WriteInt(file,"Cakes",pInfo[playerid][Cakes]);
        INI_WriteInt(file,"Biscuit",pInfo[playerid][Biscuit]);
        INI_WriteInt(file,"icecream",pInfo[playerid][Icecream]);
        INI_Close(file);//Now after we've done saving their data, we now need to close the file
        return 1;
}


stock SavePlayerData(playerid)
{
        new INI:file = INI_Open(Path(playerid));
        INI_SetTag(file,"Player's Data");
        INI_WriteInt(file,"AdminLevel",pInfo[playerid][Adminlevel]);
        INI_WriteInt(file,"Money",GetPlayerMoney(playerid));
        INI_WriteInt(file,"Scores",GetPlayerScore(playerid));
        INI_WriteInt(file,"Kills",pInfo[playerid][Kills]);
        INI_WriteInt(file,"Deaths",pInfo[playerid][Deaths]);
        INI_WriteInt(file,"Skin",pInfo[playerid][Skin]);
        INI_WriteInt(file,"Cookies",pInfo[playerid][Cookies]);
        INI_WriteInt(file,"Cakes",pInfo[playerid][Cakes]);
        INI_WriteInt(file,"Biscuit",pInfo[playerid][Biscuit]);
        INI_WriteInt(file,"icecream",pInfo[playerid][Icecream]);
        INI_Close(file);

        return 1;
}

CMD:acmds(playerid, params[])
{
        new string[300];
        format( string , sizeof( string ) , " /setlevel ( playerid / Name ) ( level )\n/slvl .. SetLevel\n /settp  \n/Cookie ( playerid ) \n    /Cake ( playerid ) \n/Biscuit ( playerid )  \n/Icecream ( playerid ) \n/Givejetpack ( playerid ) \n/GiveallMoney ( Amount ) \n/Gjp .. GiveJetpack");
        SendClientMessage(playerid,COLOR_MESSAGE_YELLOW,string);
        return 1;
}

CMD:setlevel(playerid,params[])
{
        new id,level;
        if(pInfo[playerid][Adminlevel] >= 9 || IsPlayerAdmin(playerid))
        {

            if(sscanf(params,"ud",id,level))
            {
                SendClientMessage(playerid,COLOR_MESSAGE_YELLOW,"**[USAGE]: /Setlevel ( playerid / name )");
                SendClientMessage(playerid,COLOR_MESSAGE_YELLOW,"**You can also use a short cmd /slvl ( playerid / name )");
                return true;
            }
            if(!IsPlayerConnected(id)) return SendClientMessage(playerid,COLOR_MESSAGE_YELLOW,"**Player is not connected ");
            if(level < 3 || level > 9) return SendClientMessage(playerid,COLOR_MESSAGE_YELLOW,"**Only 3-9 levels allowed!");
            if(level < pInfo[id][Adminlevel])
            {
                new string[128],
                str[256];
                format(string,sizeof string,"**Admin %s (ID:%d) Set your level to %d ( DEMOTED ) !",GetName(playerid),playerid,level);
                SendClientMessage(id,COLOR_MESSAGE_YELLOW,string);
                format(str,sizeof(str),"**You ( Demoted ) %s(ID:%d) To level %d !.../admins",GetName(id),id,level);
                SendClientMessage(playerid,COLOR_MESSAGE_YELLOW,str);
                GameTextForPlayer(id,"~r~~h~~h~Demoted",4000,3);
                pInfo[id][Adminlevel] = level;
                SavePlayerData(id);
            }
            else if(level > pInfo[id][Adminlevel])
            {
                new string[128],
                str[256];
                format(string,sizeof string,"**Admin %s (ID:%d) Set your level to %d ( PROMOTED ) !",GetName(playerid),playerid,level);
                SendClientMessage(id,COLOR_MESSAGE_YELLOW,string);
                format(str,sizeof(str),"**You ( Promoted ) %s(ID:%d) To level %d !.../admins",GetName(id),id,level);
                SendClientMessage(playerid,COLOR_MESSAGE_YELLOW,str);
                GameTextForPlayer(id,"~r~~h~~h~Promoted",4000,3);
                pInfo[id][Adminlevel] = level;
                SavePlayerData(id);
            }
        } else SendClientMessage(playerid,COLOR_MESSAGE_YELLOW,"**Your Not An Admin to use tih cmd");
        return 1;
}

CMD:slvl(playerid,params[])
{
        return cmd_setlevel(playerid,params);
}

CMD:levels(playerid,params[])
{
        SendClientMessage(playerid,COLOR_GREEN,"Level 1 = Registerd User\nLevel 2 = Trusted player\nLevel 3 = Admin Level 3 , Level 4 = Admin Level 4, Level 5 = Ubber Admin\nLevel 6 =Lead Admin , Level 7 = Head Admin , Level 8 = Special Admin \nLevel 9 = Management, Level 10 = Server Owner");
        return 1;
}
CMD:credits(playerid,params[])
{

        SendClientMessage(playerid,COLOR_RED, "Fs Created by 'Namer'");
        SendClientMessage(playerid,COLOR_MESSAGE_YELLOW, "Best Fs ever");
        return 1;
}
CMD:settp(playerid,params[])
{
        new id;
        if(pInfo[playerid][Adminlevel] >= 5 || IsPlayerAdmin(playerid))
        {

            if(sscanf(params,"u",id))
            {
               SendClientMessage(playerid,COLOR_MESSAGE_YELLOW,"**[USAGE]: /disabletp [playerid/name]");
               SendClientMessage(playerid,COLOR_MESSAGE_YELLOW,"**You can also use a short cmd /dtp ( Playerid / Name )");
               return true;
            }
            if(!IsPlayerConnected(id)) return SendClientMessage(playerid,COLOR_MESSAGE_YELLOW,"**Player is not connected ");

            new string[300],
            str[256];
            format(string,sizeof string,"**Admin %s (ID:%d) Has Disabled TP status for you ( PROMOTED ) !",GetName(playerid),playerid);
            SendClientMessage(id,COLOR_MESSAGE_YELLOW,string);
            format(str,sizeof(str),"**You ( PROMOTED ) %s(ID:%d) To Tp /Tps",GetName(id),id);
            SendClientMessage(playerid,COLOR_MESSAGE_YELLOW,str);
            GameTextForPlayer(id,"~r~~h~~h~PROMOTED",4000,3);
            pInfo[id][Adminlevel] = 2;
            SavePlayerData(id);

        } else SendClientMessage(playerid,COLOR_MESSAGE_YELLOW,"**Your Not An Admin to use this cmd");
        return 1;
}

CMD:cookie(playerid, params[]) // CMD for giving somebody a cookie
{
        new pid;
        new str[250];
        if(pInfo[playerid][Adminlevel] >= 3)
        {
             if(sscanf(params, "u", pid)) return SendClientMessage(playerid, COLOR_MESSAGE_YELLOW, "USAGE: /givecookie [Player ID]");
             if(!IsPlayerConnected(pid)) return SendClientMessage(playerid, COLOR_MESSAGE_YELLOW, "PlayerID is not connected.");

             pInfo[playerid][Cookies] += 1;
             format(str, sizeof(str), "**Admin %s (ID:%d) has give a cookie to %s.(ID:%d) and %s cookie count is (%d)",GetName(playerid),playerid, GetName(pid),pid,GetName(pid),pInfo[pid][Cookies]);
             SendClientMessageToAll(COLOR_ORANGE, str);
             GameTextForPlayer(pid,"~g~~h~~h~Cookie",3000,4);
             format(str, sizeof(str), "**You just gave a cookie to %s.", GetName(pid));
             SendClientMessage(playerid, COLOR_GREEN, str);

        }
        else SendClientMessage(playerid, COLOR_MESSAGE_YELLOW, "**You're not authorized to use this command.");
        return 1;
}


CMD:cake(playerid, params[]) // CMD for giving somebody a cake
{
        new pid;
        new str[250];
        if(pInfo[playerid][Adminlevel] >= 3)
        {
             if(sscanf(params, "u", pid)) return SendClientMessage(playerid, COLOR_MESSAGE_YELLOW, "USAGE: /cake [Player ID]");
             if(!IsPlayerConnected(pid)) return SendClientMessage(playerid, COLOR_MESSAGE_YELLOW, "PlayerID is not connected.");

             pInfo[playerid][Cakes] += 1;
             format(str, sizeof(str), "**Admin %s (ID:%d) has give a cake to %s.(ID:%d) and %s cake count is (%d)",GetName(playerid),playerid, GetName(pid),pid,GetName(pid),pInfo[pid][Cakes]);
             SendClientMessageToAll(COLOR_ORANGE, str);
             GameTextForPlayer(pid,"~g~~h~~h~cake",3000,4);
             format(str, sizeof(str), "**You just gave a cake to %s.", GetName(pid));
             SendClientMessage(playerid, COLOR_GREEN, str);

        }
        else SendClientMessage(playerid, COLOR_MESSAGE_YELLOW, "**You're not authorized to use this command.");
        return 1;
}


CMD:biscuit(playerid, params[]) // CMD for giving somebody a biscuit
{
        new pid;
        new str[250];
        if(pInfo[playerid][Adminlevel] >= 3)
        {
             if(sscanf(params, "u", pid)) return SendClientMessage(playerid, COLOR_MESSAGE_YELLOW, "USAGE: /biscuit [Player ID]");
             if(!IsPlayerConnected(pid)) return SendClientMessage(playerid, COLOR_MESSAGE_YELLOW, "PlayerID is not connected.");

             pInfo[playerid][Biscuit] += 1;
             format(str, sizeof(str), "**Admin %s (ID:%d) has give a biscuit to %s.(ID:%d) and %s biscuit count is (%d)",GetName(playerid),playerid, GetName(pid),pid,GetName(pid),pInfo[pid][Biscuit]);
             SendClientMessageToAll(COLOR_ORANGE, str);
             GameTextForPlayer(pid,"~g~~h~~h~biscuit",3000,4);
             format(str, sizeof(str), "**You just gave a biscuit to %s.", GetName(pid));
             SendClientMessage(playerid, COLOR_GREEN, str);

        }
        else SendClientMessage(playerid, COLOR_MESSAGE_YELLOW, "**You're not authorized to use this command.");
        return 1;
}


CMD:iceream(playerid, params[]) // CMD for giving somebody a iceream
{
        new pid;
        new str[250];
        if(pInfo[playerid][Adminlevel] >= 3)
        {
             if(sscanf(params, "u", pid)) return SendClientMessage(playerid, COLOR_MESSAGE_YELLOW, "USAGE: /iceream [Player ID]");
             if(!IsPlayerConnected(pid)) return SendClientMessage(playerid, COLOR_MESSAGE_YELLOW, "PlayerID is not connected.");

             pInfo[playerid][Icecream] += 1;
             format(str, sizeof(str), "**Admin %s (ID:%d) has give a iceream to %s.(ID:%d) and %s iceream count is (%d)",GetName(playerid),playerid, GetName(pid),pid,GetName(pid),pInfo[pid][Icecream]);
             SendClientMessageToAll(COLOR_ORANGE, str);
             GameTextForPlayer(pid,"~g~~h~~h~iceream",3000,4);
             format(str, sizeof(str), "**You just gave a iceream to %s.", GetName(pid));
             SendClientMessage(playerid, COLOR_GREEN, str);

        }
        else SendClientMessage(playerid, COLOR_MESSAGE_YELLOW, "**You're not authorized to use this command.");
        return 1;
}
CMD:skin(playerid, params[]) // Creating the /skin command.
{
        new skinid,string[256];
        // If you want make this command only available for Rcon Admins, then remove // characters below this.
        //if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xFF0000FF, "You aren't allowed to use this command.");
        if(sscanf(params, "d", skinid)) return SendClientMessage(playerid, 0xFF0000FF, "USAGE: /skin (skinid)"); // Player has used the command without params, then we send him a message.

        // Now the variable 'skinid' contains the value that player has gave as params.
        // Example /skin 294 and the variable contains now the value '294'

        if(skinid > 299 || skinid < 0) return SendClientMessage(playerid, 0xFF0000FF, "Invalid Skin ID!");

        // Now everything seems okay and we change his skin!
        SetPlayerSkin(playerid, skinid); // As you know the 'skinid' contains the value of player's given params.
        format(string,sizeof(string),"** You changed your skin to %d",skinid);
        SendClientMessage(playerid,-1,string);
        pInfo[playerid][Skin] = skinid;
        SavePlayerData(playerid);
        return 1; // Of course we need return a value.
}

CMD:givejetpack(playerid,params[])
{
        new gplayer;
        if(pInfo[playerid][Adminlevel] >= 5 || IsPlayerAdmin(playerid))
        {
            if(sscanf(params,"u", gplayer))
            {
                SendClientMessage(playerid,-1, "**USAGE: /givejetpack <player id/name>");
                SendClientMessage(playerid,-1,"**You can also use shortcut cmd /gjp to give player jetpack");
                return true;
            }
            SetPlayerSpecialAction(gplayer,SPECIAL_ACTION_USEJETPACK);
            SendClientMessage(playerid,-1,"**You give jetpack  ");
        }
        else return SendClientMessage(playerid,-1,"**Your not an admin to use this command");
        return 1;
}

CMD:gjp(playerid,params[])
{
        return cmd_givejetpack(playerid, params);
}

CMD:giveallmoney(playerid, params[])
{
        if(pInfo[playerid][Adminlevel] >= 5 || IsPlayerAdmin(playerid))
        {
            new         // the player we want to give money to
            amount;
            // extracting player's ID and amount from params
            if (!sscanf(params, "ii", amount))
            {
                for(new i = 0; i<MAX_PLAYERS; i++)
                {
                new
                message[250],
                str[128];
                GivePlayerMoney(i, amount);
                format(message, sizeof(message), "**Admin %s (ID:%d) has Gave Everyone $%d",GetName(playerid),playerid, amount);
                SendClientMessage(i, 0x00FF00FF, message);
                format(str,128,"~G~~h~~h~%d$ For Everyone",amount);
                GameTextForAll(str,5000,1);
                }
            }
            else SendClientMessage(playerid, 0xFFFFFFFF, "**Usage: /giveallmoney <amount>");
        }
        else SendClientMessage(playerid, 0xFF0000FF, "**Only admins can use this command!");
        return 1;
}

CMD:jetpack(playerid)
{
          if( pInfo[playerid][Adminlevel] >= 2 )
          {
                SetPlayerSpecialAction( playerid , SPECIAL_ACTION_USEJETPACK );
                SendClientMessage (playerid , COLOR_GREEN , "**You typed /jetpack to get free jetpack" );
          }
          else return SendClientMessage(playerid , COLOR_MESSAGE_YELLOW , "**only Tps and admin can get jp" );
          return 1;
}

CMD:jp( playerid,params[] )
{
        return cmd_jetpack( playerid );
}

CMD:tps(playerid, params[])
{

        new count;
        new string[128],stringz[128];
        for( new i = 0; i < MAX_PLAYERS; i++ )
        {
            if ( IsPlayerConnected( i ) )
            {
                if( pInfo[i][Adminlevel] == 2 )
                {
                    format( string, 128, "%s (ID:%d) " ,GetName( playerid ) , playerid );
                    format( stringz,128,"Total Trusted Player Online(%d) ",count);
                    ShowPlayerDialog( playerid ,1 ,DIALOG_STYLE_MSGBOX ,stringz ,string ,"Ok" ,"Close" );
                    count++;
                }
            }

            if ( count == 0 )
            {
                format(stringz,128,"no Trusted Player Online ");
                format(string,128," no Trusted Player Online");
                ShowPlayerDialog(playerid,2,DIALOG_STYLE_MSGBOX,stringz , string , "Ok" , "Close" );
            }
        }
        return 1;
}


CMD:admins(playerid, params[])
{

        new count;
        new admtext[128];
        new string[128],stringz[128];
        for( new i = 0; i < MAX_PLAYERS; i++ )
        {
            if ( IsPlayerConnected( i ) )
            {
                if( pInfo[i][Adminlevel] >= 3 )
                {
                    switch( pInfo[i][Adminlevel] )
                    {
                        case 10: admtext = "Server Owner";
                        case 9: admtext = "Management";
                        case 8: admtext = "Rx Special Admin";
                        case 7: admtext = "head admin";
                        case 6: admtext = "lead admin";
                        case 5: admtext = "ubber admin";
                        case 4: admtext = "Admin";
                        case 3: admtext = "Admin";
                    }
                    format( stringz , 128," %d Total Admins Online ", count);
                    format( string, 128, "%s (ID:%d) Level:%d (%s) ", GetName( playerid ), playerid , pInfo[i][Adminlevel] , admtext );
                    ShowPlayerDialog( playerid , 1 , DIALOG_STYLE_MSGBOX , stringz , string, "Ok"  , "Close" );
                    count++;
                 }
            }
            if (count == 0)
            {
               format( stringz , 128 ,"no Admins Online ");
               format( string , 128 ,"Currently NO admin online\nAdmins Watching from IRC\nand Admins Eyes always on you" );
               ShowPlayerDialog( playerid,2,DIALOG_STYLE_MSGBOX , stringz , string , "Ok" , "Close" );
            }
        }
        return 1;
}

//Jailing:
CMD:jail(playerid,params[])
{
    if( pInfo[playerid][Adminlevel] >= 3 )
    {
                                new pId, time;
                                if(sscanf(params, "dds", pId, time, params[3])) return SendClientMessage(playerid, red, "Usage: /jail (ID) (time in minuets) (reason)");
                                else if(!IsPlayerConnected(pId)) return SendClientMessage(playerid, red, "Invalid ID");
                                else if(InJail[pId] == 1) return SendClientMessage(playerid, red, "Player is already in jail");
                                else
                                {
                                    new pname[MAX_PLAYER_NAME], jname[MAX_PLAYER_NAME], string1[250];
                                    GetPlayerName(playerid, pname, sizeof(pname));
                                    GetPlayerName(pId, jname, sizeof(jname));
                                    new rand = random(sizeof(JailCellSpawns));
                                    SetPlayerPos(pId, JailCellSpawns[rand][0], JailCellSpawns[rand][1], JailCellSpawns[rand][2]);
                                    SetTimerEx("UnJail",time*1000*60,0,"i",pId);
                                    SetPlayerSkin(playerid, 0);
                                    ResetPlayerWeapons(pId);
                                    SetPlayerArmour(pId, 0);
                                    SetPlayerHealth(pId, 50);
                                    InJail[pId] = 1;
                                    format(string1, sizeof(string1), " %s(ID:%d) has been jailed by Admin %s(ID:%d) For (%s) %d Min", jname, pId, params[3] , time);
                                    SendClientMessageToAll(red, string1);
                                    return 1;
                                }
                        }
                        else return SendClientMessage(playerid, red, "You're not allowed to use this command.");
}

CMD:unjail(playerid,params[])
{
    if( pInfo[playerid][Adminlevel] >= 3 )
    {
                new player1;
                if(isnull(params)) return SendClientMessage(playerid, red, "USAGE: /unjail [playerid]");
                else if(InJail[player1] == 0) return SendClientMessage(playerid, red, "Player is already out of jail or is not connected");
                else
                player1 = strval(params);
                {
                        new id,
                        str[256];
                        format(str,sizeof(str),"%s(ID:%d) has been released from jail by Admin %s(ID:%d)",GetName(id),id,GetName(playerid),playerid);
                        SendClientMessageToAll(COLOR_GREEN,str);
                        SendClientMessage(id,COLOR_MESSAGE_YELLOW,"You have been released from jail ");
                        return UnJail(player1);
                }
        }
        else return SendClientMessage(playerid, red, "You're not allowed to use this command.");
}

//Gates Commands:
CMD:gatesinfo(playerid,params[])
{
        if(!IsPlayerAdmin(playerid)) {
        return SendClientMessage(playerid,red,"You're not allowed to use this command.");
        } else {
        SendClientMessage(playerid,red,"/gatemain - For the main gate");
        SendClientMessage(playerid,red,"/gateprison - For the prisoners's gate");
        SendClientMessage(playerid,red,"/gateguard - For the guard's gate");
        SendClientMessage(playerid,red,"/gatecars - For the cars's to enter");
        }
        return 1;
}

CMD:gatemain(playerid,params[])
{
        if(!IsPlayerAdmin(playerid))
        return SendClientMessage(playerid,red,"You're not allowed to use this command.");
        else

                switch(Open{0})
                {
                        case true:
                        {
                                MoveObject(Gate[0],288.21933, 1411.60046, 6.55341,10);
                                Open{0} = false;
                        }
                        case false:
                        {
                                MoveObject(Gate[0],288.21933, 1411.60046, 12.11350,10);
                                Open{0} = true;
                        }
                }
        return 1;
}

CMD:gateprison(playerid,params[])
{
        if(!IsPlayerAdmin(playerid))
        return SendClientMessage(playerid,red,"You're not allowed to use this command.");
        else

                switch(Open{1})
                {
                        case true:
                        {
                                MoveObject(Gate[1],205.2051, 1425.8093, 6.33434,10);
                                Open{1} = false;
                        }
                        case false:
                        {
                                MoveObject(Gate[1],205.0506, 1425.8093, 10.8416,10);
                                Open{1} = true;
                        }
                }
        return 1;
}

CMD:gateguard(playerid,params[])
{
        if(!IsPlayerAdmin(playerid))
        return SendClientMessage(playerid,red,"You're not allowed to use this command.");
        else

                switch(Open{2})
                {
                        case true:
                        {
                                MoveObject(Gate[2],276.7187, 1392.7837, 6.3300,10);
                                Open{2} = false;
                        }
                        case false:
                        {
                                MoveObject(Gate[2],276.71869, 1392.78369, 10.67510,10);
                                Open{2} = true;
                        }
                }
        return 1;
}

CMD:gatecars(playerid,params[])
{
        if(!IsPlayerAdmin(playerid))
        return SendClientMessage(playerid,red,"You're not allowed to use this command.");
        else

                switch(Open{3})
                {
                        case true:
                        {
                                MoveObject(Gate[3],269.75021, 1413.76233, 10.15275,10);
                                Open{3} = false;
                        }
                        case false:
                        {
                                MoveObject(Gate[3],269.7502, 1413.7623, 8.6981 ,10);
                                Open{3} = true;
                        }
                }
        return 1;
}

CMD:freeze(playerid, params[]) // ZCMD Start
{
    if( pInfo[playerid][Adminlevel] >= 3 )
    {
        if(sscanf(params, "u", playerb)) return SendClientMessage(playerid, 0xFFFFFFAA, "USAGE: /freeze [playerid]"); // SSCANF check if we entered an id or not
        if(!IsPlayerConnected(playerb)) return SendClientMessage(playerid, 0xFFFFFFAA, "Invalid player id"); // Check if the player id we entered is valid
        if(IsFrozen[playerb]) return SendClientMessage(playerid, 0xFFFFFFAA, "Player is already frozen."); // Check if the player is frozen already
        IsFrozen[playerb] = 1; // Sets the player's frozen variable to 1
        GetPlayerPos(playerb, FX[playerb], FY[playerb], FZ[playerb]); // Saves the player's coordinates to the variables we defined at the top
        SendClientMessage(playerb, 0xFFFFFFAA, "You have been frozen."); // Sends a message to the player informing him about being frozen
    }
    else
    {
        SendClientMessage(playerid, 0xFFFFFFAA," Only Admin can use this cmd ");

    }
    return 1;
}

CMD:unfreeze(playerid, params[]) // ZCMD Start
{
    if( pInfo[playerid][Adminlevel] >= 3 )
    {
        if(sscanf(params, "u", playerb)) return SendClientMessage(playerid, 0xFFFFFFAA, "USAGE: /unfreeze [playerid]");// SSCANF check if we entered an id or not
        if(!IsPlayerConnected(playerb)) return SendClientMessage(playerid, 0xFFFFFFAA, "Invalid player id"); // Check if the player id we entered is valid
        if(!IsFrozen[playerb]) return SendClientMessage(playerid, 0xFFFFFFAA, "Player is not frozen.");  // Check if the player is not frozen
        IsFrozen[playerb] = 0; // Sets the player's frozen variable to 0
        SendClientMessage(playerb, 0xFFFFFFAA, "You have been unfrozen."); // Sends a message to the player informing him about being unfrozen
    }
    else
    {
        SendClientMessage(playerid, 0xFFFFFFAA," Only Admin can use this cmd ");

    }
    return 1;
}


public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == dregister) //If dialog id is a register dialog
    {//then
        if(!response) return Kick(playerid); //If they clicked the second button "Quit", we will kick them.
        if(response) //if they clicked the first button "Register"
        {//then
            if(!strlen(inputtext)) //If they didn't enter any password
            {// then we will tell to them to enter the password to register
                new stringx[300],
                ip[16],
                name[MAX_PLAYER_NAME];
                GetPlayerIp(playerid,ip,sizeof(ip));
                GetPlayerName(playerid,name,sizeof(name));
                format(stringx,sizeof(stringx),"Welcome! This account is not registered.\nAccount Name : %s\nCurrent IP : %s\nEnter your own password to create a new account.\nPlease enter the password!",name,ip);
                ShowPlayerDialog(playerid,dregister,DIALOG_STYLE_INPUT,"Register Dialog",stringx,"Register","Quit");
               // SCM(playerid,COLOR_RED,"Welcome! This account is not registered.\nAccount Name : %s\nCurrent IP : %s\nEnter your own password to create a new account.\nPlease enter the password!",name,ip);
                return 1;
            }
            //If they have entered a correct password for his/her account...
            new hashpass[129]; //Now we will create a new variable to hash his/her password
            WP_Hash(hashpass,sizeof(hashpass),inputtext);//We will use whirlpool to hash their inputted text
            new INI:file = INI_Open(Path(playerid)); // we will open a new file for them to save their account inside of Scriptfiles/Users folder
            INI_SetTag(file,"Player's Data");//We will set a tag inside of user's account called "Player's Data"
            INI_WriteString(file,"Password",hashpass);//This will write a hashed password into user's account
            INI_WriteInt(file,"AdminLevel",1); //Write an integer inside of user's account called "AdminLevel". We will set his level to 0 after he registered.
            INI_WriteInt(file,"Money",50000);//Write an integer inside of user's account called "Money". We will set their money to 0 after he registered
            INI_WriteInt(file,"Scores",0);//Write an integer inside of user's account called "Scores". We will set their score to 0 after he registered
            INI_WriteInt(file,"Kills",0);//As explained above
            INI_WriteInt(file,"Deaths",0);//As explained above
            INI_WriteInt(file,"Skin",0);
            INI_WriteInt(file,"Cookies",0);
            INI_WriteInt(file,"Cakes",0);
            INI_WriteInt(file,"Biscuit",0);
            INI_WriteInt(file,"icecream",0);
            INI_Close(file);//Now after we've done saving their data, we now need to close the file
            SendClientMessage(playerid,COLOR_RED,"You have been successfully registered");//Tell to them that they have successfully registered a new account
            return 1;
        }
    }
    if(dialogid == dlogin) //If dialog id is a login dialog
    {//then
        if(!response) return Kick(playerid); //If they clicked the second button "Quit", we will kick them.
        if(response) //if they clicked the first button "Register"
        {//then
            new hashpass[129]; //Will create a new variable to hash his/her password
            WP_Hash(hashpass,sizeof(hashpass),inputtext); //Will hash inputted password
            if(!strcmp(hashpass, pInfo[playerid][Pass], false)) //If they have insert their correct password
            {//then
                INI_ParseFile(Path(playerid),"loadaccount_%s",.bExtra = true, .extra = playerid);//We will load his account's data from user's path
                SetPlayerScore(playerid,pInfo[playerid][Scores]);//We will get their score inside of his user's account and we will set it here
                GivePlayerMoney(playerid,pInfo[playerid][Money]);//As explained above
                SendClientMessage(playerid,COLOR_RED,"Welcome back! You have successfully logged in");//Tell them that they've successfully logged in
            }
            else //If they've entered an incorrect password
            {//then
                ShowPlayerDialog(playerid,dlogin,DIALOG_STYLE_PASSWORD,"Login","Welcome back. This account is registered. \nInsert your password to login to your account.\nIncorrect password!","Login","Quit");//We will tell to them that they've entered an incorrect password
                return 1;
            }
        }
    }
    return 1;
}


public OnPlayerCommandReceived(playerid, cmdtext[])
{
        if (InJail[playerid] == 1 && !IsPlayerAdmin(playerid))
        {
        SendClientMessage(playerid, red, "You Are Not Allowed To Type Any Command While In Jail.");
        return 0;
        }
        return 1;
}


public UnJail(pId)
{
        SpawnPlayer(pId);
        SendClientMessage(pId, 0xFF0000AA, "You Have Been Released From Jail.");
        GameTextForPlayer(pId, "~r~Released From Jail",5000,3);
        InJail[pId] = 0;
        return 1;
}

public OnPlayerUpdate(playerid)
{
        if(IsFrozen[playerid]) // Check to make sure the player is frozen
        {
            if(GetPlayerWeapon(playerid) != 0) // Check to see if the player is holding a weapon
            {
                SetPlayerArmedWeapon(playerid, 0); // Hides the weapon from player's hand, to prevent shooting while standing still
            }
            new Float:FFX, Float:FFY, Float:FFZ; // Variables we will use to compare to the ones we defined at the top
            GetPlayerPos(playerid, FFX, FFY, FFZ); // Getting the player's current position
            if(FX[playerid] != FFX || FY[playerid] != FFY || FZ[playerid] != FFZ) // Check to see if the player has moved
            {
                SetPlayerPos(playerid, FX[playerid], FY[playerid], FZ[playerid]); // Sets his position back to the coordinates he was frozen at
            }
        }
        return 1;
}
//Now we will use our own function that we have created above
public loadaccount_user(playerid, name[], value[])
{
        INI_String("Password", pInfo[playerid][Pass],129); /*we will use INI_String to load user's password.
        ("Password",.. will load user's password inside of user's path. 'pInfo[playerid][Pass]',...We have defined our user's variable above called, pInfo. Now it's time to use it here to load user's password. '129',... 129 is a length of a hashed user's password. Whirlpool will hash 128 characters + NULL*/
        INI_Int("AdminLevel",pInfo[playerid][Adminlevel]);/*We will use INI_Int to load user's admin level. INI_Int stands for INI_Integer. This load an admin level. */
        INI_Int("Money",pInfo[playerid][Money]); //As explained above
        INI_Int("Scores",pInfo[playerid][Scores]);//As explained above
        INI_Int("Kills",pInfo[playerid][Kills]);//As explained above
        INI_Int("Deaths",pInfo[playerid][Deaths]);//As explained above
        INI_Int("Skin",pInfo[playerid][Skin]);
        INI_Int("Cookies",pInfo[playerid][Cookies]);
        INI_Int("Cakes",pInfo[playerid][Cakes]);
        INI_Int("Biscuit",pInfo[playerid][Biscuit]);
        INI_Int("icecream",pInfo[playerid][Icecream]);
        return 1;
}


stock GetName(playerid)
{
 new name[MAX_PLAYER_NAME];
 GetPlayerName(playerid,name,sizeof(name));
 return name;
}
credits
*****
zeex
if i forget others credits tell i'll add it
if you found any bug post here

Updated ( bug fixed )
Reply
#2

lol its awesome thank yuh
Reply
#3

If this is run as a filterscript, the code under OnGameModeInit() will never be used.
Reply
#4

ops my bad Fixed
Reply
#5

Replace OnGameModeInit to OnFilterScriptInit. if you using YSI, Use OnScriptInit
Reply
#6

help me ?
how to install it ?
Reply
#7

Gonna try it
Reply
#8

you can tell incules and plugins
Reply
#9

Very nice, keep it up, and good use with y_ini!
Reply
#10

there is only 2 plugins " 1= whirlpool, 2= sscanf"
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)