21.05.2018, 12:57
I am creating sendrcon command on my server
but when i got both var on my player, it says i don't have enough permission. but when i only have RCON assigned to my player, it works... so that means the error is on Logical OR Operator, cos i already check'd my stats, and i have Level 6 Admin on my player when i got denied... i've tried using both samp original pawn compiler and pawn-lang compiler
what do i need to do so when i got both var it would work?
Код:
CMD:sendrcon(playerid, params[]) { if(!IsPlayerAdmin(playerid) || pInfo[playerid][Admin] == 6) return SendClientMessage(playerid, 0xFFFFFFFF, "[HPRP]: You don't have enough permissions to use this command"); { new rconcmd[128]; if(sscanf(params, "s[128]", rconcmd)) return SendClientMessage(playerid, 0xFFFFFFFF, "[HPRP] SYNTAX: /sendrcon [message]"); { SendRconCommand(rconcmd); format(rconcmd, sizeof(rconcmd), "Command %s has been sent to RCON", rconcmd); SendClientMessage(playerid, 0xFFFFFFFF, rconcmd); } } return CMD_SUCCESS; }
what do i need to do so when i got both var it would work?