SA-MP Forums Archive
About fremove - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: About fremove (/showthread.php?tid=163832)



About fremove - Hamza' - 29.07.2010

pawn Код:
case 252:
            {
                switch( listitem )
                {
                    case 0:
                    {
                        PutPlayerInTutorial( playerid, 99 );
                        Player[playerid][RPTutStep] = 0;
                        Player[playerid][ServerTut] = 0;
                        Player[playerid][Authenticated] = 1;
                        SendClientMessage( playerid, GREY, "Good job with answers!");
                    }
                    case 1:
                    {
                        SendClientMessage( playerid, WHITE, "Wrong answer, now please re-log to re-read the tutorial, we need RP'ers here please. " );
                        Kick( playerid );

                    }
                    case 2:
                    {
                        SendClientMessage( playerid, WHITE, "Wrong answer, now please re-log to re-read the tutorial, we need RP'ers here please. " );
                        Kick( playerid );
                    }
                }
            }
Well, I just want to know how to use fremove incas of failing, (case 1 and case 2)
I can't simply use
Код:
fremove(Accounts/%s.ini)
But If I use
pawn Код:
case 252:
            {
                switch( listitem )
                {
                    case 0:
                    {
                        PutPlayerInTutorial( playerid, 99 );
                        Player[playerid][RPTutStep] = 0;
                        Player[playerid][ServerTut] = 0;
                        Player[playerid][Authenticated] = 1;
                        SendClientMessage( playerid, GREY, "Good job with answers!");
                    }
                    case 1:
                    {
                        SendClientMessage( playerid, WHITE, "Wrong answer, now please re-log to re-read the tutorial, we need RP'ers here please. " );
                        Kick( playerid );
                        new name[MAX_PLAYER_NAME], string[44];
                        GetPlayerName(playerid, name, sizeof(name));
                        format(string, sizeof(string), "Accounts/%s.ini", name);
                        fremove(string);

                    }
                    case 2:
                    {
                        SendClientMessage( playerid, WHITE, "Wrong answer, now please re-log to re-read the tutorial, we need RP'ers here please. " );
                        Kick( playerid );
                        new name[MAX_PLAYER_NAME], string[44];
                        GetPlayerName(playerid, name, sizeof(name));
                        format(string, sizeof(string), "Accounts/%s.ini", name);
                        fremove(string);
                    }
                }
            }
it won't work.. HELP here, thanks.


Re: About fremove - Hamza' - 29.07.2010

HELP!!!!!!!
Come on guys, just post reply here, with a correct script. PLZ


Re: About fremove - Carlton - 29.07.2010

Hi, it won't work because you're kicking the player before trying to get their name. The code should be like this:

pawn Код:
case 252:
{
                switch( listitem )
                {
                    case 0:
                    {
                        PutPlayerInTutorial( playerid, 99 );
                        Player[playerid][RPTutStep] = 0;
                        Player[playerid][ServerTut] = 0;
                        Player[playerid][Authenticated] = 1;
                        SendClientMessage( playerid, GREY, "Good job with answers!");
                    }
                    case 1:
                    {
                        SendClientMessage( playerid, WHITE, "Wrong answer, now please re-log to re-read the tutorial, we need RP'ers here please. " );
                        new name[MAX_PLAYER_NAME], string[44];
                        GetPlayerName(playerid, name, sizeof(name));
                        format(string, sizeof(string), "Accounts/%s.ini", name);
                        fremove(string);
                        Kick( playerid );
                    }
                    case 2:
                    {
                        SendClientMessage( playerid, WHITE, "Wrong answer, now please re-log to re-read the tutorial, we need RP'ers here please. " );
                        new name[MAX_PLAYER_NAME], string[44];
                        GetPlayerName(playerid, name, sizeof(name));
                        format(string, sizeof(string), "Accounts/%s.ini", name);
                        fremove(string);
                        Kick( playerid );
                    }
                }
}