Jump to content
  • 0

Problema textdraw


Question

Posted

Salut,

Am luat si eu un textdraw cu '' join leave message'' si merge doar cand se conecteaza 2 3 playeri si dupa numai apare textdrawul.

TextDraw Code

[pawn]/*>>>>>>>>>>>>>>>>>By Wolfman1 Eng - Esp thanks<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<*/

#include <a_samp>

// ========================================================================== //

// =============== [ Entrar al server y al salir del server ] =============== //

#pragma tabsize 0

// ========================================================================== //

// =============== [ Entrar al server y al salir del server ] =============== //

#define Mensajes 1

// ========================================================================== //

// =============== [ Entrar al server y al salir del server ] =============== //

new Text:Desconectar[Mensajes],Text:Conectar[Mensajes];

new CurrentIndex;

// ========================================================================== //

// =============== [ Entrar al server y al salir del server ] =============== //

public OnGameModeExit()

{

TextDrawDestroy(Conectar[CurrentIndex]);

TextDrawDestroy(Desconectar[CurrentIndex]);

return 1;

}

public OnGameModeInit()

{

for(new i=0; i < Mensajes; i++)

{

Desconectar = TextDrawCreate(250.000000, 426.000000 + (i * 10), "_");

    TextDrawBackgroundColor(Desconectar, 255);

TextDrawFont(Desconectar, 1);

TextDrawLetterSize(Desconectar, 0.240000, 1.200000);

TextDrawColor(Desconectar, 16777215);

TextDrawSetOutline(Desconectar, 0);

TextDrawSetProportional(Desconectar, 1);

TextDrawSetShadow(Desconectar, 1);

Conectar = TextDrawCreate(250.000000, 426.000000 + (i * 10), "_");

    TextDrawBackgroundColor(Conectar, 255);

TextDrawFont(Conectar, 1);

TextDrawLetterSize(Conectar, 0.240000, 1.200000);

TextDrawColor(Conectar, 16777215);

TextDrawSetOutline(Conectar, 0);

TextDrawSetProportional(Conectar, 1);

TextDrawSetShadow(Conectar, 1);

}

return 1;

}

// ========================================================================== //

// =============== [ Entrar al server y al salir del server ] =============== //

public OnPlayerConnect(playerid)

{

new String[256];

new Nombre[MAX_PLAYER_NAME];

GetPlayerName(playerid, Nombre, MAX_PLAYER_NAME);

format(String, sizeof(String), "~b~~h~%s~y~ has joined ~r~~h~the server .", Nombre);

TextDrawSetString(Conectar[CurrentIndex], String);

Textdraw(playerid);

for(new i=0; i < Mensajes; i--)

{

TextDrawShowForPlayer(playerid, Conectar);

TextDrawShowForPlayer(playerid, Desconectar);

}

return (CurrentIndex + 10 != Mensajes) ? (CurrentIndex --) : (CurrentIndex = 0);

}

// ========================================================================== //

// =============== [ Entrar al server y al salir del server ] =============== //

public OnPlayerDisconnect(playerid, reason)

{

new String[256];

new Nombre[MAX_PLAYER_NAME];

GetPlayerName(playerid,Nombre,sizeof(Nombre));

format(String,sizeof(String),"~b~~h~%s~y~ has exit ~r~~h~the server .",Nombre);

TextDrawSetString(Desconectar[CurrentIndex], String);

return (CurrentIndex + 10 != Mensajes) ? (CurrentIndex --) : (CurrentIndex = 0);

}

// ========================================================================== //

// =============== [ Entrar al server y al salir del server ] =============== //

stock Textdraw(playerid)

{

TextDrawShowForAll(Conectar[CurrentIndex]);

TextDrawShowForAll(Desconectar[CurrentIndex]);

SetTimerEx("BorrarTextDraw",5000,0,"d",playerid);

return 1;

}

// ========================================================================== //

// =============== [ Entrar al server y al salir del server ] =============== //

forward BorrarTextDraw(playerid);

public BorrarTextDraw(playerid)

{

TextDrawHideForAll(Conectar[CurrentIndex]);

TextDrawHideForAll(Desconectar[CurrentIndex]);

return 1;

}

// ========================================================================== //[/pawn]

Fsul este luat dupa official, sper sa ma ajutati

1 answer to this question

Recommended Posts

Posted

UP, ma poate ajuta cineva? daca nu puteti sa il faceti pe acesta sper sa ma ajutati cu alt fs sau cod pawn sa il integrez in gm

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.