Help with Offline Players!
#1

hey all i was need to create dialog that show for me all registred players in server so i can sometime ban and unban offline profile from inside game please how i can do it ? help
Reply
#2

Bad idea, the dialog could end up having thousands (not even sure a dialog could hold that much data i doubt it) of registered players. Also getting the names of all those players would lagg the server for sure. Your better off using an input dialog and enter the players name yourself.
Reply
#3

okay i will do this but how i can make to enter the full name not only the first words from name please help and how i can make the unban and ban by name it would be very nice for help Brother!
Reply
#4

What system are you using currently to store player information?
Reply
#5

I'd suggest you to make something like pages within the dialog. That may be tough tho.
Reply
#6

im using dudb system please do something!
Reply
#7

All I can do is suggest you to use mysql and OnDialogResponse.
Reply
#8

no need for dialog but i need to make /unban and /ban command by name and even if player was offline


This one is by ID i want one by filename

pawn Код:
if(strcmp(cmd, "/ban", true) == 0 && PlayerAdminLevel[playerid] >= 3) // Admin Ban
    {
    if(IsAdminOrRecon[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: /ban (id)");
    return 1;
    }
    giveplayerid = strval(tmp);

    if(!IsNumeric(tmp)) {
    SendClientMessage(playerid, COLOR_ERROR, "USAGE: /ban (id) ID Must be a number");
    return 1;
    }
    if(playerid == giveplayerid){
    SendClientMessage(playerid,COLOR_ERROR,"You cant ban yourself");
    return 1;
    }
    if(PlayerAdminLevel[playerid] < PlayerAdminLevel[giveplayerid]){
    SendClientMessage(playerid,COLOR_ERROR,"You cant ban a high ranked admin");
    return 1;
    }
    new output[255];
    strmid(output,cmdtext,6,strlen(cmdtext));
    if (IsPlayerConnected(giveplayerid)) {
    SetPlayerInterior(giveplayerid,0);
    SetPlayerPos(giveplayerid,-127.0526,2258.4316,29.4287);
    SetPlayerFacingAngle(giveplayerid,217.0701);
    SetCameraBehindPlayer(giveplayerid);
    SetTimer("BanExplosionone",500,0);
    AdminKilled[giveplayerid] =1;
    new useonname[24];
    GetPlayerName(giveplayerid, useonname, 24);
    format(string, 100, "**(ADMIN BAN)** %s(%d) %s", useonname,giveplayerid,output);
    SendClientMessageToAll(COLOR_RED, string);
    format(string,sizeof(string), "You Have Banned %s(%d) For Reason: %s",useonname,giveplayerid,output);
    SendClientMessage(playerid,COLOR_GREEN,string);
    format(string,sizeof(string), "Server %s Has Banned You For Reason: %s",AdminRanks[PlayerAdminLevel[playerid]],output);
    SendClientMessage(giveplayerid,COLOR_RED,string);
    new oname[24];
    GetPlayerName(playerid,oname,24);
    new s[256];
    format(s,sizeof(s),"Server %s %s(%d) Has Banned %s(%d) For Reason: %s",AdminRanks[PlayerAdminLevel[playerid]],oname,playerid,useonname,giveplayerid, output);
    printf("%s", s);
    SendAdminsMessage(0xFF7F50AA,s);
    if(udb_Exists(PlayerName(giveplayerid)) && PLAYERLIST_authed[giveplayerid]) {
    dUserSetINT(PlayerName(giveplayerid)).("nameban",1);
    }
    SendClientMessage(giveplayerid,COLOR_RED,"||| YOU HAVE BEEN BANNED FROM THIS SERVER");
    SendClientMessage(giveplayerid,COLOR_RED,"||| You can appeal this action at our website");
    SendClientMessage(giveplayerid,COLOR_RED,"||| Visit http://www.midnightcnr.forumtl.com for details");
    SendClientMessage(giveplayerid,COLOR_RED,"||| Please note that we do not unban hackers/cheaters or repeat offenders");
    Banning[giveplayerid] = 1;

    }
    else {
    format(string, sizeof(string), "ID (%d) Is not an active player", giveplayerid);
    SendClientMessage(playerid, COLOR_ERROR, string);
    }
    return 1;
    }
Reply
#9

Dudb isn't a saving/storing system.
You are probably using Dini.
Reply
#10

i want unban by name how ??
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)