bolnica

Započeo ᗪ卂乂, Jun 21, 2018, 17:29:54 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.

Problem(error/warning): Napravio sam kad te neko ubije da budes u bolnici 1 min, a kad istekne tajmer stavi ti poziciju ispred bolnice, ali mene spawnuje ispred pa me spawnuje u bazu, stock da ga spawnuje u bazu/kucu se zove SpawnIgraca
Dio skripte:
public OnPlayerDeath(playerid, killerid, reason)
{
	//shipment
 	if(NosiShip[playerid] == true)
	{
	new string[256];
	GetPlayerPos(playerid, sx, sy, sz);
	shipment = CreatePickup(1580, 1, sx, sy, sz, -1);
	shippick = 0;
	NosiShip[playerid] = false;
	DisablePlayerCheckpoint(playerid);
 	for(new i=0; i<MAX_PLAYERS; i++)
	{
	    if(IsPlayerConnected(i))
	    {
		SetPlayerMapIcon(i, 23, sx, sy, sz, 23, 0, MAPICON_GLOBAL);
	    }
	}
	for(new i=0; i<MAX_PLAYER_ATTACHED_OBJECTS; i++)
        {
            if(IsPlayerAttachedObjectSlotUsed(playerid, i)) RemovePlayerAttachedObject(playerid, i);
        }
	removePlayerSkullHead(playerid);
	format(string,sizeof(string), "[SHIPMENT] Igrac koji je nosio shipment je umro (/shipment da pokupite).");
	SendClientMessageToAll(COLOR_TZELENA, string);
	}
   // new Float:X,Float:Y,Float:Z;
    GetPlayerPos(playerid, X, Y, Z);
    vratabanka2[playerid] = false;
    DropGun(playerid, GetPlayerWeapon(playerid),GetPlayerAmmo(playerid),X,Y,Z,GetPlayerVirtualWorld(playerid), GetPlayerInterior(playerid));
    if(killerid != INVALID_PLAYER_ID) // Valid killer, give cash+score
    {
    PlayerInfo[killerid][pUbistava]++; PlayerInfo[playerid][pSmrti]++;
    ResetPlayerWeapons(playerid); ResetujVar(playerid);
    }
    ////////////////////////////////////////////////////////////
    if(killerid != INVALID_PLAYER_ID) // Valid killer, give cash+score
    {
	if(IgracPolicajac(killerid))
	{
		PlayerInfo[killerid][pTrazeniLevel] = 0;
		SetPlayerWantedLevel(killerid,0);
 	}
    }
	////////////////////////////////////////////////////////////
	/*
	if(!IgracPolicajac(killerid) && IsPlayerConnected(playerid))
	{
	if(killerid != INVALID_PLAYER_ID) // Valid killer, give cash+score
    {
		PostaviWanted(killerid, "Ubistvo", "Nepoznat");
	}
    }
    */
	////////////////////////////////////////////////////////////
	if(GetPlayerWantedLevel(killerid) > 6)
	{
		SetPlayerWantedLevel(killerid, 6);
		PlayerInfo[killerid][pTrazeniLevel] = 6;
	}
	////////////////////////////////////////////////////////////
	if(GetPlayerWantedLevel(playerid) > 0) //Vracanje u zatvor pod wanted levelom
	{
	    new string[256];
		/*g_NovacMinus(playerid, GetPlayerWantedLevel(playerid)*3000);
		SCMF(playerid, -1, ""ZUTA"[INFO] "PLAVA"Izgubili ste %d$ zbog umiranja sa wanted level-om "ZUTA"%d!", GetPlayerWantedLevel(playerid)*3000, GetPlayerWantedLevel(playerid)); */
		//------------------Sistem vracanja u zatvor ako odes pod wanted levelom by Dax----------------------------------------------------
		PlayerInfo[playerid][pZatvor] = 2;//
        KillTimer(RobCityHallTimer[playerid]); // robbank by Dax
		PlayerInfo[playerid][pZatvorenVreme] = PlayerInfo[playerid][pTrazeniLevel] * 300;
	    ResetPlayerWeapons(playerid);
        g_ResetujNovac(playerid);
	    //----------------------------------------------------------------------
		SetPlayerWantedLevel(playerid, 0); PlayerInfo[playerid][pTrazeniLevel] = 0;
	    format(string,sizeof(string),""PLAVA"[BG:RP] "SIVA"Igrac %s je ubijen/se ubio sa wanted level-om!",GetName(playerid));
		AdminGameMaster(-1,string);
		format(string,sizeof(string),""PLAVA"[BG:RP] "SIVA"Igrac %s je ubijen/se ubio sa wanted level-om!",GetName(playerid));
		ChatPD(-1, string);
	}
    if(PlayerInfo[killerid][pClan] == 3) //Isto kao gore, Member tj vas enum, i ID Hitmana
    {
    if(PlayerInfo[playerid][pMeta] == 1) //Provjerava ako je playerid tj ubijen meta...
    {
    new string[126];
    format(string, sizeof(string), "META: Hitman %s je izvrsio ubojstvo na %s i dobio %d$", PlayerName(killerid), PlayerName(playerid), PlayerInfo[playerid][pMetaCijena]);
    PorukaHitmanu(-1,string);
    SCM(playerid,-1,"*Ubijen si kao meta!");//saljemo poruku igracu koji je ubijen da je bio meta!
    GivePlayerMoney(killerid, PlayerInfo[playerid][pMetaCijena]);//Dodaje novac ubojici koliki je bio podesen na meta cijeni...
    PlayerInfo[playerid][pMeta] = 0; //postavlja  da igrac vise nije ziva meta...
    PlayerInfo[playerid][pMetaCijena] = 0; //postavlja  da igrac vise nije ziva meta...
   	}
	if(Alat[playerid] == 1)
	{
		Alat[playerid] = 0;
		RemovePlayerAttachedObject(playerid,1);
		RemovePlayerAttachedObject(playerid,2);
		RemovePlayerAttachedObject(playerid,3);
		RemovePlayerAttachedObject(playerid,4);
		return 1;
    }
//--------------------------War sistem by Dax---------------------------------
    }
	if(WarPozvan[playerid] == 1)
	{

	    if(WarPozvan[killerid] == 1 && PlayerInfo[killerid][pClan] == tim2 ||WarPozvan[killerid] == 1 && PlayerInfo[killerid][pLider] == tim2)
	    {
		    if(PlayerInfo[playerid][pClan] == tim1 || PlayerInfo[playerid][pLider] == tim1)
		    {
    		    SetPlayerWantedLevel(killerid, 0); // markirano
		        PlayerInfo[killerid][pTrazeniLevel] = 0;
                new str[500];
			    format(str,sizeof(str),"ADM {FFAF00}| {FFAF00}WAR | %s je ubio %s |",GetName(killerid),GetName(playerid));
			    tim2b += 1;
			    //SendAdminMessage(str,0xDABB3EAA);
			    format(str,sizeof(str),"{FFAF00}WAR | %s je ubio %s | BODOVA +1",GetName(killerid),GetName(playerid));
		    }
		}
		if(WarPozvan[killerid] == 1 && PlayerInfo[killerid][pClan] == tim1 ||WarPozvan[killerid] == 1 && PlayerInfo[killerid][pLider] == tim1)
		{
	     	if(PlayerInfo[playerid][pClan] == tim2 || PlayerInfo[playerid][pLider] == tim2)
		    {
    		    SetPlayerWantedLevel(killerid, 0); // markirano
		        PlayerInfo[killerid][pTrazeniLevel] = 0;
                new str[500];
		    	format(str,sizeof(str),"ADM {FFAF00}| WAR | %s je ubio %s |",GetName(killerid),GetName(playerid));
		    	tim1b += 1;
		    	//SendAdminMessage(str,BELA2);
		    	format(str,sizeof(str),"{FFAF00}WAR | %s je ubio %s | BODOVA +1",GetName(killerid),GetName(playerid));
		    }
		}
		if(WarPozvan[killerid] == 1 && PlayerInfo[killerid][pClan] == tim2 ||WarPozvan[killerid] == 1 && PlayerInfo[killerid][pLider] == tim2)
	    {
		    if(PlayerInfo[playerid][pClan] == tim2 || PlayerInfo[playerid][pLider] == tim2)
		    {
		        SetPlayerWantedLevel(killerid, 0);  // markirano
		        PlayerInfo[killerid][pTrazeniLevel] = 0;
                new str[500];
			    format(str,sizeof(str),"ADM TEAM KILL{FFAF00}| {FFAF00}WAR | %s je ubio %s |",GetName(killerid),GetName(playerid));
			    tim2b -= 1;
			  //  SendAdminMessage(str,BELA2);
			    format(str,sizeof(str),"{FFAF00}WAR | %s je ubio %s | BODOVA -1 | TEAM KILL",GetName(killerid),GetName(playerid));
		    }
		}
		if(WarPozvan[killerid] == 1 && PlayerInfo[killerid][pClan] == tim1 ||WarPozvan[killerid] == 1 && PlayerInfo[killerid][pLider] == tim1)
		{
	     	if(PlayerInfo[playerid][pClan] == tim1 || PlayerInfo[playerid][pLider] == tim1)
		    {
    		    SetPlayerWantedLevel(killerid, 0);  // markirano
		        PlayerInfo[killerid][pTrazeniLevel] = 0;
                new str[500];
		    	format(str,sizeof(str),"ADM TEAM KILL{FFAF00}| WAR | %s je ubio %s |",GetName(killerid),GetName(playerid));
		    	tim1b -= 1;
		    	//SendAdminMessage(str,BELA2);
		    	format(str,sizeof(str),"{FFAF00}WAR | %s je ubio %s | BODOVA -1",GetName(killerid),GetName(playerid));
		    }
		}

	    for(new i = 0; i < MAX_PLAYERS; i++)
	    {
		    if(WarPozvan[i] == 1)
		    {
		        if(PlayerInfo[i][pClan] == tim1 || PlayerInfo[i][pLider] == tim1)
		    	{
		    	new str[256];
		    	new stringasa[256];
		    	SendClientMessage(i,BELA2,str);
		    	format(stringasa, sizeof(stringasa), "~b~Mi: %d~n~~r~Oni: %d", tim1b,tim2b);
		    	GameTextForPlayer(i, stringasa, 3000, 1);
		    	}
	    	    if(PlayerInfo[i][pClan] == tim2 || PlayerInfo[i][pLider] == tim2)
		    	{
		    	new str[256];
		    	new stringasa[256];
		    	SendClientMessage(i,BELA2,str);
		    	format(stringasa, sizeof(stringasa), "~r~Mi: %d~n~~b~Oni: %d", tim2b,tim1b);
		    	GameTextForPlayer(i, stringasa, 3000, 1);
		    	}

	    	}
    	}
    }
    ////////////////////////////////////////////////////////////
	if(IsPlayerConnected(killerid) && GetPlayerState(killerid) == PLAYER_STATE_DRIVER)
	{
	    new string[256];
		format(string,sizeof(string), "Igrac %s (ID:%d) je uradio Drive By nad igracem %s (ID:%d)!", GetName(killerid), killerid, GetName(playerid), playerid);
	    AdminGameMaster(COLOR_RED, string);
	}
	////////////////////////////////////////////////////////////
	if(IsPlayerConnected(killerid) && PlayerInfo[playerid][pLevel] >= 1)
	{
	    new string[256];
		format(string,sizeof(string), "Igrac %s (ID:%d) je ubio igraca %s (ID:%d)", GetName(killerid), killerid, GetName(playerid), playerid);
		AdminGameMaster(COLOR_RED, string);
	}
	////////////////////////////////////////////////////////////
	if(gPlayerUsingLoopingAnim[playerid])
	{
		gPlayerUsingLoopingAnim[playerid] = 0;
	}
	//hp
	/*
	SCM(playerid, -1,"_____________________");
	SCM(playerid, -1,"Dosli ste na lecenje!");
	SCM(playerid, -1,"Lecenje traje 20 sekundi");
	SCM(playerid, -1,"_____________________");
	TogglePlayerControllable(playerid, false);
	SetPlayerPos(playerid, 1824.2367,-1278.0490,120.2656);
	HpTimer[playerid] = SetTimer("hpvreme", 20000, 0);
	*/
	////////////////////////////////////////////////////////////
    return 1;
}

Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log):
Slika/video ingame problema(obavezno ako je ingame problem): link slike
Poslednja Izmena: Jun 23, 2018, 15:24:32 POSLE PODNE od Bašovski

