їQue he hecho mal?
#8

the_chaoz, te falto TextDrawDestroy en OnPlayerDisconnect.

Aca te dejo una version que muestra el textdraw a todos y no nesecitas strtok:

pawn Код:
new Text:Texto;

forward OcultarTextdraw();

public OnGameModeInit()
{
    Texto = TextDrawCreate(320.0, 240.0, " "); //Tus X e Y estaban mal, no se iba a ver.
    TextDrawAlignment(Texto, 2); //Lo centramos con esto.
    TextDrawSetOutline(Texto, 1); //Le pone un contorno negro.
    TextDrawSetShadow(Texto, 0); //Le saca la sombra, porque queda fea para mi gusto.(borra esto si queres la sombra)
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/say", false, 4))
    {
        if(!strlen(cmdtext[4])) return SendClientMessage(playerid, 0xF0F0F0FF, "USO: /say [texto]");
        {
            new string[129];
            format(string, 129, "%s", cmdtext[4]);
            TextDrawSetString(Texto, string);
            TextDrawShowForAll(Texto);
            SetTimer("OcultarTextdraw", 6500, true);
        }
        return 1;
    }
    return 0;
}

public OcultarTextdraw()
{
    TextDrawHideForAll(Texto);
    TextDrawSetString(Texto, " ");
    return 1;
}
Reply


Messages In This Thread
їQue he hecho mal? -> SOLUCIONADO - by SAMPGammer - 24.11.2010, 17:11
Respuesta: їQue he hecho mal? - by SuperMarioRol - 24.11.2010, 18:17
Respuesta: їQue he hecho mal? - by TheChaoz - 24.11.2010, 19:15
Respuesta: їQue he hecho mal? - by MrDeath537 - 24.11.2010, 19:27
Re: їQue he hecho mal? - by zSuYaNw - 24.11.2010, 23:45
Re: їQue he hecho mal? - by SAMPGammer - 25.11.2010, 11:14
Respuesta: їQue he hecho mal? - by TheChaoz - 25.11.2010, 14:11
Re: їQue he hecho mal? - by The_Moddler - 25.11.2010, 16:46

Forum Jump:


Users browsing this thread: 1 Guest(s)