DM Server Script [HELP]
#1

Hey!!

Im still scripting my DM server and i need help.

Here is the code: I really need help:
Код:
forward KillingSpree3(playerid);
forward KillingSpree15(playerid);
forward KillingSpree35(playerid);



public KillingSpree3(playerid)
{
	if(GetPlayerScore(playerid) == 3)
	{
 		new PlayerName[MAX_PLAYER_NAME],
		string[128];
		GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
		format(string, sizeof(string), "[Spree] %s is now on a killing spree!", PlayerName);
		SendClientMessageToAll(COLOR_GREEN, string);
	}
}

public KillingSpree15(playerid)
{
	if(GetPlayerScore(playerid) == 15)
	{
 		new PlayerName[MAX_PLAYER_NAME],
		string[128];
		GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
		format(string, sizeof(string), "[Spree] %s has been awarded a Minigun! Stop him before he damages the whole place!", PlayerName);
		SendClientMessageToAll(COLOR_GREEN, string);
		GivePlayerWeapon(playerid, 38, 3000);
	}
}

public KillingSpree35(playerid)
{
	if(GetPlayerScore(playerid) == 35)
	{
 		new PlayerName[MAX_PLAYER_NAME],
		string[128];
		GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
		format(string, sizeof(string), "[Spree] %s has a indestructible vehicle and can now spawn hunters and hydras!", PlayerName);
		SendClientMessageToAll(COLOR_GREEN, string);
	}
}
As you can see, i want it to send a message to everyone when the player gets 3 kills saying there are on a killing spree...

If they get 15 kills, i want to send a message to all saying that the player has been awarded with a minigun.

If the player gets 35 kills, they can spawn cars...

But not all the functions are working... Plz tell me how i can improve this or put it into a better format.

Note: When the player dies, the killer should get $500 if the player was on a killing spree. And i want the players killing spree ended and his kills reset to 0. It should send a message saying...
"Player 1 has ended Player 2's killing spree. He hsa been awarded $500."

Plz help me...
Reply
#2

One more point...


when i set my score to 3, it doesnt send a message to everyone saying " player1 is now on a killing spree" it only sends it to me!!! why
Reply
#3

You need a timer to chek if there on a killingspree
Reply
#4

Say if i put a timer on for 1000, and everytime it checks, it returns a message saying "player1 is on a killing spree" it sends the message like every 1 second which is annnoying!!! Is there any other way?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)