Taking job problem
#1

Hey guys, I have some problems with my jobs.

I explain: when i take a job, I'm always a farmer, and when i take the medic job, it doesn't do anything.

What's wrong ?

Here is the code of taking a job.


pawn Код:
if(strcmp(subcmd, "prendre", true) == 0)//positionprendre
        {
            if(PlayerInfo[playerid][pMember] != 0)
                {SendClientMessage(playerid, COLOR_FACTION, "Vous avez dйjа une faction"); return 1; }
            new precision = 5;
            if(PlayerToPoint(precision, playerid, 1183.4432,-1315.0598)) // medecin
                {job_setJob(playerid, JOB_MEDIC);}
            else if(PlayerToPoint(precision, playerid, -1061.3394,-1205.5339,129.7565)) // fermier
                {job_setJob(playerid, JOB_FARMER);}
            /*else if(PlayerToPoint(precision, playerid, 2326.5759,547.7589,7.7813)) // pecheur
                {job_setJob(playerid, JOB_FISHER);}*/

            else if(PlayerToPoint(precision, playerid, 2441.2822,-2133.9104,17.2712)) // camoinneur
                {job_setJob(playerid, JOB_TRUCKER);}
            else if(PlayerToPoint(precision, playerid, 2076.1377,-2013.1541,13.5469)) // eboueur
                {job_setJob(playerid, JOB_GARBAGE);}
            /*else if(PlayerToPoint(precision, playerid, 2783.0298,1914.5967,5.1683)) // mineur
                {job_setJob(playerid, JOB_MINER);}
            else if(PlayerToPoint(precision, playerid, -1518.1329,1169.3184,7.1875)) // mecano
                {job_setJob(playerid, JOB_MECANIC);}*/

            else if(PlayerToPoint(precision, playerid, 1772.6545,-1914.8551,13.5524)) // taxi
                {job_setJob(playerid, JOB_TAXI);}
            else if(PlayerToPoint(precision, playerid, 1025.7507,-1351.5011,13.7266)) // hotdog
                {job_setJob(playerid, JOB_HOTDOG);}
            else if(PlayerToPoint(precision, playerid, 1798.8490,-1789.2783,13.5549)) // mйcano
                {job_setJob(playerid, JOB_MECANIC);}
            /*else if(PlayerToPoint(precision, playerid, 1489.6671142578,-1895.1075439453,22.216812133789)) // cuisto
                {job_setJob(playerid, JOB_CUISTO);}
            else if(PlayerToPoint(precision, playerid, 1597.4645,1448.1750,10.8281)) // pilote
                {job_setJob(playerid, JOB_PILOT);}
            else if(PlayerToPoint(precision, playerid, -1431.4244,-1468.2551,101.6967)) // bucheron
                {job_setJob(playerid, JOB_WOOD);}
            else if(PlayerToPoint(precision, playerid, 2775.3965,1945.8955,10.9548)) // pyrotechnicien
                {job_setJob(playerid, JOB_PYRO);}*/

            else if(PlayerToPoint(precision, playerid, 2101.4900,-1812.6345,13.5547)) // Pizzaboy
                {job_setJob(playerid, JOB_PIZZA);}
            else if(PlayerToPoint(precision, playerid, 1590.1724,-1274.7303,17.5058)) // facteur
                {job_setJob(playerid, JOB_FACTOR);}
            return 1;
        }
Reply
#2

bump..
Reply
#3

bump
Reply
#4

Can you show us the "job_setJob" function, please.
Reply
#5

pawn Код:
public job_setJob(playerid, jobid)
{
    new string[MAX_STRING_MSG],jobNameNow[LITTLE_STRING],jobNameFut[LITTLE_STRING],name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));
    job_getname(jobid,jobNameFut);
    job_getname(PlayerInfo[playerid][pJob],jobNameNow);
    pay_tempArticle[playerid] = jobid;
    if(PlayerInfo[playerid][pJob] == 0) format(string, sizeof(string), "Vous souhaitez devenir %s. \nVoulez vous prendre le job ?",jobNameFut);
    else format(string, sizeof(string), "En ce moment vous travailler en tant que %s \nMais si vous le souhaitez vous pouvez devenir %s. \nVoulez vous prendre le job ?",jobNameNow,jobNameFut);
    ShowPlayerDialog(playerid,14,DIALOG_STYLE_MSGBOX,"Contrat",string,"Prendre","Refuser");
    format(proxy_msg,sizeof(proxy_msg),"%s prend le contrat et l'observe.",name);
    proxy_sendMsg(playerid,proxy_msg);
    return true;
}
Reply
#6

I can tell you 3 things.

1) The code is ugly
2) Everything looks like it should compile there
3) Your problem is elsewhere in the code
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)