12.10.2009, 15:23
Hey!!
Im still scripting my DM server and i need help.
Here is the code: I really need help:
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...
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);
}
}
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...

