[Help] How can i make this thing?
#1

i made an enum called AccountActivated and it has been set 0 when you register
and i want to make that admin can only activate his account with command even if the player is not connected
to the server so if like admin types /activateaccount Jack_Black, then it will change the enum AccountActivated to 1
on his Jack_black.ini or .cfg file, how can i make like this, im really stuck here please help me.
Reply
#2

bump anyone `? i need help
Reply
#3

what do you use Dini/Y_ini.. .?
Reply
#4

i use dini, and my accounts folder is located: cServer/kasutajad/%.ini
Reply
#5

pawn Код:
CMD:activateaccount(playerid, params[])
{
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,red,"You need to be admin to use these command");//These is just for rcon admin so you edit it to your system
    if(sscanf(params, "s", params)) return SendClientMessage(playerid,red,"You need to enter user nick");

    new file[128];
    format(file,sizeof(file),"cServer/kasutajad/%.ini",params); // edit  .ini to your extansion
   
    if(!dini_Exists(file)) return SendClientMessage(playerid,red,"That user does not exist");
    dini_IntSet(file,"AccountActivated", 1);//I guess these is right you dont need to edit it
    return 1;
}
I used zcmd+sscanf but you can edit it to whatever you want cos you know how is it works now
And i must note that these is just if player is not connected !
Reply
#6

Thank you very very much DRIFT_HUNTER,
Reply
#7

Quote:
Originally Posted by andruz99
Посмотреть сообщение
Thank you very very much DRIFT_HUNTER,
Well first try it and see is it working and then say thx xD
And no problem just optimize it so its working when player is connected
Reply
#8

Its works
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)