Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define FILTERSCRIPT
- //...::====================== Include's ======================::...//
- #include <a_samp>
- #include <zcmd>
- #include <sscanf2>
- //...::====================== Colors ======================::...//
- #define grey 0xAFAFAFAA
- #define cyan 0x00FFFFFF
- #define red 0xFF0000AA
- //...::====================== Shortcut ======================::...//
- #define SK SendClientMessage(killerid,
- #define SP SendClientMessage(playerid,
- #define Gm GivePlayerMoney(killerid,
- //...::====================== Define ======================::...//
- //-------------------------Options-----------------------------//
- #define FiveSpreeCash 1500
- #define FiveSpreeScore 5
- #define TenSpreeCash 5000
- #define TenSpreeScore 8
- #define FifteenSpreeCash 8000
- #define FifteenSpreeScore 12
- #define TwentySpreeCash 15000
- #define TwentySpreeScore 15
- #define ThirtyfiveSpreeCash 20000
- #define ThirtyfiveSpreeScore 20
- #define SpreeWeapon 15
- #define SpreeWeapon2 20
- #define SpreeWeapon3 25
- #define SpreeWeapon4 30
- #define DIALOG_ID 523
- #define GivenAmmo 500
- //---------------------//
- new spree[MAX_PLAYERS];
- //--------------------//
- #if defined FILTERSCRIPT
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print("Simple Spree System By V_LOPE Has Been Loaded!");
- print("--------------------------------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- print("\n--------------------------------------");
- print("Simple Spree System By V_LOPE Load Failed");
- print("--------------------------------------\n");
- return 1;
- }
- #endif
- public OnPlayerConnect(playerid)
- {
- spree[playerid] = 0;
- return 1;
- }
- CMD:spree(playerid,params[])
- {
- new player1,name[24];
- if(isnull(params)) player1 = playerid;
- else player1 = strval(params);
- GetPlayerName(player1,name,sizeof(name));
- new str[128];
- format(str, sizeof(str), "%s's Is Killing Spree with %d Kills",name,spree[player1]);
- SendClientMessage(playerid, 0x00F600FF, str);
- SendClientMessage(playerid, grey, "You Can Use /Spree [id] too");
- return 1;
- }
- CMD:setspree(playerid,params[])
- {
- if(!IsPlayerAdmin(playerid)) return 0;
- new targetid,number;
- if (sscanf(params, "dis", targetid,number)) return SendClientMessage(playerid, red, "USAGE: /setspree [playerid] [spree]");
- new string[128],pName[24],aName[24];
- GetPlayerName(targetid,pName,sizeof(pName));
- GetPlayerName(playerid,aName,sizeof(aName));
- if(!IsPlayerConnected(targetid) && targetid == INVALID_PLAYER_ID) return SP red,"Player is Not Connected");
- format(string, sizeof(string), "You have set \"%s's\" Spree to '%d'", pName, number); SendClientMessage(playerid,cyan,string);
- if(targetid != playerid)
- {
- format(string,sizeof(string),"Administrator \"%s\" has set your Spree to '%d'", aName, number);
- SendClientMessage(targetid,cyan,string);
- }
- PlayerPlaySound(targetid,1057,0.0,0.0,0.0);
- spree[targetid] = number;
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- spree[playerid] = 0;
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- new string[128],PlayerName[24];
- GetPlayerName(killerid,PlayerName,sizeof(PlayerName));
- spree[killerid]++;
- spree[playerid] = 0;
- if(spree[killerid] == 5)
- {
- format(string,sizeof(string),"%s Is Killing Spree With 5 Kills !",PlayerName);
- SendClientMessageToAll(cyan,string);
- Gm FiveSpreeCash); //GivePlayerMoney
- GivePlayerScore(killerid,FiveSpreeScore);
- format(string,sizeof(string),"{00FFFF}You Are Killing Spree With 10 Spree! You Got {006600}$%d {00FFFF}and {006600}%d {00FFFF}Score",FiveSpreeCash,FiveSpreeScore);
- SK cyan,string);
- }
- else if(spree[killerid] == 10)
- {
- format(string,sizeof(string),"%s Is Killing Spree With 10 Kills !",PlayerName);
- SendClientMessageToAll(cyan,string);
- Gm TenSpreeCash); //GivePlayerMoney
- GivePlayerScore(killerid,TenSpreeScore);
- format(string,sizeof(string),"{00FFFF}You Are Killing Spree With 10 Spree! You Got {006600}$%d {00FFFF}and {006600}%d {00FFFF}Score",TenSpreeCash,TenSpreeScore);
- SK cyan,string);
- }
- else if(spree[killerid] == 15)
- {
- format(string,sizeof(string),"%s Is Killing Spree With 15 Kills !",PlayerName);
- SendClientMessageToAll(cyan,string);
- Gm FifteenSpreeCash); //GivePlayerMoney
- GivePlayerScore(killerid,FifteenSpreeScore);
- format(string,sizeof(string),"{00FFFF}You Are Killing Spree With 15 Spree! You Got {006600}$%d {00FFFF}and {006600}%d {00FFFF}Score",FifteenSpreeCash,FifteenSpreeScore);
- SK cyan,string);
- }
- else if(spree[killerid] == 20)
- {
- format(string,sizeof(string),"%s Is Killing Spree With 20 Kills !",PlayerName);
- SendClientMessageToAll(cyan,string);
- Gm TwentySpreeCash); //GivePlayerMoney
- GivePlayerScore(killerid,TwentySpreeScore);
- format(string,sizeof(string),"{00FFFF}You Are Killing Spree With 20 Spree! You Got {006600}$%d {00FFFF}and {006600}%d {00FFFF}Score",TwentySpreeCash,TwentySpreeScore);
- SK cyan,string);
- }
- else if(spree[killerid] == 35)
- {
- format(string,sizeof(string),"%s Is Killing Spree With 35 Kills !",PlayerName);
- SendClientMessageToAll(cyan,string);
- Gm ThirtyfiveSpreeCash); //GivePlayerMoney
- GivePlayerScore(killerid,ThirtyfiveSpreeScore);
- format(string,sizeof(string),"{00FFFF}You Are Killing Spree With 20 Spree! You Got {006600}$%d {00FFFF}and {006600}%d {00FFFF}Score",ThirtyfiveSpreeCash,ThirtyfiveSpreeScore);
- SK cyan,string);
- }
- if(spree[killerid] == SpreeWeapon)
- {
- ShowPlayerDialog(playerid,DIALOG_ID,DIALOG_STYLE_LIST,"Spree Weapons","Chainsaw\n9mm\nSilenced 9mm\nDesert Eagle\nShotgun\nSawnoff Shotgun\nCombat Shotgun\nMicro SMG\nMP5\nAK-47\nM4\nTec-9\nCountry Rifle\nSniper Rifle","Select","Cancel");
- }
- if(spree[killerid] == SpreeWeapon2)
- {
- ShowPlayerDialog(playerid,DIALOG_ID,DIALOG_STYLE_LIST,"Spree Weapons","Chainsaw\n9mm\nSilenced 9mm\nDesert Eagle\nShotgun\nSawnoff Shotgun\nCombat Shotgun\nMicro SMG\nMP5\nAK-47\nM4\nTec-9\nCountry Rifle\nSniper Rifle","Select","Cancel");
- }
- if(spree[killerid] == SpreeWeapon3)
- {
- ShowPlayerDialog(playerid,DIALOG_ID,DIALOG_STYLE_LIST,"Spree Weapons","Chainsaw\n9mm\nSilenced 9mm\nDesert Eagle\nShotgun\nSawnoff Shotgun\nCombat Shotgun\nMicro SMG\nMP5\nAK-47\nM4\nTec-9\nCountry Rifle\nSniper Rifle","Select","Cancel");
- }
- if(spree[killerid] == SpreeWeapon4)
- {
- ShowPlayerDialog(playerid,DIALOG_ID,DIALOG_STYLE_LIST,"Spree Weapons","Chainsaw\n9mm\nSilenced 9mm\nDesert Eagle\nShotgun\nSawnoff Shotgun\nCombat Shotgun\nMicro SMG\nMP5\nAK-47\nM4\nTec-9\nCountry Rifle\nSniper Rifle","Select","Cancel");
- }
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == DIALOG_ID && response)
- {
- if(listitem == 1)
- {
- GivePlayerWeapon(playerid,9,1);
- SP cyan,"Weapon has be Given!");
- }
- if(listitem == 2)
- {
- GivePlayerWeapon(playerid,22,GivenAmmo);
- SP cyan,"Weapon has be Given!");
- }
- if(listitem == 3)
- {
- GivePlayerWeapon(playerid,23,GivenAmmo);
- SP cyan,"Weapon has be Given!");
- }
- if(listitem == 4)
- {
- GivePlayerWeapon(playerid,24,GivenAmmo);
- SP cyan,"Weapon has be Given!");
- }
- if(listitem == 5)
- {
- GivePlayerWeapon(playerid,25,GivenAmmo);
- SP cyan,"Weapon has be Given!");
- }
- if(listitem == 6)
- {
- GivePlayerWeapon(playerid,26,GivenAmmo);
- SP cyan,"Weapon has be Given!");
- }
- if(listitem == 7)
- {
- GivePlayerWeapon(playerid,27,GivenAmmo);
- SP cyan,"Weapon has be Given!");
- }
- if(listitem == 8)
- {
- GivePlayerWeapon(playerid,28,GivenAmmo);
- SP cyan,"Weapon has be Given!");
- }
- if(listitem == 9)
- {
- GivePlayerWeapon(playerid,29,GivenAmmo);
- SP cyan,"Weapon has be Given!");
- }
- if(listitem == 10)
- {
- GivePlayerWeapon(playerid,30,GivenAmmo);
- SP cyan,"Weapon has be Given!");
- }
- if(listitem == 11)
- {
- GivePlayerWeapon(playerid,31,GivenAmmo);
- SP cyan,"Weapon has be Given!");
- }
- if(listitem == 12)
- {
- GivePlayerWeapon(playerid,32,GivenAmmo);
- SP cyan,"Weapon has be Given!");
- }
- if(listitem == 13)
- {
- GivePlayerWeapon(playerid,33,GivenAmmo);
- SP cyan,"Weapon has be Given!");
- }
- if(listitem == 14)
- {
- GivePlayerWeapon(playerid,34,GivenAmmo);
- SP cyan,"Weapon has be Given!");
- }
- }
- return 1;
- }
- stock GivePlayerScore(playerid,score)
- {
- SetPlayerScore(playerid,GetPlayerScore(playerid)+score);
- }
- stock IsNumeric(string[])
- {
- for (new i = 0, j = strlen(string); i < j; i++)
- {
- if (string[i] > '9' || string[i] < '0') return 0;
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement