SA-MP Forums Archive
ayuda cuando muere Spawn - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Español/Spanish (https://sampforum.blast.hk/forumdisplay.php?fid=29)
+---- Thread: ayuda cuando muere Spawn (/showthread.php?tid=152036)



ayuda cuando muere Spawn - DarkChildren - 02.06.2010

Buenas quiero hacer algo que cuando muera el personaje Aparesca Fuera del hospital nada mбs que no haga ninguna animacion ni naa este es el Code espero que me ayuden y de ante mano Gracias

Код:
if(MedicBill[playerid] == 1 && PlayerInfo[playerid][pJailed] == 0 && PlayerPaintballing[playerid] == 0)
		{
		  if(FirstSpawn[playerid] != 1)
		  {
		  	/*new string[256];
		  	new cut = deathcost; //PlayerInfo[playerid][pLevel]*deathcost;
				SafeGivePlayerMoney(playerid, -cut);
				format(string, sizeof(string), "DOC: Your Medical Bill comes to $%d, Have a nice day.", cut);
				SendClientMessage(playerid, TEAM_CYAN_COLOR, string);
				MedicBill[playerid] = 0;
				MedicTime[playerid] = 0;
				NeedMedicTime[playerid] = 0;*/
				PlayerInfo[playerid][pDeaths] += 1;
				SetPlayerHealth(playerid, 25.0);
		  	SetPlayerInterior(playerid, 3);
		  	PlayerInfo[playerid][pInt] = 3;
	    	rand = random(sizeof(gMedicSpawns));
				SetPlayerPos(playerid, gMedicSpawns[rand][0], gMedicSpawns[rand][1], gMedicSpawns[rand][2]); // Warp the player
				SetPlayerFacingAngle(playerid, 0);
	    	TogglePlayerControllable(playerid, 0);
	    	GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~w~You need to rest now ...", 30000, 3);
	    	JustDied[playerid] = 1;
	    	MedicTime[playerid] = 1;
	    	ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
	    	if(PlayerInfo[playerid][pDonateRank] > 0)
	    	{
	      	NeedMedicTime[playerid] = 30;
	    	}
	    	else
	    	{
	    		NeedMedicTime[playerid] = 40;
				}
	    	PlayerPlaySound(playerid, 1062, 0.0, 0.0, 0.0);
		  	return 1;
			}
		}
Adonde quiero que Aparesca es aqui

Quote:

SetPlayerPos(playerid, 1176.4586,-1324.3153,14.0223);
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;

y Espero que me echen una mano con esto Gracias


Re: ayuda cuando muere Spawn - Cesar_Biker - 02.06.2010

pawn Код:
if(MedicBill[playerid] == 1 && PlayerInfo[playerid][pJailed] == 0 && PlayerPaintballing[playerid] == 0)
{
   if(FirstSpawn[playerid] != 1)
   {
     PlayerInfo[playerid][pDeaths] += 1;//Agrega una muerte a los stats
     SetPlayerHealth(playerid, 25.0);//le da un poco de vida
     SetPlayerPos(playerid, 1176.4586,-1324.3153,14.0223);//lo transporta a la posiciуn
     SetPlayerInterior(playerid,0);//pone el interior "standard"
     PlayerInfo[playerid][pInt] = 0;//guarda el interior en el que esta en los stats
     TogglePlayerControllable(playerid, true);//lo deja moverse
     GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~w~You need to rest now ...", 30000, 3);//le muestra el mensajito
     JustDied[playerid] = 1;//?, no se que hace
     return 1;
   }
}
Creo que asн deberнa funcionar.
Ordenadito y todo, xD


Re: ayuda cuando muere Spawn - DarkChildren - 02.06.2010

bueno Gracias vere si me va