Problem oko /hc komande

Započeo ivanboskic, Jul 24, 2023, 15:38:39 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Problem(error/warning): Zanima me kako da napravim ono sa ternary operatorom Admin ? Helper da piše kad taj isti upiše poruku, u ovom slučaju želim da Admin 6 ima pristup helper chatu
Deo skripte: [pawn]
YCMD:hc(playerid, params[], help) {
    static text[128], string[128], name[MAX_PLAYER_NAME];
    if(!player_Helper[playerid] && player_Admin[playerid] < 6) return SendClientMessage(playerid, col_red, "[GRESKA]: "c_white"Niste ovlasceni!");
    if(AdminDuty[playerid] == false && HelperDuty[playerid] == false) return SendClientMessage(playerid, col_red, "[GRESKA]: "c_white"Niste na helper duznosti!");
    if(sscanf(params, "s[128]", text)) return SendClientMessage(playerid, col_yellow, "[USAGE]: "c_white"/hc [text]");
    GetPlayerName(playerid, name, sizeof(name));
    format(string, sizeof(string), ""c_srv"[HCHAT]: "c_white"Helper "c_srv"%s "c_white": %s", name, text);
    foreach(new i : Player)
        if(player_Admin && AdminDuty && player_Helper && HelperDuty)
            SendClientMessage(i, -1, string);
    return 1;
}
[/pawn]
Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log): [pawn]/[/pawn]
Slika/video ingame problema(obavezno ako je ingame problem): /