Valahogy így?
#include <a_samp>
#include <zcmd>
#include <sscanf2>
new Rank[ MAX_PLAYERS ][ 64 + 1 ];
new RankColor[MAX_PLAYERS][64 + 1];
CMD:setrank(playerid, params[])
{
new Titulus[64 + 1];
new string[250];
if(sscanf(params, \"s[64]\", Titulus)) return SendClientMessage(playerid, -1, \"{DDDDDD}>> Használat: {005c99}/setrank [Új titulus]\");
if(strlen(Titulus) > 64) return 1;
format(Rank[playerid], (64), \" <%s>\", Titulus);
format(string,sizeof(string),\"{DDDDDD}>> AccServ: {005c99}Rank megváltoztatva! Rank: %s\",Titulus);
SendClientMessage(playerid, 0xFFFFFFAA, string);
return 1;
}
CMD:setrankcolor(playerid, params[])
{
new Color[64 + 1];
new string[250];
if(sscanf(params, \"%06x\", Color)) return SendClientMessage(playerid, -1, \"{DDDDDD}>> Használat: {005c99}/setrankcolor [színkód (Például: 0xFFFFAA)]\");
if(strlen(Color) > 64) return 1;
format(RankColor[playerid], (64), \" {%s}\", Color);
format(string,sizeof(string),\"{DDDDDD}>> AccServ: {005c99}Rang színed beállítva!! Színkód: %s\",Color);
SendClientMessage(playerid, 0xFFFFFFAA, string);
return 1;
}
public OnPlayerText(playerid, text[])
{
new g_szString[250 + 1];
format(g_szString,(250),\"%s %s%s{DDDDDD}(%d): {FFFFFF}%s\", playerName(playerid), RankColor[playerid], Rank[playerid], playerid, text);
SendClientMessageToAll(-1, g_szString);
return 0;
}
stock playerName( playerid ) {
new plaName[ 24 + 1 ];
GetPlayerName( playerid, plaName, (24) );
return plaName;
}