PHP код:
CMD:cg(playerid, params[])
{
new
msg[256],
msgplayer[126],
name[MAX_PLAYER_NAME];
if(sscanf(params, "s[126]", msgplayer))
return SendClientMessage(playerid, -1, "[Erro]: Use: /cg (Mensagem)");
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
format(msg, sizeof(msg), "[GLOBAL] %s %s(%d): %s", CargoAdmin(playerid), name, playerid, msgplayer);
SendClientMessageToAll(-1, msg);
return 1;
}
CargoAdmin(playerid)
{
new Variavel[6];
if(PlayerInfo[playerid][pAdmin] == 1)
Variavel = "Admin";
if(PlayerInfo[playerid][pHelper] == 1)
Variavel = "Helper";
if(PlayerInfo[playerid][pSocio] == 1)
Variavel = "Sуcio";
if(PlayerInfo[playerid][pVip] == 1)
Variavel = "VIP";
return 1;
}