#4

Here is a simple cmd to look your ip(with zcmd)
PHP код:
CMD:whatismyip(playerid,params[])
{
    new 
ip[16];
    new 
string[128];
    
format(string,sizeof(string),"{FF00FF}Your ip is: {00FF00}%s",GetPlayerIp(playerid,ip,sizeof(ip)));
    
SendClientMessage(playerid,-1,string);
    return 
1;

here is a cmd for rcon admins to check others ip(with zcmd and sscanf)
PHP код:
CMD:getip(playerid,params[])
{
    new 
playerip[16],msg[128],targetid;
    if(!
IsPlayerAdmin(playerid)) return 0//remove this and every one can use the command and see others ips'
    
if(sscanf(params,"u"targetid)) return SendClientMessage(playerid,0xFFFFFFF,"[SYNTAX ERROR]: Usage /getip [id]"); //Check for invaild params
    
if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid0xFFFFFFF,"That player is not connected to the server!"); //check if the target id is connected
    
format(msg,sizeof(msg),"{FF00FF}ID:%i's ip is:{00FF00} %s",targetid,GetPlayerIp(targetid,playerip,sizeof(playerip)));
    
SendClientMessage(playerid,-1,msg);
    return 
1;

Reply


Messages In This Thread
Help - by anassmaroc - 01.10.2015, 12:16
AW: Help - by Kaliber - 01.10.2015, 13:20
Re : Help - by anassmaroc - 01.10.2015, 13:42
Re: Help - by xTURBOx - 01.10.2015, 15:42

Forum Jump:


Users browsing this thread: 1 Guest(s)