SHOW:
|
|
- or go back to the newest paste.
| 1 | - | // This is a comment |
| 1 | + | // I am not a PRO in scripting, So if you find any bugs, inform me kindly and I'll check it out. |
| 2 | - | // uncomment the line below if you want to write a filterscript |
| 2 | + | // Catch me @ Facebook : www.facebook.com/pmanoj.pandu || Twitter : @L0V3R30Y || |
| 3 | - | //#define FILTERSCRIPT |
| 3 | + | // Follow me @Instagram : mjay768 |
| 4 | // My website : https://www.techngaming.co.in | |
| 5 | // This is not yet finished, Still trying to make it better. So If you have any suggestions, I'm happy to hear from you. | |
| 6 | // E-Mail me your suggestions at [email protected] | |
| 7 | - | #include <sscanf2> |
| 7 | + | |
| 8 | #include <a_samp> | |
| 9 | #include <zcmd> | |
| 10 | #include <streamer> | |
| 11 | //#pragma tabsize 0 | |
| 12 | - | new Spawn[MAX_PLAYERS]; |
| 12 | + | |
| 13 | new InDM[MAX_PLAYERS]; | |
| 14 | new cn; | |
| 15 | ||
| 16 | new health; | |
| 17 | new weapon; | |
| 18 | new armour; | |
| 19 | new Float:Spawns[][]= {
| |
| 20 | {-2491.8706,-237.2221,39.3019,295.0867},
| |
| 21 | {-2482.0308,-283.6506,40.5421,180.7190},
| |
| 22 | {-2444.0479,-271.4679,35.6237,258.4264},
| |
| 23 | {-2490.9055,-298.6101,35.8574,172.5956},
| |
| 24 | {-2525.5771,-313.8878,39.0723,327.6012},
| |
| 25 | {-2554.4729,-291.1451,25.9594,118.0751}
| |
| 26 | }; | |
| 27 | ||
| 28 | new weaps[][] = {
| |
| 29 | {22},
| |
| 30 | {23},
| |
| 31 | {24},
| |
| 32 | {25},
| |
| 33 | {26},
| |
| 34 | {27},
| |
| 35 | {28},
| |
| 36 | {29},
| |
| 37 | {30},
| |
| 38 | - | #if defined FILTERSCRIPT |
| 38 | + | |
| 39 | {32}
| |
| 40 | - | public OnFilterScriptInit() |
| 40 | + | |
| 41 | public OnPlayerConnect(playerid) | |
| 42 | - | print("\n--------------------------------------");
|
| 42 | + | |
| 43 | - | print(" Blank Filterscript by your name here");
|
| 43 | + | |
| 44 | - | print("--------------------------------------\n");
|
| 44 | + | |
| 45 | } | |
| 46 | public OnPlayerDisconnect(playerid, reason) | |
| 47 | {
| |
| 48 | - | public OnFilterScriptExit() |
| 48 | + | |
| 49 | return 1; | |
| 50 | - | //Player Classes |
| 50 | + | |
| 51 | - | AddPlayerClass(268,-2491.8706,-237.2221,39.3019,295.0867,0,0,0,0,0,0); // spawn1 |
| 51 | + | |
| 52 | - | AddPlayerClass(268,-2482.0308,-283.6506,40.5421,180.7190,0,0,0,0,0,0); // spawn2 |
| 52 | + | |
| 53 | - | AddPlayerClass(268,-2444.0479,-271.4679,35.6237,258.4264,0,0,0,0,0,0); // spawn3 |
| 53 | + | |
| 54 | - | AddPlayerClass(268,-2490.9055,-298.6101,35.8574,172.5956,0,0,0,0,0,0); // spawn4 |
| 54 | + | |
| 55 | - | AddPlayerClass(268,-2525.5771,-313.8878,39.0723,327.6012,0,0,0,0,0,0); // spawn5 |
| 55 | + | |
| 56 | - | AddPlayerClass(268,-2554.4729,-291.1451,25.9594,118.0751,0,0,0,0,0,0); // spawn6 |
| 56 | + | |
| 57 | cn++; | |
| 58 | ResetPlayerWeapons(playerid); | |
| 59 | new r = random(50); | |
| 60 | - | #else |
| 60 | + | |
| 61 | new Random = random(sizeof(Spawns)); | |
| 62 | - | main() |
| 62 | + | |
| 63 | SetPlayerFacingAngle(playerid, Spawns[Random][3]); | |
| 64 | - | print("\n----------------------------------");
|
| 64 | + | |
| 65 | - | print(" Blank Gamemode by your name here");
|
| 65 | + | |
| 66 | - | print("----------------------------------\n");
|
| 66 | + | |
| 67 | } | |
| 68 | } | |
| 69 | - | #endif |
| 69 | + | |
| 70 | {
| |
| 71 | - | public OnGameModeInit() |
| 71 | + | |
| 72 | SendDeathMessage(killerid, playerid, reason); | |
| 73 | - | // Don't use these lines if it's a filterscript |
| 73 | + | if(InDM[playerid] == 1) |
| 74 | - | SetGameModeText("Blank Script");
|
| 74 | + | |
| 75 | - | AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); |
| 75 | + | new kill[256]; |
| 76 | format(kill, sizeof(kill),"%s killed %s in DM",killerid,playerid); | |
| 77 | } | |
| 78 | cn -=1; | |
| 79 | - | public OnGameModeExit() |
| 79 | + | if(cn ==1) |
| 80 | {
| |
| 81 | new winner[50]; | |
| 82 | GetPlayerName(playerid, winner,MAX_PLAYER_NAME); //To store the last player name | |
| 83 | new fwinner[100]; //string to announce winner | |
| 84 | - | public OnPlayerRequestClass(playerid, classid) |
| 84 | + | format(fwinner, sizeof(fwinner)," %s has won the DM[Minigame]",winner); |
| 85 | } | |
| 86 | - | SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746); |
| 86 | + | |
| 87 | - | SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746); |
| 87 | + | |
| 88 | - | SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746); |
| 88 | + | |
| 89 | public OnPlayerPickUpPickup(playerid, pickupid) | |
| 90 | {
| |
| 91 | if(pickupid == health) | |
| 92 | {
| |
| 93 | new Float:phealth; | |
| 94 | GetPlayerHealth(playerid, phealth); | |
| 95 | - | Spawn[playerid] =0; |
| 95 | + | SetPlayerHealth(playerid, phealth+70); |
| 96 | } | |
| 97 | else if(pickupid == weapon) | |
| 98 | {
| |
| 99 | new ammo; | |
| 100 | GetPlayerAmmo(ammo); | |
| 101 | if(ammo<150) | |
| 102 | {
| |
| 103 | GivePlayerWeapon(playerid, 29, 150); | |
| 104 | } | |
| 105 | - | public OnPlayerSpawn(playerid) |
| 105 | + | |
| 106 | else if(pickupid == armour) | |
| 107 | {
| |
| 108 | new Float:pArmour; | |
| 109 | GetPlayerArmour(playerid, pArmour); | |
| 110 | SetPlayerArmour(playerid, pArmour+50); | |
| 111 | } | |
| 112 | return 1; | |
| 113 | } |