Jump to content
  • 0

Cum fac asta?


KrisTaL

Question

Buna ziua SaMp Community! As dori sa ma ajutati si pe mine cu un script. As dori scriptul urmator:

Atunci cand PD/FBI/NG omoara un suspect cu wanted (nu conteaza cat) sa zica la toti cei online din PD/FBI/NG: "X was killed by Cops and go to Jail.". Am sa pun si o poza sa va arat cam cum ar arata, voi da EDIT. Va rog sa ma ajutati. Tot ce stiu de aceasta chestie este ca trebuie bagata la:

public OnPlayerDeath

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

Citeste regulamentul. NU se cer script-uri!

Apropo, tu vorbesti de acest script:

public OnPlayerDeath(playerid, killerid, reason)
{

 	if(PlayerInfo[playerid][pWanted] >= 1)
	{
	    if(InRWarPlayer[playerid] == 0)
	    {
		    new price = (PlayerInfo[playerid][pWanted] * 600) + 750;
	 		new count;
	 		new stringw[258];
			for(new cop=0;cop<MAX_PLAYERS;cop++)
	        {
			    if(IsACop(cop) && ProxDetectorS(100.0, playerid, cop))
			    {
			        if(PlayerInfo[playerid][pLevel] >= 2)
			        {
						format(stringw, sizeof(stringw), "~w~Suspect~r~Omorat~n~Recompensa~g~%s", FormatMoney(price));
						GameTextForPlayer(cop, stringw, 5000, 1);
						ConsumingMoney[cop] = 1;
						PlayerInfo[cop][pCash] += price;
						PlayerPlaySound(cop, 1058, 0.0, 0.0, 0.0);
					} else { SendClientMessage(cop, COLOR_GRAD1, "Fara abuz la playeri cu level 1-2."); }
	    			count = 1;
				}
			}
			if(count == 1)
			{
				PlayerInfo[playerid][pCash] = PlayerInfo[playerid][pCash] - price;
				PlayerInfo[playerid][pWantedDeaths] += 1;
				PlayerInfo[playerid][pJailed] = 1;
	            SetTimer("Checkjail",3000,false);
			    PlayerInfo[playerid][pJailTime] = PlayerInfo[playerid][pWanted] * 300;
			    format(stringw, sizeof(stringw), "* Esti la jail %d secunde si ai pierdut %s deoarece ai incercat sa fugi.", PlayerInfo[playerid][pJailTime], FormatMoney(price));
			    SendClientMessage(playerid, COLOR_LIGHTRED, stringw);
			    WantedPoints[playerid] = 0;
			    Freezed[playerid] = 0;
				PlayerInfo[playerid][pWanted] = 0;
			}
		}
	}

Cu placere! :)

Rareori ne gândim la ceea ce avem, dar mereu la ceea ce ne lipseşte

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.