SA-MP Forums Archive
auto work not working - 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: auto work not working (/showthread.php?tid=440926)



auto work not working - Geeboi_Mehdi - 31.05.2013

i been asking my friends still cant seem to find a solution to this auto work gives you a new mission with out /work when its enabled it don't work
pawn Код:
if(dialogid == settings8)
    {
        if(response)
        {
            new msg[128];
            format(msg,sizeof(msg),"You have updated your auto work settings.");
            PlayerPlaySound(playerid, 1138, 0, 0, 0);
            switch(listitem)
            {
                case 0: //Enable
                {
                    PInfo[playerid][sAutoWork] = 1;
                    SendClientMessage(playerid, COLOR_IRC, msg);
                    ShowPlayerSettings(playerid);
                    return 1;
                }
                case 1: //Disable
                {
                    PInfo[playerid][sAutoWork] = 0;
                    SendClientMessage(playerid, COLOR_IRC, msg);
                    ShowPlayerSettings(playerid);
                    return 1;
                }
            }
        }
    }



Re: auto work not working - RalphHaro - 31.05.2013

What errors you do get? Please post the errors.


Re: auto work not working - A7X_CEEJAY - 31.05.2013

Dependsd how your "work" is.

If it done via checkpoints, on your last checkpoint you can do something among the lines of

pawn Код:
if(PInfo[playerid][sAutoWork] == 1)
{
Restart first checkpoint
}
else [if(PInfo[playerid][sAutoWork] == 0)
{
End checkpoints and finish work
}

P.S the text in [] is optional.


Re: auto work not working - Coz - 13.07.2013

Quote:
Originally Posted by Geeboi_Mehdi
Посмотреть сообщение
i been asking my friends still cant seem to find a solution to this auto work gives you a new mission with out /work when its enabled it don't work
pawn Код:
if(dialogid == settings8)
    {
        if(response)
        {
            new msg[128];
            format(msg,sizeof(msg),"You have updated your auto work settings.");
            PlayerPlaySound(playerid, 1138, 0, 0, 0);
            switch(listitem)
            {
                case 0: //Enable
                {
                    PInfo[playerid][sAutoWork] = 1;
                    SendClientMessage(playerid, COLOR_IRC, msg);
                    ShowPlayerSettings(playerid);
                    return 1;
                }
                case 1: //Disable
                {
                    PInfo[playerid][sAutoWork] = 0;
                    SendClientMessage(playerid, COLOR_IRC, msg);
                    ShowPlayerSettings(playerid);
                    return 1;
                }
            }
        }
    }
I'm having the same issue in my server, the autowork doesn't actually work. I'm using the same code as above, and I haven't been able to figure it out. Anybody have any solutions??