hi guys please can any one help me i create a script to prevent players in my server from using server command , like start , restart , refresh , etc ... but me too i can't use them : (i'm staff ) .
i will explane my script it's server side scripte i create table with all MTA server commands eg :
Command = {
['delaccount'] = true;
} -- etc ....
-- then i create this function :
addEventHandler ( 'onPlayerCommand',getRootElement ( ),
function ( cmd )
if Command [ cmd ] then
cancelEvent ( );
kickPlayer ( source, "Command Not Allowed" );
end;
end
);
so my question how can i make admin will be able to use those commands i tried many exports function : like isPlayerInTeams , isPlayerStaff but i think there is something wrong , thx fro help .