SA-MP Forums Archive
[DUV] Quando o player morre! - 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: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [DUV] Quando o player morre! (/showthread.php?tid=149623)



[DUV] Quando o player morre! - Diogo_braz - 22.05.2010

Olб galera eu queria sabe o seguinte, quando o player morre aparece aquela faturinha ne? mas agora no meu servidor quando ele loga a fatura cobra ao logar eu queria qe essa fatura cobra-se sу quando o player morria e nгo quando ele loga-va O_o
Ai em baixo vai o codigo da morte...
Ele estб colocado no Public SetPlayerSpawn alguem me ajuda plz

Code:
		}
  if(MedicBill[playerid] == 1 && PlayerInfo[playerid][pJailed] == 0 && PlayerPaintballing[playerid] == 0)
		{
		  new string[256];
		  new cut = deathcost; //PlayerInfo[playerid][pLevel]*deathcost;
			format(string, sizeof(string), "AVISO: Seu mйdico cobrou-lhe R$%d, tenha um уtimo dia.", 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, 5);
	    rand = random(sizeof(gMedicSpawns));
			SetPlayerPos(playerid, gMedicSpawns[rand][0], gMedicSpawns[rand][1], gMedicSpawns[rand][2]); // Warp the player
			SetPlayerFacingAngle(playerid, 270.0);
	    TogglePlayerControllable(playerid, 0);
	    GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~y~You are recovering from Your ~r~wornds~y~...", 35000, 3);
	    MedicTime[playerid] = 1;
	    if(PlayerInfo[playerid][pVIP] > 0)
	    {
	      NeedMedicTime[playerid] = 30;
	    }
	    else
	    {
	    	NeedMedicTime[playerid] = 60;
			}
	    PlayerPlaySound(playerid, 1062, 0.0, 0.0, 0.0);
		  return 1;*/



Re: [DUV] Quando o player morre! - [BEP]AcerPilot - 22.05.2010

Coloca no OnPlayerDeath que resolve...


Re: [DUV] Quando o player morre! - Diogo_braz - 22.05.2010

Jб tentei nгo deu mas to tentando uma maneira aqui ver se da pera ai jaja respondo vlw na msma


Re: [DUV] Quando o player morre! - Diogo_braz - 22.05.2010

Affz nгo consegui alguem me ajuda plz

HELP!!


Re: [DUV] Quando o player morre! - DartakousLien - 23.05.2010

Quote:
Originally Posted by [BEP
GeoPilot ]
Coloca no OnPlayerDeath que resolve...
Coloca no OnPlayerDeath e apaga o que estб no OnPlayerSpawn

porque o que faz perder o dinheiro ao entrar й que vocк faz spawn e tal como vocк disse isso ta no onplayerspawn entao o player nao vai perder dinheiro por morer mas sim por fazer spawn e isso aconteзerб sempre que entrar no server

espero ter ajudado


Re: [DUV] Quando o player morre! - Diogo_braz - 23.05.2010

Mas o Problema й que eu jб tentei isso e nada...


Re: [DUV] Quando o player morre! - Ambrуsio - 23.05.2010

1є - Poste a parte do script inteira, nгo quebrada, assim eu posso ajudar.
2є - Nгo faзas double post, quantas vezes foi falado isso? Leia as regras.