[Solved] Show msg to admins.

Started by Gito Baloch, Apr 12, 2020, 09:41 AM

Previous topic - Next topic

Gito Baloch

Hy Scripters.

I want to know that..

this msg Message( "[#a20100]Admin "+player.Name+" set " + plr.Name + "  " + GetWeaponName( GetWeaponID( wep ) ) +". Ammo: " + ammo + ".");
shows to admins only not to players how i do that?
 :-\
Programming is the language I speak, the world I shape, and the future I code

KX

Create a function with the admin message name or any name you want then Run a loop and check if the player level is equal to the admin level or greater than that.
if you want a readymade code then forget it at least from me but if you tried and got errors you are good to post here

Gito Baloch

local admin = GetPlayer(stats[player.ID].Level < 3)
MessagePlayer("Player : "+player.Name+" has reported "+plr.Name+" for : "+reason+"", admin);

hey i did this still didn't worked.
Programming is the language I speak, the world I shape, and the future I code

umar4911

Quote from: Gitobaloch on Apr 12, 2020, 01:01 PMlocal admin = GetPlayer(stats[player.ID].Level < 3)
MessagePlayer("Player : "+player.Name+" has reported "+plr.Name+" for : "+reason+"", admin);

hey i did this still didn't worked.
untested
local admin;
for( local i = 0; i <= GetMaxPlayers(); i++ )
{
admin = FindPlayer( i );
if ( ( admin) && ( stats[ admin.ID ].Level >= 5 ) )
{
MessagePlayer("Player : "+player.Name+" has reported "+plr.Name+" for : "+reason+"", admin);
}
I am gamer, programmer and hacker. Try to find me!
xD

Gito Baloch

Quote from: umar4911 on Apr 12, 2020, 04:11 PM
Quote from: Gitobaloch on Apr 12, 2020, 01:01 PMlocal admin = GetPlayer(stats[player.ID].Level < 3)
MessagePlayer("Player : "+player.Name+" has reported "+plr.Name+" for : "+reason+"", admin);

hey i did this still didn't worked.
untested
local admin;
for( local i = 0; i <= GetMaxPlayers(); i++ )
{
admin = FindPlayer( i );
if ( ( admin) && ( stats[ admin.ID ].Level >= 5 ) )
{
MessagePlayer("Player : "+player.Name+" has reported "+plr.Name+" for : "+reason+"", admin);
}
It was untested, but it worked. <3 thanks umar great personality. solved.
Programming is the language I speak, the world I shape, and the future I code