credits: Xunder, Ino420, Muma

Citat: Pottus;3903994
SetPlayerPos("dreni1998", 666.666, 666.666, 666.666, 666.666);    ///// GO IN HELL MOTHERFUCKER

https://i.imgur.com/XHLx9oj.gif
https://i.ibb.co/ZJqQKWT/NXRX.gif

Resio, sad imam problem kad ubijem nekog lika sto je id 1 a ja 0 ja opet budem u hp

credits: Xunder, Ino420, Muma

Citat: Pottus;3903994
SetPlayerPos("dreni1998", 666.666, 666.666, 666.666, 666.666);    ///// GO IN HELL MOTHERFUCKER

https://i.imgur.com/XHLx9oj.gif
https://i.ibb.co/ZJqQKWT/NXRX.gif

Citat: á—ªå,ä¹, poslato Jun 21, 2018, 18:18:04 POSLE PODNE
Resio, sad imam problem kad ubijem nekog lika sto je id 1 a ja 0 ja opet budem u hp
prevedi mi ovo

Citat: NenaD22 poslato Jun 21, 2018, 19:45:24 POSLE PODNE
prevedi mi ovo

Resio, now I have a problem when I kill someone who is id 1 and I 0 I will again be in hp

credits: Xunder, Ino420, Muma

Citat: Pottus;3903994
SetPlayerPos("dreni1998", 666.666, 666.666, 666.666, 666.666);    ///// GO IN HELL MOTHERFUCKER

https://i.imgur.com/XHLx9oj.gif
https://i.ibb.co/ZJqQKWT/NXRX.gif