DM Server Script [HELP] - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: DM Server Script [HELP] (
/showthread.php?tid=101846)
DM Server Script [HELP] -
Tigerbeast11 - 12.10.2009
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...
Re: DM Server Script [HELP] -
Tigerbeast11 - 12.10.2009
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
Re: DM Server Script [HELP] -
GMusicOn - 12.10.2009
You need a timer to chek if there on a killingspree
Re: DM Server Script [HELP] -
Tigerbeast11 - 12.10.2009
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?