Jump to content
  • 0

GEO IP , cum sa fac?


radyx

Question

Salut am o intrebare, am fs-ul Geo-IP de pe samp.com , este un fs ce anunta tot serverul cand se conecteaza un player, dand ip-ul tara ...

bun intrebarea mea este: Cum pot sa setez ca mesajul sa apara doar adminilor. (am modul Godfather)

asta este codul, deci cum pot sa il fac sa apara doar administratorilor?

  [pawn] public OnPlayerConnect(playerid)

    {

           

            new mess[256],IP[256];

            GetPlayerIp(playerid,IP,sizeof(IP));

            format(mess,sizeof(mess),"%s a intrat pe server  [  IP : %s | Ping: %i ]",GetPName(playerid),IP,GetPlayerPing(playerid));

            printf(mess);

            SendClientMessageToAll(COLOR_JOIN,mess);

            return 1;

    }

[/pawn]

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

[pawn]forward SendClientMessageToAdmin(color,const string[],level);[/pawn]

  [pawn] public OnPlayerConnect(playerid)

    {

           

            new mess[256],IP[256];

            GetPlayerIp(playerid,IP,sizeof(IP));

            format(mess,sizeof(mess),"%s a intrat pe server  [  IP : %s | Ping: %i ]",GetPName(playerid),IP,GetPlayerPing(playerid));

            printf(mess);

            SendClientMessageToAdmin(COLOR_JOIN,mess);

            return 1;

    }

[/pawn]

[pawn]public SendClientMessageToAdmin(color,const string[],level)

{

for(new i = 0; i < MAX_PLAYERS; i++)

{

if(IsPlayerConnected(i))

{

if (PlayerInfo[pAdmin] >= level)

{

SendClientMessage(i, color, string);

printf("%s", string);

}

}

}

return 1;

}[/pawn]

gXvsYS
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.