SA-MP Forums Archive
Help with total accounts plz - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help with total accounts plz (/showthread.php?tid=280474)



Help with total accounts plz - Honest_Player - 01.09.2011

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!


Re: Help with total accounts plz - emokidx - 01.09.2011

just create a varieable and do

varieble++;

when someone registers

and add that in the message


Re: Help with total accounts plz - Honest_Player - 01.09.2011

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


Re: Help with total accounts plz - Improvement™ - 01.09.2011

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™



Re: Help with total accounts plz - Pinguinn - 01.09.2011

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++;



Re: Help with total accounts plz - Honest_Player - 02.09.2011

thanks it help me


Re: Help with total accounts plz - Honest_Player - 02.09.2011

Код:
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


Re: Help with total accounts plz - VIZ3N - 03.06.2013

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 ??