if(strcmp(cmd, "/cnn", true) == 0)
{
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), PASTA_CONTAS, aname);
if(pAdmin[playerid] == 1 || pAdmin[playerid] == 2 || pAdmin[playerid] == 3 || pAdmin[playerid] == 4 || pAdmin[playerid] == 5){
new trampo[256];
strmid(trampo,cmdtext,4,strlen(cmdtext));
if (!strlen(trampo))
{
SendClientMessage(playerid, ERRO_L, "| ERRO | Digite: /cnn [texto]");
return 1;
}
if(IsPlayerConnected(playerid))
{
if(pAdmin[playerid] == 1 || pAdmin[playerid] == 2 || pAdmin[playerid] == 3 || pAdmin[playerid] == 4 || pAdmin[playerid] == 5){
format(string, sizeof(string), "~r~# ~w~%s ~r~#", trampo);
GameTextForAll(string, 5000, 5);
}else{
SendClientMessage(playerid, ERRO_L, "| ERRO | Comando invбlido!");
}
}else{
SendClientMessage(playerid, ERRO_L, "| ERRO | Vocк tem que estar logado para usar este comando!");
}
return 1;
}
}
como faзo com TextDraw?? vocкs pode fazer um para mim?? tou comeзando hj no pawn
|
#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;
}