hey guys SaFeeR here
im banned here so thats why my friend is post this.
today i saw forum and im sure new scripter need this
i made spree system
so here is
(sorry i cant make filterscript
)
this is made from wanted lvl
Only For Gups
new Rampage[MAX_PLAYERS];
onplayerconnect
Rampage[playerid] = 0;
onplayerdeath
IncPlayerWanted(killerid, 1);
SetPlayerWanted(playerid,0);
new str[256];
Rampage[playerid] = 0;
Rampage[killerid]++;
And The Main Part...
OnplayerKill
if(Rampage[killerid] == 5) {
GetPlayerName(killerid, str, sizeof(str) );
format(str, sizeof(str), "%s has %d kills in a row!", str, Rampage[killerid] );
SendClientMessageToAll(RED, str);
SendClientMessage(killerid, RED, "Spree Killing: You have been given $5000!");
GameTextForPlayer(killerid,"~p~Spree Killing");
GivePlayerMoney(killerid,5000);
SetWantedLevel(killerid,5);
}
else if(Rampage[killerid] == 10) {
GetPlayerName(killerid, str, sizeof(str) );
format(str, sizeof(str), "%s has %d kills in a row!", str, Rampage[killerid] );
SendClientMessageToAll(RED, str);
SendClientMessage(killerid, RED, "Spree Killing: You have been given $10000!");
GameTextForPlayer(killerid,"~p~Spree Killing");
GivePlayerMoney(killerid,10000);
SetWantedLevel(killerid,10);
}
else if(Rampage[killerid] == 15){
GetPlayerName(killerid, str, sizeof(str) );
format(str, sizeof(str), "%s has %d kills in a row!", str, Rampage[killerid] );
SendClientMessageToAll(RED, str);
SendClientMessage(killerid, RED, "Spree Killing: You have been given $15000!");
GameTextForPlayer(killerid,"~p~Spree Killing");
GivePlayerMoney(killerid,15000);
SetWantedLevel(killerid,15);
}
else if(Rampage[killerid] == 20){
GetPlayerName(killerid, str, sizeof(str) );
format(str, sizeof(str), "%s has %d kills in a row!", str, Rampage[killerid] );
SendClientMessageToAll(RED, str);
SendClientMessage(killerid, RED, "Spree Killing: You have been given $200000!");
GameTextForPlayer(killerid,"~p~Spree Killing");
GivePlayerMoney(killerid,20000);
SetWantedLevel(killerid,20);
}
else if(Rampage[killerid] == 25){
GetPlayerName(killerid, str, sizeof(str) );
format(str, sizeof(str), "%s has %d kills in a row!", str, Rampage[killerid] );
SendClientMessageToAll(RED, str);
SendClientMessage(killerid, RED, "Spree Killing: You have been given $25000!");
GameTextForPlayer(killerid,"~p~Spree Killing");
GivePlayerMoney(killerid,25000);
SetWantedLevel(killerid,25);
}
else if(Rampage[killerid] == 30){
GetPlayerName(killerid, str, sizeof(str) );
format(str, sizeof(str), "%s has %d kills in a row!", str, Rampage[killerid] );
SendClientMessageToAll(RED, str);
SendClientMessage(killerid, RED, "Spree Killing: You have been given $30000!");
GameTextForPlayer(killerid,"~p~Spree Killing");
GivePlayerMoney(killerid,30000);
SetWantedLevel(killerid,30);
}
else if(Rampage[killerid] == 35){
GetPlayerName(killerid, str, sizeof(str) );
format(str, sizeof(str), "%s has %d kills in a row!", str, Rampage[killerid] );
SendClientMessageToAll(RED, str);
SendClientMessage(killerid, RED, "Spree Killing: You have been given $35000!");
GameTextForPlayer(killerid,"~p~Spree Killing");
GivePlayerMoney(killerid,35000);
SetWantedLevel(killerid,35);
}
and func
public SetPlayerWanted(playerid, amount)
{
new Wanted;
PlayerInfo[playerid][wanted] = amount;
}
public ShowSpree()
{
new Count,i,name[24],string[256];
for(i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i) && IsPlayerOnSpree(i)) Count++;
if(!Count) return SendClientMessageToAll(BLUE,"No one is on Spree.");
if(Count == 1) {
for(i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i) && IsPlayerOnSpree(i)) break;
GetPlayerName(i,name,24);
format(string,256,"Players Currenty on Spree: %s[%d]",name,PlayerInfo[wanted]);
return SendClientMessageToAll(COLOR_YELLOW,string);
}
if(Count >= 1) {
new bool:First = false;
for(i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i) && IsPlayerOnSpree(i)) {
GetPlayerName(i,name,24);
if(!First) {
format(string,256,"Players Currenty on Spree:: %s[%d],",name,PlayerInfo[wanted]);
First = true;
}
else format(string,256,"%s %s[%d]",string,name,PlayerInfo[wanted]);
}
return SendClientMessageToAll(COLOR_YELLOW,string);
}
return 1;
}
public GetPlayerWanted(playerid)
{
return PlayerInfo[playerid][wanted];
}
stock IsPlayerOnSpree(playerid) return PlayerInfo[playerid][wanted] > 4 ? true:false;
public GetPlayerRampage(player[])
{
new xg;
format( file, sizeof( file ), USERS_FILE, player);
xg = dini_Int( file, "Rampage" );
return xg;
}
Credit Goes To: Big H(for making spree systen), Azeem(for converting in gups, SaFeeR[Me](For Config and set it on automatic)
this is made by big H but i do changes and set it auto matic no need of /c setspree cmd