13.10.2012, 13:48
PHP код:
#include <a_samp>
new Text:Textdraw0;
new Text:Textdraw2;
// funзao do membro rjjj
#define sleep2(%0); for(new _@%0; _@%0 != (%0*50000000);) (_@%0++);
//
public OnFilterScriptInit() //se for colocar no gm troque por ongamemodeinit
{
Textdraw0 = TextDrawCreate(650.000000, 2.000000, "_");
TextDrawBackgroundColor(Textdraw0, 255);
TextDrawFont(Textdraw0, 1);
TextDrawLetterSize(Textdraw0, 1.100000, 50.000000);
TextDrawColor(Textdraw0, -1);
TextDrawSetOutline(Textdraw0, 0);
TextDrawSetProportional(Textdraw0, 1);
TextDrawSetShadow(Textdraw0, 1);
TextDrawUseBox(Textdraw0, 1);
TextDrawBoxColor(Textdraw0, -16776961);
TextDrawTextSize(Textdraw0, -10.000000, 60.000000);
Textdraw2 = TextDrawCreate(314.000000, 205.000000, "Voce Morreu...");
TextDrawAlignment(Textdraw2, 2);
TextDrawBackgroundColor(Textdraw2, 255);
TextDrawFont(Textdraw2, 1);
TextDrawLetterSize(Textdraw2, 1.000000, 4.000000);
TextDrawColor(Textdraw2, -1);
TextDrawSetOutline(Textdraw2, 0);
TextDrawSetProportional(Textdraw2, 1);
TextDrawSetShadow(Textdraw2, 1);
return 1;
}
public OnFilterScriptExit() //se for para mudar para o gm troque por ongamemodeexit
{
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
TextDrawShowForPlayer(playerid,Textdraw0); //fara aparecer a texdraw
TextDrawShowForPlayer(playerid,Textdraw2); //fara aparecer a texdraw
sleep2(10); //fara o cara esperar 10 segundos
return 1;
}
public OnPlayerSpawn(playerid)
{
TextDrawHideForPlayer(playerid,Textdraw0); //fara sumir a texdraw
TextDrawHideForPlayer(playerid,Textdraw2); //fara sumir a texdraw
return 1; // ou return true < da no mesmo do mesmo modo que return 0 = return false.
}
https://sampforum.blast.hk/showthread.php?tid=309444