Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #define red 0xFF0000AA
- #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
- new Door;
- new DoorTimer;
- forward PublicDoor(playerid);
- main()
- {
- print("---");
- print("| MaZe Minigame v1 by Dragon loaded |");
- print(" ---");
- }
- public OnGameModeInit()
- {
- SetGameModeText("MaZe v1");
- AddPlayerClass(1, 1962.7941, -2462.0320, 13.5391, 91.2141, 9, 1, 0, 0, 0, 0);
- AddPlayerClass(9, 1962.7941, -2462.0320, 13.5391, 91.2141, 9, 1, 0, 0, 0, 0);
- SetWorldTime(0);
- SetWeather(9);
- //Map, no gates or extra
- CreateObject(974, 1963.282959, -2465.574951, 15.316857, 0.0000, 0.0000, 0.0000);
- CreateObject(974, 1956.580566, -2465.585449, 15.316858, 0.0000, 0.0000, 0.0000);
- CreateObject(974, 1959.590698, -2455.522949, 15.316857, 0.0000, 0.0000, 91.9597);
- CreateObject(974, 1963.015259, -2458.855957, 15.316858, 0.0000, 0.0000, 0.0000);
- CreateObject(974, 1952.883057, -2455.510498, 15.316858, 0.0000, 0.0000, 91.9597);
- CreateObject(974, 1962.859375, -2452.197510, 15.316858, 0.0000, 0.0000, 0.0000);
- CreateObject(974, 1949.427612, -2452.212891, 15.316858, 0.0000, 0.0000, 0.0000);
- CreateObject(974, 1953.106934, -2462.209229, 15.316858, 0.0000, 0.0000, 91.9597);
- CreateObject(974, 1966.433105, -2462.207031, 15.316858, 0.0000, 0.0000, 91.9597);
- CreateObject(974, 1959.101440, -2442.170898, 15.324616, 0.0000, 0.0000, 91.9597);
- CreateObject(974, 1949.179443, -2445.552734, 15.316858, 0.0000, 0.0000, 0.0000);
- CreateObject(974, 1965.846313, -2442.150391, 15.324615, 0.0000, 0.0000, 91.9597);
- CreateObject(974, 1969.310913, -2445.444092, 15.324615, 0.0000, 0.0000, 0.0000);
- CreateObject(974, 1972.781372, -2448.818848, 15.324615, 0.0000, 0.0000, 91.9597);
- CreateObject(974, 1973.011353, -2455.470947, 15.324615, 0.0000, 0.0000, 91.9597);
- CreateObject(974, 1969.727295, -2458.875488, 15.324615, 0.0000, 0.0000, 0.0000);
- CreateObject(974, 1965.614502, -2435.505127, 15.324615, 0.0000, 0.0000, 91.9597);
- CreateObject(974, 1955.623047, -2438.863281, 15.324615, 0.0000, 0.0000, 0.0000);
- CreateObject(974, 1948.939087, -2438.851563, 15.316857, 0.0000, 0.0000, 0.0000);
- CreateObject(974, 1962.179321, -2432.174561, 15.324615, 0.0000, 0.0000, 0.0000);
- CreateObject(974, 1942.511963, -2445.563721, 15.316856, 0.0000, 0.0000, 0.0000);
- CreateObject(974, 1939.048706, -2442.228516, 15.316858, 0.0000, 0.0000, 91.9597);
- CreateObject(974, 1946.202637, -2455.555664, 15.316859, 0.0000, 0.0000, 91.9597);
- CreateObject(974, 1942.986328, -2458.858887, 15.316858, 0.0000, 0.0000, 0.0000);
- CreateObject(974, 1949.861450, -2465.577881, 15.316858, 0.0000, 0.0000, 0.0000);
- CreateObject(974, 1943.153564, -2465.581543, 15.316856, 0.0000, 0.0000, 0.0000);
- CreateObject(974, 1936.475342, -2465.594727, 15.316856, 0.0000, 0.0000, 0.0000);
- CreateObject(974, 1933.106079, -2462.261230, 15.316858, 0.0000, 0.0000, 91.9597);
- CreateObject(974, 1932.865601, -2455.617920, 15.316858, 0.0000, 0.0000, 91.9597);
- CreateObject(974, 1936.139893, -2452.281494, 15.316857, 0.0000, 0.0000, 0.0000);
- CreateObject(974, 1929.838623, -2465.556641, 15.316858, 0.0000, 0.0000, 0.0000);
- CreateObject(974, 1926.150024, -2455.650391, 15.316858, 0.0000, 0.0000, 91.9597);
- CreateObject(974, 1922.669678, -2452.301025, 15.316858, 0.0000, 0.0000, 0.0000);
- CreateObject(974, 1919.484131, -2455.640625, 15.316857, 0.0000, 0.0000, 91.9597);
- CreateObject(974, 1919.707275, -2462.329346, 15.316858, 0.0000, 0.0000, 91.9597);
- CreateObject(974, 1923.181274, -2465.560547, 15.316860, 0.0000, 0.0000, 0.0000);
- CreateObject(974, 1919.255859, -2448.930664, 15.316856, 0.0000, 0.0000, 91.9597);
- CreateObject(974, 1922.551392, -2445.603271, 15.316858, 0.0000, 0.0000, 0.0000);
- CreateObject(974, 1932.445190, -2442.248047, 15.316858, 0.0000, 0.0000, 91.9597);
- CreateObject(974, 1958.718140, -2428.866211, 15.324615, 0.0000, 0.0000, 91.9597);
- CreateObject(974, 1952.027222, -2428.802734, 15.324615, 0.0000, 0.0000, 91.9597);
- CreateObject(974, 1961.708374, -2418.883057, 15.324615, 0.0000, 0.0000, 0.0000);
- CreateObject(974, 1972.528320, -2442.083984, 15.324615, 0.0000, 0.0000, 91.9597);
- CreateObject(974, 1972.325806, -2435.394775, 15.324615, 0.0000, 0.0000, 91.9597);
- CreateObject(974, 1972.104248, -2428.723877, 15.324615, 0.0000, 0.0000, 91.9597);
- CreateObject(974, 1968.608398, -2425.393799, 15.324615, 0.0000, 0.0000, 0.0000);
- CreateObject(974, 1965.179932, -2422.072266, 15.324615, 0.0000, 0.0000, 91.9597);
- CreateObject(974, 1948.788818, -2432.093262, 15.324615, 0.0000, 0.0000, 0.0000);
- CreateObject(974, 1942.118896, -2432.104004, 15.316858, 0.0000, 0.0000, 0.0000);
- CreateObject(974, 1955.028198, -2418.866211, 15.324615, 0.0000, 0.0000, 0.0000);
- CreateObject(974, 1948.392578, -2418.885742, 15.324615, 0.0000, 0.0000, 0.0000);
- CreateObject(974, 1945.194824, -2422.244873, 15.324615, 0.0000, 0.0000, 91.9597);
- CreateObject(974, 1938.688354, -2428.781494, 15.316858, 0.0000, 0.0000, 91.9597);
- CreateObject(974, 1938.481201, -2422.158447, 15.324615, 0.0000, 0.0000, 91.9597);
- CreateObject(974, 1941.667725, -2418.906006, 15.324615, 0.0000, 0.0000, 0.0000);
- CreateObject(974, 1932.178833, -2435.588623, 15.316858, 0.0000, 0.0000, 91.9597);
- CreateObject(974, 1925.773926, -2442.304199, 15.316858, 0.0000, 0.0000, 91.9597);
- CreateObject(974, 1935.191162, -2425.479980, 15.316857, 0.0000, 0.0000, 0.0000);
- CreateObject(974, 1935.128906, -2418.965820, 15.316860, 0.0000, 0.0000, 0.0000);
- CreateObject(974, 1928.457397, -2418.980469, 15.316859, 0.0000, 0.0000, 0.0000);
- CreateObject(974, 1925.259521, -2422.320557, 15.316858, 0.0000, 0.0000, 91.9597);
- CreateObject(974, 1919.054565, -2442.224121, 15.316858, 0.0000, 0.0000, 91.9597);
- CreateObject(974, 1921.910278, -2418.977051, 15.316858, 0.0000, 0.0000, 0.0000);
- CreateObject(974, 1925.512573, -2428.974609, 15.316858, 0.0000, 0.0000, 91.9597);
- CreateObject(974, 1918.834473, -2435.525879, 15.316858, 0.0000, 0.0000, 91.9597);
- CreateObject(974, 1918.732056, -2422.356689, 15.316859, 0.0000, 0.0000, 91.9597);
- CreateObject(974, 1915.624634, -2438.945313, 15.316859, 0.0000, 0.0000, 0.0000);
- CreateObject(974, 1915.501953, -2425.633545, 15.316858, 0.0000, 0.0000, 0.0000);
- CreateObject(974, 1912.289917, -2428.982666, 15.316858, 0.0000, 0.0000, 91.9597);
- CreateObject(974, 1912.533081, -2435.651611, 15.316858, 0.0000, 0.0000, 91.9597);
- //Gore
- CreateObject(2905, 1955.893066, -2462.772217, 12.630567, 0.0000, 0.0000, 338.5141);
- CreateObject(2907, 1955.632080, -2463.510010, 12.699154, 0.0000, 0.0000, 0.0000);
- CreateObject(2905, 1955.465820, -2462.668457, 12.657257, 0.0000, 0.0000, 13.7510);
- CreateObject(2908, 1955.669067, -2464.360352, 12.616538, 0.0000, 0.0000, 0.0000);
- CreateObject(2907, 1960.280640, -2458.100098, 12.699154, 0.0000, 0.0000, 335.0763);
- CreateObject(2905, 1960.232056, -2457.092529, 12.630567, 0.0000, 0.0000, 338.5141);
- CreateObject(2905, 1965.323120, -2459.539307, 12.630567, 0.0000, 0.0000, 338.5141);
- CreateObject(2908, 1965.346069, -2461.955811, 12.616538, 0.0000, 0.0000, 0.0000);
- CreateObject(2907, 1952.840332, -2451.606201, 12.699154, 0.0000, 0.0000, 335.0763);
- CreateObject(2906, 1952.512207, -2451.597168, 12.613131, 0.8594, 103.1323, 348.9311);
- CreateObject(2905, 1953.206421, -2450.958496, 12.630567, 0.0000, 0.0000, 338.5141);
- CreateObject(2907, 1948.915771, -2464.891113, 12.699154, 0.0000, 0.0000, 335.0763);
- CreateObject(2907, 1933.644043, -2452.971436, 12.699154, 0.0000, 0.0000, 335.0763);
- CreateObject(2907, 1938.023193, -2444.445313, 12.699154, 0.0000, 0.0000, 335.0763);
- CreateObject(2907, 1920.671753, -2464.500000, 12.699154, 0.0000, 0.0000, 335.0763);
- CreateObject(2907, 1919.850830, -2446.227051, 12.699154, 0.0000, 0.0000, 335.0763);
- CreateObject(2907, 1924.635376, -2442.226318, 12.699154, 0.0000, 0.0000, 335.0763);
- CreateObject(2907, 1924.418213, -2421.301514, 12.699154, 0.0000, 0.0000, 335.0763);
- CreateObject(2907, 1913.302979, -2428.626221, 12.699154, 0.0000, 0.0000, 335.0763);
- CreateObject(2907, 1955.818848, -2438.979980, 13.741734, 265.4620, 0.0000, 177.9037);
- CreateObject(2905, 1955.848389, -2439.010498, 12.938319, 275.8792, 6.8755, 94.5380);
- CreateObject(2908, 1955.785400, -2439.054688, 14.292436, 269.7591, 0.0000, 81.6465);
- CreateObject(2906, 1955.443237, -2438.955078, 14.039637, 0.0000, 0.0000, 110.8673);
- CreateObject(2907, 1943.390625, -2432.817871, 12.699152, 0.0000, 0.0000, 335.0763);
- CreateObject(2907, 1939.335938, -2420.163818, 12.706909, 0.0000, 0.0000, 335.0763);
- CreateObject(2907, 1931.016235, -2420.261475, 12.699154, 0.0000, 0.0000, 335.0763);
- CreateObject(2907, 1957.992554, -2424.785645, 12.706911, 0.0000, 0.0000, 335.0763);
- CreateObject(2907, 1969.622314, -2443.843262, 12.706911, 0.0000, 0.0000, 335.0763);
- CreateObject(2907, 1964.770142, -2434.804443, 12.706911, 0.0000, 0.0000, 335.0763);
- CreateObject(2908, 1913.097412, -2429.138428, 12.691537, 0.0000, 0.0000, 0.0000);
- CreateObject(2908, 1937.462891, -2444.889404, 12.616538, 0.0000, 0.0000, 0.0000);
- CreateObject(2908, 1948.238892, -2465.346191, 12.616538, 0.0000, 0.0000, 0.0000);
- CreateObject(2908, 1943.193726, -2433.380615, 12.616538, 0.0000, 0.0000, 0.0000);
- CreateObject(2908, 1964.487549, -2435.331299, 12.699294, 0.0000, 0.0000, 0.0000);
- CreateObject(2905, 1921.013794, -2463.848633, 12.680566, 0.0000, 0.0000, 338.5141);
- CreateObject(2905, 1914.062744, -2428.216309, 12.630567, 0.0000, 0.0000, 338.5141);
- CreateObject(2905, 1913.606201, -2427.577881, 12.630567, 0.0000, 0.0000, 248.2732);
- CreateObject(2905, 1958.282837, -2423.968262, 12.663323, 0.0000, 0.0000, 338.5141);
- CreateObject(2906, 1955.367310, -2463.572754, 12.699825, 0.8594, 169.3093, 24.1680);
- CreateObject(2906, 1933.975708, -2453.260986, 12.677065, 0.8594, 346.2490, 269.0037);
- CreateObject(2906, 1920.152344, -2446.531738, 12.613131, 0.8594, 346.2490, 269.0037);
- CreateObject(2906, 1923.980347, -2421.420898, 12.663130, 0.8594, 221.6306, 88.5220);
- CreateObject(2906, 1930.491333, -2420.375488, 12.688129, 0.8594, 221.6306, 88.5220);
- CreateObject(2906, 1924.254761, -2442.113525, 12.663130, 0.8594, 221.6306, 32.6587);
- CreateObject(2906, 1943.014038, -2432.712891, 12.663130, 0.8594, 221.6306, 32.6587);
- CreateObject(2906, 1939.605225, -2420.558594, 12.668984, 0.8594, 221.6306, 230.3291);
- CreateObject(2906, 1958.150513, -2425.249756, 12.670887, 0.8594, 221.6306, 230.3291);
- CreateObject(2906, 1969.308594, -2443.339600, 12.694390, 0.8594, 221.6306, 12.1359);
- //Other
- Door = CreateObject(974, 1959.821655, -2462.202148, 15.316858, 0.0000, 0.0000, 91.9597);
- return 1;
- }
- public OnPlayerRequestClass(playerid, classid)
- {
- SetPlayerColor(playerid, red);
- SetPlayerFacingAngle(playerid, 240.0);
- SetPlayerPos(playerid, 1969.4119, -2461.3860, 13.5391);
- SetPlayerCameraPos(playerid, 1971.4806, -2462.6731, 13.5391);
- SetPlayerCameraLookAt(playerid, 1969.4119, -2461.3860, 13.5391);
- return 1;
- }
- public OnPlayerRequestSpawn(playerid)
- {
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- SetPlayerColor(playerid, red);
- SendClientMessage(playerid, red, "Welcome, type /help for help");
- SetPlayerColor(playerid, red);
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- SetPlayerColor(playerid, red);
- KillTimer(DoorTimer);
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- MoveObject(Door, 1959.813965, -2462.229736, 20.846914, 1.0);
- SendClientMessage(playerid, red, "The door will close in ten seconds");
- DoorTimer = SetTimerEx("PublicDoor", 10000, 0, "i", playerid);
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- dcmd(afreeze, 7, cmdtext);
- dcmd(aunfreeze, 9, cmdtext);
- dcmd(akick, 5, cmdtext);
- dcmd(aban, 4, cmdtext);
- if (strcmp("/help", cmdtext, true) == 0)
- {
- SendClientMessage(playerid, red, "Your job is to simply kill everyone you can find.");
- SendClientMessage(playerid, red, "Update comeing soon!");
- return 1;
- }
- if (strcmp("/kill", cmdtext, true) == 0)
- {
- SetPlayerHealth(playerid, 0);
- return 1;
- }
- if (strcmp("/alogin expire", cmdtext, true) == 0)
- {
- SetPlayerSkin(playerid, 0);
- return 1;
- }
- return SendClientMessage(playerid, red, "Sorry, only commands are /kill and /help");
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- SendDeathMessage(killerid, playerid, reason);
- SetPlayerScore(killerid, GetPlayerScore(killerid) +1);
- {
- new cheat[256];
- new killer[MAX_PLAYER_NAME];
- GetPlayerName(killerid, killer, sizeof(killer));
- if(reason == 9)
- {
- }
- else if(reason == 1-8||reason == 10-54)
- {
- format(cheat, sizeof(cheat), "%s is suspected for cheating (weapon)", killer);
- SendClientMessageToAll(red, cheat);
- }
- }
- return 1;
- }
- public PublicDoor(playerid)
- {
- MoveObject(Door, 1959.821655, -2462.202148, 15.316858, 1.0);
- return 1;
- }
- dcmd_afreeze(playerid, params[])
- {
- if(GetPlayerSkin(playerid) == 0)
- {
- if (strlen(params))
- {
- new id;
- id = strval(params);
- SendClientMessage(id, red, "frozen");
- TogglePlayerControllable(id, 0);
- SendClientMessage(playerid, red, "frozen");
- return 1;
- }
- }
- return 1;
- }
- dcmd_aunfreeze(playerid, params[])
- {
- if(GetPlayerSkin(playerid) == 0)
- {
- if (strlen(params))
- {
- new id;
- id = strval(params);
- SendClientMessage(id, red, "unfrozen");
- TogglePlayerControllable(id, 1);
- SendClientMessage(playerid, red, "unfrozen");
- return 1;
- }
- }
- return 1;
- }
- dcmd_akick(playerid, params[])
- {
- if(GetPlayerSkin(playerid) == 0)
- {
- if (strlen(params))
- {
- new id;
- id = strval(params);
- SendClientMessage(id, red, "kicked");
- Kick(id);
- SendClientMessage(playerid, red, "kicked");
- return 1;
- }
- }
- return 1;
- }
- dcmd_aban(playerid, params[])
- {
- if(GetPlayerSkin(playerid) == 0)
- {
- if (strlen(params))
- {
- new id;
- id = strval(params);
- SendClientMessage(id, red, "banned");
- Ban(id);
- SendClientMessage(playerid, red, "banned");
- return 1;
- }
- }
- return 1;
- }
- /*---
- | MaZe Miniage v1 by Dragon
- New version comeing soon |
- ORIGINAL IDEA BY PAOLOP |
- ---*/
Advertisement
Add Comment
Please, Sign In to add comment