KillStreak:: Death Machine -
Postalityjr - 23.06.2011
Credits::[FU]Victious (Could not ask to use his code because he is banned, however I am still giving credits because i'm a nice person).
How it works:: You kill 11 people without dying and a textdraw will appear saying:: 11 Kill Streak! Type /DeathMachine to use your killstreak. Then it will give you a minigun with 999 Ammo. Sorry that I didn't make it so you can keep it after death but I wasn't sure how to do it :/. Anyway here it is.
How do I change how much ammo, or how many kills required?:: You can on lines; 21,31,38, you should also change the gametext on line 23 too. To change how much ammo, change the 250 in the giveplayerweapon to how much ammo you want.
Pastebin::
http://pastebin.com/ZNNzpz76
You will need zcmd for this to work! Link to zcmd::
http://solidfiles.com/d/74c73/ (put in your pawno/includes folder)
Give me + Victious Credits if you are going to use this in your server!
Update 1:: Script Fixed. Use the new pastebin that's up! Tested and works perfectly!
ScreenShots::
Re: KillStreak:: Death Machine - [L3th4l] - 23.06.2011
There's a few errors:
Your code:
pawn Код:
//CREDITS:: KillStreak Functions Made by [FU]Victious (BANNED). Death Machine Stuff made by Postalityjr. Merged by Postalityjr
#include <a_samp>
#include <zcmd>
#define YELLOW 0xF2FF00AA
enum Random
{
Float:RX,
Float:RY,
Float:RZ
}
new Kills[MAX_PLAYERS];
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Death Machine KillStreak By Kross");
print("--------------------------------------\n");
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
SetPVarInt(killerid,"KillStreak",GetPVarInt(killerid,"KillStreak") + 1);
SetPVarInt(playerid,"KillStreak",0);
if(GetPVarInt(killerid,"KillStreak") == 11)
if(Kills[killerid] == 7)
{
GameTextForPlayer(playerid,"~r~11 Kill Streak! Type /DeathMachine to use your KillStreak!",3000,3);
}
{
}
return 1;
}
CMD:deathmachine(playerid,params[]){
if(GetPVarInt(playerid,"KillStreak") == 11)
{
GivePlayerWeapon(playerid,38,250);
SetPVarInt(playerid,"KillStreak",0);
}
SendClientMessage(playerid,YELLOW,"You Don't have an 11 KillStreak");
return 1;
}
CMD:deathmachineadmin(playerid,params[]){
//Add your code here!
{
GivePlayerWeapon(playerid,38,999);
}
}
Edited:
pawn Код:
//CREDITS:: KillStreak Functions Made by [FU]Victious (BANNED). Death Machine Stuff made by Postalityjr. Merged by Postalityjr
#include <a_samp>
#include <zcmd>
#define YELLOW 0xF2FF00AA
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Death Machine KillStreak By Kross");
print("--------------------------------------\n");
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
SetPVarInt(killerid,"KillStreak",GetPVarInt(killerid,"KillStreak") + 1);
SetPVarInt(playerid,"KillStreak",0);
if(GetPVarInt(killerid,"KillStreak") == 11)
{
GameTextForPlayer(killerid,"~r~11 Kill Streak! Type /DeathMachine to use your KillStreak!",3000,3);
}
return 1;
}
CMD:deathmachine(playerid,params[])
{
if(GetPVarInt(playerid,"KillStreak") == 11)
{
GivePlayerWeapon(playerid,38,250);
SetPVarInt(playerid,"KillStreak",0);
return 1;
}
else return SendClientMessage(playerid,YELLOW,"You Don't have an 11 KillStreak");
}
CMD:deathmachineadmin(playerid,params[])
{
if(IsPlayerAdmin(playerid))
{
GivePlayerWeapon(playerid,38,999);
}
}
Re: KillStreak:: Death Machine -
Postalityjr - 23.06.2011
Quote:
Originally Posted by [L3th4l]
There's a few errors:
pawn Код:
//CREDITS:: KillStreak Functions Made by [FU]Victious (BANNED). Death Machine Stuff made by Postalityjr. Merged by Postalityjr
#include <a_samp> #include <zcmd>
#define YELLOW 0xF2FF00AA
/*enum Random -- Not needed { Float:RX, Float:RY, Float:RZ }*/
//new Kills[MAX_PLAYERS]; // You aren't even using this!
public OnFilterScriptInit() { print("\n--------------------------------------"); print(" Death Machine KillStreak By Kross"); print("--------------------------------------\n"); return 1; }
public OnPlayerDeath(playerid, killerid, reason) { SetPVarInt(killerid,"KillStreak",GetPVarInt(killerid,"KillStreak") + 1); SetPVarInt(playerid,"KillStreak",0); if(GetPVarInt(killerid,"KillStreak") == 11) // if(Kills[killerid] == 7) You don't need this since you are using PVars { GameTextForPlayer(/*This must be killerid*//*playerid*/killerid,"~r~11 Kill Streak! Type /DeathMachine to use your KillStreak!",3000,3); } // { // } return 1; }
CMD:deathmachine(playerid,params[]) { if(GetPVarInt(playerid,"KillStreak") == 11) { GivePlayerWeapon(playerid,38,250); SetPVarInt(playerid,"KillStreak",0); return 1; } else return SendClientMessage(playerid,YELLOW,"You Don't have an 11 KillStreak"); // Even if you have the 11 killstreak, it will still send this.. }
CMD:deathmachineadmin(playerid,params[]) { //Add your code here! -- Why not just add IsPlayerAdmin? if(IsPlayerAdmin(playerid)) { GivePlayerWeapon(playerid,38,999); } }
|
Thanks for the tips! I will update it
Re: KillStreak:: Death Machine -
EpicNavy - 25.06.2011
very nice for COD servers. you could do like 3 kills treak deathmachine
9 kill streak Hunter.
11 kill streak hydra or something
Re: KillStreak:: Death Machine -
Postalityjr - 25.06.2011
Quote:
Originally Posted by EpicNavy
very nice for COD servers. you could do like 3 kills treak deathmachine
9 kill streak Hunter.
11 kill streak hydra or something
|
That's exactly what I planned to do with it. However I really wanted to do like, an airstrike as 7 kill streak, RC-XD, and stuff like that :P. But I wanted to start out easy. So I made this.
Re: KillStreak:: Death Machine -
FireCat - 25.06.2011
Not hard...
But anyways... (Im not saying good job if thats what you think)
Re: KillStreak:: Death Machine -
[BP]Tony - 25.06.2011
Nice