14.02.2012, 16:18
i try to make command can show player ip if he was offline too but not work please help!
pawn Код:
if(strcmp(cmd, "/showip", true) == 0 && PlayerAdminLevel[playerid] >= 5) // Displays Some Player Info
{
if(IsAdminLogged[playerid] == 0){
SendClientMessage(playerid,COLOR_ERROR,"Please Login Into Your Mod/Admin Account! Use /adminlog");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, COLOR_ERROR, "USAGE: /showip (playername)");
return 1;
}
if(!udb_Exists(tmp)) {
SendClientMessage(playerid, COLOR_ERROR, "PlayerName is not in our database");
return 1;
}
if(udb_Exists(tmp)) {
new playerip[32];
new ipstring[128];
new playernamee[24];
GetPlayerIp(playerid,playerip,32)
GetPlayerName(playerid,playernamee,24)
format(ipstring,sizeof(ipstring),"Server %s %s(%d) Has Requested to show %s IP",playernamee,playerid,tmp);
SendAdminsMessage(0xFF7F50AA,ipstring);
ShowPlayerDialog(playerid,ipstr,DIALOG_STYLE_MSGBOX,tmp,playerip,"Close","");
}
return 1;
}