07.12.2017, 20:50
(
Последний раз редактировалось Marllun; 07.12.2017 в 21:38.
)
Cуdigo completo, para usar o spaзo no texto use _ . Й necessбrio a include zcmd e sscanf2, lembrando o zcmd irб desativar os cуdigos cmdtext, caso queria usar os 2 juntos olhe esse tуpico.
//zcmd e cmdtext
https://sampforum.blast.hk/showthread.php?tid=399808
ZCMD E SSCANF2
https://www.mediafire.com/file/myx03...20e%20Zcmd.rar
Feito por mim
//zcmd e cmdtext
https://sampforum.blast.hk/showthread.php?tid=399808
ZCMD E SSCANF2
https://www.mediafire.com/file/myx03...20e%20Zcmd.rar
Feito por mim
PHP код:
#include <a_samp>
#include <sscanf2>
#include <zcmd>
new Text:contar;
public OnFilterScriptInit()
{
contar = TextDrawCreate(290.000000, 280.305511, " ");
TextDrawLetterSize(contar, 0.400000, 1.600000);
TextDrawAlignment(contar, 2);
TextDrawColor(contar, -1);
TextDrawSetShadow(contar, 0);
TextDrawSetOutline(contar, 1);
TextDrawBackgroundColor(contar, 255);
TextDrawFont(contar, 1);
TextDrawSetProportional(contar, 1);
TextDrawSetShadow(contar, 0);
return 1;
}
COMMAND:cnn(playerid, params[])
{
new stringg[60],tempo ,SS[266],textotipo;
if (sscanf(params, "s[64]dd", stringg,tempo,textotipo)) return SendClientMessage(playerid, 0xFF0000AA, "Use: /cnn [Mensagem] [Tempo] [Tipo de texto]");
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xFF0000AA, "Vocк nгo й um administrador rcon");
SetTimer("settimequalquer", tempo, false);
TextDrawShowForAll(contar);
TextDrawFont(contar, textotipo);
format(SS, sizeof(SS), "~r~# ~w~%s ~r~#", stringg);
TextDrawSetString(contar,SS);
return 1;
}
forward settimequalquer();
public settimequalquer()
{
TextDrawHideForAll(contar);
return 1;
}
stock ConverterTexto(texto[])
{
new string[256];
for(new i = 0; texto[i]; ++i)
{
string[i] = texto[i];
switch(string[i])
{
case 0xC0 .. 0xC3: string[i] -= 0x40; case 0xC7 .. 0xC9: string[i] -= 0x42; case 0xD2 .. 0xD5: string[i] -= 0x44; case 0xD9 .. 0xDC: string[i] -= 0x47; case 0xE0 .. 0xE3: string[i] -= 0x49;
case 0xE7 .. 0xEF: string[i] -= 0x4B; case 0xF2 .. 0xF5: string[i] -= 0x4D; case 0xF9 .. 0xFC: string[i] -= 0x50; case 0xC4, 0xE4: string[i] = 0x83; case 0xC6, 0xE6: string[i] = 0x84; case 0xD6, 0xF6: string[i] = 0x91; case 0xD1, 0xF1: string[i] = 0xEC; case 0xDF: string[i] = 0x96; case 0xBF: string[i] = 0xAF;
}
}
return string;
}