Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // I am not a PRO in scripting, So if you find any bugs, inform me kindly and I'll check it out.
- // Catch me @ Facebook : www.facebook.com/pmanoj.pandu || Twitter : @L0V3R30Y ||
- // Follow me @Instagram : mjay768
- // My website : https://www.techngaming.co.in
- // This is not yet finished, Still trying to make it better. So If you have any suggestions, I'm happy to hear from you.
- // E-Mail me your suggestions at [email protected]
- #include <a_samp>
- #include <zcmd>
- #include <streamer>
- //#pragma tabsize 0
- new message[301];
- new InDM[MAX_PLAYERS];
- new cn;
- new health;
- new weapon;
- new armour;
- new Float:Spawns[][]= {
- {-2491.8706,-237.2221,39.3019,295.0867},
- {-2482.0308,-283.6506,40.5421,180.7190},
- {-2444.0479,-271.4679,35.6237,258.4264},
- {-2490.9055,-298.6101,35.8574,172.5956},
- {-2525.5771,-313.8878,39.0723,327.6012},
- {-2554.4729,-291.1451,25.9594,118.0751}
- };
- new weaps[][] = {
- {22},
- {23},
- {24},
- {25},
- {26},
- {27},
- {28},
- {29},
- {30},
- {31},
- {32}
- };
- public OnPlayerConnect(playerid)
- {
- InDM[playerid] =0;
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- InDM[playerid] =0;
- return 1;
- }
- COMMAND:dm(playerid,params[])
- {
- if(InDM[playerid] ==0)
- {
- InDM[playerid] =1;
- cn++;
- ResetPlayerWeapons(playerid);
- new r = random(50);
- SetPlayerSkin(playerid, r);
- new Random = random(sizeof(Spawns));
- SetPlayerPos(playerid, Spawns[Random][0],Spawns[Random][1],Spawns[Random][2]);
- SetPlayerFacingAngle(playerid, Spawns[Random][3]);
- new Random1 = random(sizeof(weaps));
- GivePlayerWeapon(playerid, weaps[Random1][0], 150);
- }
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- SendDeathMessage(killerid, playerid, reason);
- if(InDM[playerid] == 1)
- {
- new kill[256];
- format(kill, sizeof(kill),"%s killed %s in DM",killerid,playerid);
- }
- cn -=1;
- if(cn ==1)
- {
- new winner[50];
- GetPlayerName(playerid, winner,MAX_PLAYER_NAME); //To store the last player name
- new fwinner[100]; //string to announce winner
- format(fwinner, sizeof(fwinner)," %s has won the DM[Minigame]",winner);
- }
- return 1;
- }
- public OnPlayerPickUpPickup(playerid, pickupid)
- {
- if(pickupid == health)
- {
- new Float:phealth;
- GetPlayerHealth(playerid, phealth);
- SetPlayerHealth(playerid, phealth+70);
- }
- else if(pickupid == weapon)
- {
- new ammo;
- GetPlayerAmmo(ammo);
- if(ammo<150)
- {
- GivePlayerWeapon(playerid, 29, 150);
- }
- }
- else if(pickupid == armour)
- {
- new Float:pArmour;
- GetPlayerArmour(playerid, pArmour);
- SetPlayerArmour(playerid, pArmour+50);
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment