CMD:aka(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] >= 3) { if(isnull(params)) return SendClientMessage(playerid, red, "USAGE: /aka [playerid]"); new player1 = strval(params), str[128], tmp3[50]; if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID) { GetPlayerIp(player1, tmp3, 50); format(str, sizeof(str), "A.K.A: [%s id:%d] [%s] %s", pName(player1), player1, tmp3, dini_Get("ladmin/pAdmin/aka.txt", tmp3)); return SendClientMessage(playerid, COLOR_WHITE, str); } else return SendClientMessage(playerid, red, "Player is not connected or is yourself"); } else return SendClientMessage(playerid, red, "ERROR: You need to be level 3 to use this command"); }
CMD:offlineaka(playerid, params[]) {
if(PlayerInfo[playerid][pAdmin] >= 3) {
if(isnull(params)) return SendClientMessage(playerid, red, "USAGE: /offlineaka [ip]");
new str[128];
format(str, sizeof(str), "Offline A.K.A: [ %s ] %s", params, dini_Get("ladmin/pAdmin/aka.txt", params));
SendClientMessage(playerid, COLOR_WHITE, str);
}
else
{
SendClientMessage(playerid, red, "ERROR: You need to be level 3 to use this command");
}
return 1;
}
thank you it worked
![]() edit: what about change it to /offlineaka [username] ?? ![]() |
CMD:offlineaka(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] >= 3) { new name[32]; new player1 = strval(params), str[128], tmp3[50]; if(sscanf(params, "s", name)) return SendClientMessage(playerid, red, "USAGE: /offlineaka [username]"); new playerFile[100]; format(playerFile,256,"/ladmin/users/%s.ini",udb_encode(name)); if(fexist(playerFile)) { GetPlayerIp(player1, tmp3, 50); format(str, sizeof(str), "Name: %s\nAKA: [ %s ] %s", pName(player1), tmp3, dini_Get("ladmin/pAdmin/aka.txt", tmp3)); return ShowPlayerDialog(playerid,1907,DIALOG_STYLE_MSGBOX, "{FF0000}Offline A.K.A", str, "Ok", ""); } else return SendClientMessage(playerid, red, "That player doesn't exist!"); } else return SendClientMessage(playerid, red, "ERROR: You are not a high enough level to use this command"); }
CMD:offlineaka(playerid, params[]) {
if(PlayerInfo[playerid][pAdmin] >= 3) {
new name[32], str[128];
if(sscanf(params, "s", name)) return SendClientMessage(playerid, red, "USAGE: /offlineaka [username]");
new playerFile[100];
format(playerFile,256,"/ladmin/users/%s.ini",udb_encode(name));
if(fexist(playerFile))
{
format(str, sizeof(str), "Name: %s\nAKA: %s", name, dini_Get("ladmin/pAdmin/aka.txt", dini_Get(playerFile, "ip")));
return ShowPlayerDialog(playerid,1907,DIALOG_STYLE_MSGBOX, "{FF0000}Offline A.K.A", str, "Ok", "");
} else return SendClientMessage(playerid, red, "That player doesn't exist!");
} else return SendClientMessage(playerid, red, "ERROR: You are not a high enough level to use this command");
}