Bug:
#include <a_samp>
#include <zcmd>
CMD:bug(playerid, params[])
{
if(isnull(params)) return SendClientMessage(playerid, 0xFFFFFFAA, \"Használd: /bug [bug leírása]\");
if(!Adminok()) return SendClientMessage(playerid, 0xFFFFFFAA, \"Nincs fent admin.\");
SendClientMessage(playerid, 0xFFFFFFAA, \"Üzeneted elküldve.\");
new str[128]; format(str, sizeof str, \"[bug] %s: %s\", GetName(playerid), params);
return aMsg(str);
}
stock GetName(p)
{ new n[24]; GetPlayerName(p, n, 24); return n; }
stock aMsg(s[]) {
for(new i = 0; i < MAX_PLAYERS; i++) {
if(!IsPlayerAdmin(i)) continue;
return SendClientMessage(i, 0xFFFFFFAA, s);
}
return 0;
}
stock Adminok() {
new fent = 0; for(new i = 0; i < MAX_PLAYERS; i++) {
if(!IsPlayerAdmin(i)) continue;
fent ++;
return fent;
}
return 0;
}
Csak RCON adminnak írja ki