SA-MP Forums

Go Back   SA-MP Forums > Non-English > Languages > Español/Spanish

 
 
Thread Tools Display Modes
Old 08/11/2016, 01:35 PM   #21
Ner0x96
Banned
 
Join Date: Oct 2014
Posts: 76
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  
Old 09/11/2016, 09:31 PM   #22
SilverGamingYT
Banned
 
Join Date: Aug 2016
Posts: 28
Reputation: 0
Default Re: [Ayuda] Porque sucede esto

No funciono, creo que mejor me basare ten tu FS, asi modificarle el texdraw de posicion y bueno le agregare algunas cosas, gracias!
SilverGamingYT is offline  
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 05:07 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.