new Tmp3[50];
GetPlayerIp(playerid,Tmp3,50);
if(strlen(dini_Get("Aka.txt", Tmp3)) == 0)
dini_Set("Aka.txt", Tmp3, PlayerInfo[playerid][pName]);
else
{
if(strfind( dini_Get("Aka.txt", Tmp3), PlayerInfo[playerid][pName], true) == -1 )
{
format(string,sizeof(string),"%s, %s", dini_Get("Aka.txt",Tmp3), PlayerInfo[playerid][pName]);
dini_Set("Aka.txt", Tmp3, string);
}
}
COMMAND:aka(playerid,params[])
{
if(PlayerInfo[playerid][pSpawned] == 1)
{
if(PlayerInfo[playerid][pAdminlevel] > SERVER_MODERATOR)
{
new TargetID;
new string[256], pIP[50];
if(sscanf(params,"u",TargetID))
{
SendClientMessage(playerid,COLOR_ERROR,"Usage: /aka (Name/ID)");
return 1;
}
if(!IsPlayerConnected(TargetID) || TargetID == INVALID_PLAYER_ID)
{
SendClientMessage(playerid, COLOR_ERROR, "That Player Is Not Connected.");
return 1;
}
if(IsPlayerNPC(TargetID))
{
SendClientMessage(playerid,COLOR_ERROR,"You Cannot Check Aka For a BOT.");
return 1;
}
if(PlayerInfo[playerid][pAdminlevel] < PlayerInfo[TargetID][pAdminlevel])
{
SendClientMessage(playerid,COLOR_ERROR,"You Cannot Check The Aka Of Higher Admins.");
return 1;
}
GetPlayerIp(TargetID,pIP,50);
HideTextDrawMenu(playerid);
ShowTextDrawMenu(playerid, TD_MENU_INFO,"~b~Player's Aka", 7, 0);
format(string, sizeof(string), "~g~%s (%d)'s Aka~n~~n~~b~IP: ~p~%s~n~~b~Names:~n~~p~%s",PlayerInfo[TargetID][pName],TargetID, pIP, dini_Get("Aka.txt",pIP));
ShowTextDrawMenuItems(playerid, 0, string, " ", " ",0);
}else{
SendClientMessage(playerid,COLOR_ERROR,""ERROR_MSG"");
}
}else{
SendClientMessage(playerid,COLOR_ERROR,"You Cannot Use This Command While You're Dead.");
}
return 1;
}
|
Nobody has any ideas that could help? Been trying to get this working properly for days
|