Farma

Započeo Nemanja23, Septembar 28, 2017, 10:47:59 PRE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim:Nbtn
Detaljan opis problema:Kada me neko ubije ili nekog ubijem spawnam se na farmi.
Dio skripte:
public OnPlayerDeath(playerid, killerid, reason)
{
DisablePlayerCheckpoint(playerid);
    SetPlayerInterior(playerid, 0);
    ResetPlayerWeapons(playerid);
	PosaoGPS[playerid] = 0;
	PlayerInfo[playerid][pRadi] = 0;
	Marama[playerid] = 0;
	if(!Policajac(playerid))
	{
		new Float:Xx,Float:Yy,Float:Zz;
		GetPlayerPos(playerid, Xx, Yy, Zz);
		DropGun(playerid, GetPlayerWeapon(playerid),GetPlayerAmmo(playerid),Xx,Yy,Zz,GetPlayerVirtualWorld(playerid), GetPlayerInterior(playerid));
   }
	if(killerid != INVALID_PLAYER_ID) // Valid killer, give cash+score
    {
		PlayerInfo[killerid][pUbistava]++; PlayerInfo[playerid][pSmrti]++;
		RajsevaResetPlayerWeapons(playerid); ResetujVar(playerid);
    }
    ////////////////////////////////////////////////////////////
    if(killerid != INVALID_PLAYER_ID) // Valid killer, give cash+score
    {
		if(IgracPolicajac(killerid))
		{
			PlayerInfo[killerid][pTrazeniLevel] = 0;
			SetPlayerColor(playerid, 0x2641FEAA);
		}
    }
	////////////////////////////////////////////////////////////
	if(!IgracPolicajac(killerid) && IsPlayerConnected(playerid))
	{
	    if(PlayerInfo[killerid][Tim1] > 0) return 1;
	    if(PlayerInfo[killerid][Tim1] > 2) return 1;
		if(killerid != INVALID_PLAYER_ID) // Valid killer, give cash+score
		{

			PostaviWanted(killerid, "Ubistvo", "Nepoznat", 6);
		}
    }
	////////////////////////////////////////////////////////////
	if(PlayerInfo[killerid][pTrazeniLevel] > 1000)
	{
		PlayerInfo[killerid][pTrazeniLevel] = 1000;
	}
	if((!Policajac(killerid) && PlayerInfo[killerid][pUfbi] == 1) && Policajac(playerid))
    {
		new rand = random(sizeof(RandomZatvor));
		SetPlayerPos(killerid, RandomZatvor[rand][0], RandomZatvor[rand][1], RandomZatvor[rand][2]);
		SetPlayerInterior(killerid, 0);
		TogglePlayerControllable(killerid, 0);
		freeze[killerid] = SetTimerEx("Freeze",5000, false, "i", killerid);
		PlayerInfo[killerid][pZatvor] = 2;
		PlayerInfo[killerid][pZatvorenVreme] = 30*60;
		new string[256];
		format(string, sizeof(string), ""CRVENA"SPAWN-KILL: Zatvoreni ste u zatvor na 30 minuta zbog SK!.");
		SCM(killerid, -1, string);
		format(string,sizeof(string), ""CRVENA"SK: "SIVA"Igrac %s (ID:%d) je uradio SK nad igracem %s (ID:%d) i zatvoren je na 30 minuta!", GetName(killerid), killerid, GetName(playerid), playerid);
	    AdminGameMaster(-1, string);
    }
	////////////////////////////////////////////////////////////
	if(PlayerInfo[playerid][pTrazeniLevel] > 0)
	{
	    new string[256];
		g_NovacMinus(playerid, PlayerInfo[playerid][pTrazeniLevel]*3000);
		SCMF(playerid, -1, "Ubijeni ste! Gubite %d$ zbog umiranja sa wanted level-om "CRVENA"%d!", PlayerInfo[playerid][pTrazeniLevel]*1500, PlayerInfo[playerid][pTrazeniLevel]);
	    PlayerInfo[playerid][pTrazeniLevel] = 0;
		format(string,sizeof(string),""PLAVA"OBAVESTENJE:{FFFFFF}Svim jedniciama, gradjanin %s je ubijen/se ubio sa wanted level-om!",GetName(playerid));
		CFBIPD(-1, string);
		SetPlayerColor(playerid, BELA2);
    }
    ////////////////////////////////////////////////////////////
	if(IsPlayerConnected(killerid) && GetPlayerState(killerid) == PLAYER_STATE_DRIVER)
	{
	    new string[256];
		format(string,sizeof(string), ""CRVENA"DRIVE-BY: "SIVA"Igrac %s (ID:%d) je uradio Drive By nad igracem %s (ID:%d)!", GetName(killerid), killerid, GetName(playerid), playerid);
	    AdminGameMaster(-1, string);
	    SetPlayerColor(killerid, COLOR_RED);
	}
	////////////////////////////////////////////////////////////
	if(IsPlayerConnected(killerid) && PlayerInfo[playerid][pLevel] >= 1)
	{
	    new string[256];
		format(string,sizeof(string), ""CRVENA"A-KILL: "SIVA"Igrac %s (ID:%d) je ubio igraca %s (ID:%d)", GetName(killerid), killerid, GetName(playerid), playerid);
		AdminGameMaster(-1, string);
		if(!Policajac(killerid))
		{
			SetPlayerColor(killerid, COLOR_RED);
		}
		if(PlayerInfo[playerid][pNarucen] == 1 && (PlayerInfo[killerid][pClan] == 10 || PlayerInfo[killerid][pLider] == 10))
		{
			g_NovacPlus(killerid, 17000);
			SCM(killerid,-1,""SRWBOJA"(( NCRPG )) {FFFFFF}Ubili ste trazenog igraca i dobili 17 000 $!");
			PlayerInfo[killerid][pTrazeniLevel] = 0;
			SetPlayerColor(killerid, BELA2);
			PlayerInfo[playerid][pNarucen] = 0;
			format(string,sizeof(string),""SRWBOJA"UBISTVO: {FFFFFF}Placeni ubica je ubio %s i izvrsio svoj zadatak!", GetName(playerid));
			SCMTA(-1,string);
		}
	}

Neke slike/video za lakse dobivanje pomoci(neobavezno): Takodje mi i [DEBUG] Izbacuje za onplayerdeath 65535