View Single Post
Old 08/11/2016, 12:35 PM   #21
Ner0x96
Banned
 
Join Date: Oct 2014
Posts: 75
Reputation: 15
Default Respuesta: [Ayuda] Porque sucede esto

Prueba así:

PHP Code:
#include <a_samp>

#if defined FILTERSCRIPT

static PlayerText:TDEditor_PTD[MAX_PLAYERS][3]; // Se usa el tag "PlayerText:"


public OnPlayerConnect(playerid// Es llamado cuando un jugador se conecta al servidor
{
    
TDEditor_PTD[playerid][0] = CreatePlayerTextDraw(playerid405.500000186.266723"TE HA MATADO");
    
PlayerTextDrawLetterSize(playeridTDEditor_PTD[playerid][0], 0.4344003.250136);
    
PlayerTextDrawAlignment(playeridTDEditor_PTD[playerid][0], 2);
    
PlayerTextDrawColor(playeridTDEditor_PTD[playerid][0], -1);
    
PlayerTextDrawSetShadow(playeridTDEditor_PTD[playerid][0], 1);
    
PlayerTextDrawSetOutline(playeridTDEditor_PTD[playerid][0], 0);
    
PlayerTextDrawBackgroundColor(playeridTDEditor_PTD[playerid][0], 255);
    
PlayerTextDrawFont(playeridTDEditor_PTD[playerid][0], 2);
    
PlayerTextDrawSetProportional(playeridTDEditor_PTD[playerid][0], 0);
    
PlayerTextDrawSetShadow(playeridTDEditor_PTD[playerid][0], 1);
    
PlayerTextDrawSetSelectable(playeridTDEditor_PTD[playerid][0], true);

    
TDEditor_PTD[playerid][1] = CreatePlayerTextDraw(playerid, -10.799992134.000030"_"); // Si lo dejamos en blanco, el cliente producirá un crash.
    
PlayerTextDrawLetterSize(playeridTDEditor_PTD[playerid][1], 0.00000016.159999);
    
PlayerTextDrawTextSize(playeridTDEditor_PTD[playerid][1], 640.0000000.000000);
    
PlayerTextDrawAlignment(playeridTDEditor_PTD[playerid][1], 1);
    
PlayerTextDrawColor(playeridTDEditor_PTD[playerid][1], -1523963137);
    
PlayerTextDrawUseBox(playeridTDEditor_PTD[playerid][1], 1);
    
PlayerTextDrawBoxColor(playeridTDEditor_PTD[playerid][1], 8388863);
    
PlayerTextDrawSetShadow(playeridTDEditor_PTD[playerid][1], 0);
    
PlayerTextDrawSetOutline(playeridTDEditor_PTD[playerid][1], 0);
    
PlayerTextDrawBackgroundColor(playeridTDEditor_PTD[playerid][1], 41215);
    
PlayerTextDrawFont(playeridTDEditor_PTD[playerid][1], 2);
    
PlayerTextDrawSetProportional(playeridTDEditor_PTD[playerid][1], 1);
    
PlayerTextDrawSetShadow(playeridTDEditor_PTD[playerid][1], 0);

    
TDEditor_PTD[playerid][2] = CreatePlayerTextDraw(playerid, -47.600006125.039985"_");
    
PlayerTextDrawLetterSize(playeridTDEditor_PTD[playerid][2], 0.0000001.199998);
    
PlayerTextDrawTextSize(playeridTDEditor_PTD[playerid][2], 643.0000000.000000);
    
PlayerTextDrawAlignment(playeridTDEditor_PTD[playerid][2], 1);
    
PlayerTextDrawColor(playeridTDEditor_PTD[playerid][2], 65535);
    
PlayerTextDrawUseBox(playeridTDEditor_PTD[playerid][2], 1);
    
PlayerTextDrawBoxColor(playeridTDEditor_PTD[playerid][2], -1061109505);
    
PlayerTextDrawSetShadow(playeridTDEditor_PTD[playerid][2], 0);
    
PlayerTextDrawSetOutline(playeridTDEditor_PTD[playerid][2], 0);
    
PlayerTextDrawBackgroundColor(playeridTDEditor_PTD[playerid][2], 255);
    
PlayerTextDrawFont(playeridTDEditor_PTD[playerid][2], 1);
    
PlayerTextDrawSetProportional(playeridTDEditor_PTD[playerid][2], 1);
    
PlayerTextDrawSetShadow(playeridTDEditor_PTD[playerid][2], 0);
    return 
1;
}


public 
OnPlayerSpawn(playerid)
{
    return 
1;
}

public 
OnPlayerDeath(playeridkilleridreason)
{
  new 
muerte[48];
  
format(muertesizeof(muerte), "Haz sido asesinado por: %s"GetPName(killerid));
  
SendClientMessage(playerid0xFF0000AAmuerte);
  for(new 
i=03i++) TextDrawShowForPlayer(playeridTDEditor_PTD[playerid][i]);
  
SetTimerEx("QuitarTD"30000"i"playerid); // Después de 3 segundos se quitará el textdraw
  
return 1;
}

forward QuitarTD(playerid);
public 
QuitarTD(playerid// Ésto hará que se quite el textdraw, por lo cual usamos TextDrawHideForPlayer
{
TextDrawHideForPlayer(playeridTDEditor_PTD[playerid][0]); // TDEditor_PTD[playerid][x] < Tus textdraws que mostraste
TextDrawHideForPlayer(playeridTDEditor_PTD[playerid][1]);
TextDrawHideForPlayer(playeridTDEditor_PTD[playerid][2]);
return 
1;
}

stock GetPName(playerid)
{
    new 
p_name[24];
    
GetPlayerName(playerid,p_name,24);
    return 
p_name;
}

#endif 
Puedes basarte en éste FS que yo hice hace tiempo:
http://forum.sa-mp.com/showthread.php?t=242021
Ner0x96 is offline