31.03.2018, 03:24
PHP код:
new nseioqe; //No topo da gm
new Text:XsemV; //No topo da gm
#define TEMPOANUNCIARR 6000 // = 6 segundos
//No OnGameModeInit
XsemV = TextDrawCreate(300.000000,200.000000, " ");
TextDrawLetterSize(XsemV, 0.5,2.0);
TextDrawAlignment(XsemV,0);
TextDrawBackgroundColor(XsemV,0x000000ff);
TextDrawFont(XsemV,1);
TextDrawAlignment(XsemV,2);
TextDrawColor(XsemV,0xffffffff);
TextDrawSetOutline(XsemV,1);
TextDrawSetProportional(XsemV,1);
TextDrawSetShadow(XsemV,1);
//livree
forward HideTextDrawww();
public HideTextDrawww()
{
TextDrawHideForAll(XsemV);
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;
}
//Teu cуdigo
if(!strcmp(cmd,"/tela", true))
{
if(aInfo[playerid][AdminL] == 1 || aInfo[playerid][Admin] == 1 || aInfo[playerid][Moderador] == 1 || aInfo[playerid][Ajudante] == 1)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COR_ERRO, "Uso vбlido: /tela [Mensagem]");
return 1;
}
{
format(gstring, sizeof(gstring), "~n~~n~~n~~n~~n~~n~~b~%s: ~w~%s", PlayerName(playerid), tmp);
ConverterTexto(gstring);
TextDrawSetString(XsemV,gstring);
TextDrawShowForAll(XsemV);
SetTimer("HideTextDrawww", TEMPOANUNCIARR, 0);
}
}
else
{
SendClientMessage(playerid, COR_ERRO, "| ERRO | Vocк nгo tem Permissгo!");
}
return 1;
}
PHP код:
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;
}
if(!strcmp(cmd,"/tela", true))
{
if(aInfo[playerid][AdminL] == 1 || aInfo[playerid][Admin] == 1 || aInfo[playerid][Moderador] == 1 || aInfo[playerid][Ajudante] == 1)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COR_ERRO, "Uso vбlido: /tela [Mensagem]");
return 1;
}
{
format(gstring, sizeof(gstring), "~n~~n~~n~~n~~n~~n~~b~%s: ~w~%s", PlayerName(playerid), tmp);
ConverterTexto(gstring);
GameTextForAll(gstring, 5000, 3);
}
}
else
{
SendClientMessage(playerid, COR_ERRO, "| ERRO | Vocк nгo tem Permissгo!");
}
return 1;
}