#include <a_samp> new Text:Textdraw0; new Text:Textdraw1; new Text:Textdraw2; new Text:Textdraw3; public OnFilterScriptInit() { print("Archivo de Textdraws generado utilizando"); print(" Zamaroht's textdraw editor fue exitosamente cargado."); // Crear los textdraws: Textdraw0 = TextDrawCreate(295.000000, 147.000000, "mataste"); TextDrawBackgroundColor(Textdraw0, 255); TextDrawFont(Textdraw0, 3); TextDrawLetterSize(Textdraw0, 0.460000, 1.899999); TextDrawColor(Textdraw0, -16776961); TextDrawSetOutline(Textdraw0, 1); TextDrawSetProportional(Textdraw0, 1); Textdraw1 = TextDrawCreate(240.000000, 182.000000, "~>~%s~<~ "); TextDrawBackgroundColor(Textdraw1, 255); TextDrawFont(Textdraw1, 0); TextDrawLetterSize(Textdraw1, 0.349999, 2.099999); TextDrawColor(Textdraw1, -65281); TextDrawSetOutline(Textdraw1, 1); TextDrawSetProportional(Textdraw1, 1); Textdraw2 = TextDrawCreate(323.000000, 168.000000, "~b~a"); TextDrawBackgroundColor(Textdraw2, 255); TextDrawFont(Textdraw2, 3); TextDrawLetterSize(Textdraw2, 0.509998, 1.200000); TextDrawColor(Textdraw2, 16777215); TextDrawSetOutline(Textdraw2, 0); TextDrawSetProportional(Textdraw2, 1); TextDrawSetShadow(Textdraw2, 1); Textdraw3 = TextDrawCreate(318.000000, 215.000000, "Random"); TextDrawBackgroundColor(Textdraw3, -1); TextDrawFont(Textdraw3, 3); TextDrawLetterSize(Textdraw3, 0.509998, 1.500000); TextDrawColor(Textdraw3, -16711681); TextDrawSetOutline(Textdraw3, 1); TextDrawSetProportional(Textdraw3, 1); return 1; } public OnFilterScriptExit() { TextDrawHideForAll(Textdraw0); TextDrawDestroy(Textdraw0); TextDrawHideForAll(Textdraw1); TextDrawDestroy(Textdraw1); TextDrawHideForAll(Textdraw2); TextDrawDestroy(Textdraw2); TextDrawHideForAll(Textdraw3); TextDrawDestroy(Textdraw3); return 1; } public OnPlayerDeath(playerid, killerid, reason) { TextDrawShowForPlayer(killerid, Textdraw0); TextDrawShowForPlayer(killerid, Textdraw1); TextDrawShowForPlayer(killerid, Textdraw2); TextDrawShowForPlayer(killerid, Textdraw3); SetTimerEx("HideMessage", 2000000, 0, "i", killerid); } forward HideMessage(playerid); public HideMessage(playerid) { TextDrawHideForPlayer(playerid, Textdraw0); TextDrawHideForPlayer(playerid, Textdraw1); TextDrawHideForPlayer(playerid, Textdraw2); TextDrawHideForPlayer(playerid, Textdraw3); } |
public OnPlayerDeath(playerid, killerid, reason)
{
if(IsPlayerConnected(killerid))//verifica si el q a matado esta conectado
{
new string[64];
format(string, 64, "%s te ha matado", PlayerName(killerid));
GameTextForPlayer(playerid, string, 3000, 1);
format(string, 64, "has matado a %s", PlayerName(playerid));
GameTextForPlayer(killerid, string, 3000, 1);
}
else
{
GameTextForPlayer(playerid, "has muerto", 3000, 1);//ha muerto solo...
}
return 1;
}
//Esto aparte, sirve para no poner muchas veces GetPlayerName
stock PlayerName(playerid)
{
new name[24];
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
return name;
}