23.04.2014, 22:34
It gave me the error variable but the change and worked for me as well:
Thank you
pawn Код:
new PlayerTexts[256];
pawn Код:
dcmd_announce(playerid,params[])
{
if(PlayerInfo[playerid][Level] >= 1)
{
new dmajust[256];
if(!strlen(params)) return SendClientMessage(playerid, ROJO, "[Uso]; /announce <texto>");
format(dmajust,sizeof(dmajust),"~w~]~w~]~w~] %s ~w~]~w~]~w~]",params);
TextDrawSetString(Anuncio, dmajust),SetTimer("TextdrawAnuncio", 200, 0);
format(PlayerTexts, sizeof(PlayerTexts), "%s", params);
return TextDrawShowForPlayer(playerid, Anuncio);
}
else return SendClientMessage(playerid,ROJO, "[ERROR]: Necesitas ser administrador para poder usar este comando.");
}
pawn Код:
forward TextdrawAnuncio5(playerid);
public TextdrawAnuncio5(playerid)
{
format(stringo,sizeof(stringo),"~w~]~w~]~w~] %s ~w~]~w~]~y~]",PlayerTexts);
TextDrawSetString(Anuncio, stringo),SetTimer("TextdrawAnuncio", 250, 0);
return 1;
}

