Help with total accounts plz
#1

Hello,

I am trying to make something but it fails everytime, so I am asking here:
I want to display the total accounts when someone registered, like "Player %s registered account %d!".
But I don't know how to do it . I am using an edit of LAdmin (It uses Dini for people that don't know it).
Please help me out, thanks!
Reply
#2

just create a varieable and do

varieble++;

when someone registers

and add that in the message
Reply
#3

i did but i failed so i post here for a compile variable code plz help and using the ladmin
Reply
#4

If you hold on just for one moment, i'll search for a Great Register Tutorial (helped me alot with dini).

EDIT:
This might also be very helpfull to you.
https://sampforum.blast.hk/showthread.php?tid=101560

Hope I helped.

Kind Regards,
Improvement™
Reply
#5

If you are using a filterscript

pawn Код:
new total_account; // at top of your script

public OnFilterScriptInit()
{
    new File:totalAccount=fopen("totalAccount.ini", io_write);
    if(!fexists(totalAccount)
    {
        fwrite(totalAccount, "total accounts = 0");
        fclose(totalAccount);
    }
    return 1;
}

public OnFilterScriptExit()
{
    new insert[50];
    new File:totalAccount=fopen("totalAccount.ini", io_write);
    format(insert, sizeof(insert), "total accounts = %d", total_account);
    fwrite(totalAccount, insert);
    fclose(totalAccount);
    printf("New amount of registered accounts: %d", total_account);
    return 1;
}
At the register command
pawn Код:
total_account++;
Reply
#6

thanks it help me
Reply
#7

Код:
C:\Users\Administrator\Desktop\team-wars remaking 29%\filterscripts\tbfadmin.pwn(303) : error 017: undefined symbol "fexists"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
ohhhh i solve this thanks
Reply
#8

Quote:
Originally Posted by Honest_Player
Посмотреть сообщение
Код:
C:\Users\Administrator\Desktop\team-wars remaking 29%\filterscripts\tbfadmin.pwn(303) : error 017: undefined symbol "fexists"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
ohhhh i solve this thanks
How did you fix that ??
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)