Jump to content
  • 0

Problema Job, ordine eronata


Question

Posted (edited)

Problema intalnita (descriere): De la checkpoint-ul indicat de job sa incarc dubita cu inghetata, odata ce intru in el, ma trimite spawnat in masina de la jobstate 3. dar cu toate astea, primesc scm-urile de la jobstate 1 si 2
Ero(area / rile) / warning-(ul / urile): -
Liniile de cod / sursa / script-ul(obligatoriu): mai jos
Imagini / Video (optional): -
Ati incercat sa rezolvati singur?: Curand, m-am gandit sa creez un job. n-a mers

El arata cam asa :

	if( IsPlayerInRangeOfPoint( playerid, 2.0, 1499.9053,-1340.3950,14.0259 ) && PlayerInfo[ playerid ][ pJob ] == 11 )
        {
            jobVehicle[ playerid ] = CreateVehicle( 423, 1506.6288,-1322.9169,14.0860,359.9291, -1, -1, -1 );
            Gas[ jobVehicle[ playerid ] ] = 100;
            PutPlayerInVehicle( playerid, jobVehicle[ playerid ], 0 );
            jobState[ playerid ] = 1;
            SetPlayerCheckpoint( playerid, 1513.0177,-1283.9572,14.5432, 5.0 );
            SendClientMessage( playerid, -1, "[JOB]: Incarca dubita cu inghetata!" );
            GameTextForPlayer(playerid, "~R~AI INCEPUT MUNCA!", 4000 ,3);
            return 1;
        }

Continuarea lui e asta

	if( PlayerInfo[ playerid ][ pJob ] == 11 )
        {
            if( jobState[ playerid ] == 1 )
            {
                DisablePlayerCheckpoint( playerid );
                SetPlayerCheckpoint( playerid, 1348.4906,-1718.9625,13.5879, 5.0 );
                jobState[ playerid ] = 2;
                SendClientMessage( playerid, -1, "[JOB]: Ai incarcat dubita, indreapta-te spre 24/7 !" );
                DestroyVehicle( jobVehicle[ playerid ] );
            }
            if( jobState[ playerid ] == 2 )
            {
                DisablePlayerCheckpoint( playerid );
                SetPlayerCheckpoint( playerid, 1352.0323,-1759.2511,13.5078, 5.0 );
                jobState[ playerid ] = 3;
                SendClientMessage( playerid, -1, "[JOB]: Ai ajuns in parcare, lasa inghetata la usa !" );
                DestroyVehicle( jobVehicle[ playerid ] );
            }
               if( jobState[ playerid ] == 3 )
            {
                DisablePlayerCheckpoint( playerid );
                SetPlayerCheckpoint( playerid, 1499.9053,-1340.3950,14.0259, 5.0 );
                jobState[ playerid ] = 4;
                jobVehicle[ playerid ] = CreateVehicle( 423, 1345.6102,-1748.7158,13.3703,354.2188, -1, -1, -1 );
                Gas[ jobVehicle[ playerid ] ] = 100;
                PutPlayerInVehicle( playerid, jobVehicle[ playerid ], 0 );
                SendClientMessage( playerid, -1, "[JOB]: Ai livrat inghetata, te poti intoarce la sediu !" );
            }
            else if( jobState[ playerid ] == 4 )
            {
                SendClientMessage( playerid, -1, "[JOB]: Ai ajuns la fabrica si ai castigat 1900$ !" );
                GivePlayerMoney( playerid, 1900 );
                jobState[ playerid ] = 0;
                DestroyVehicle( jobVehicle[ playerid ] );
                jobVehicle[ playerid ] = 0;
                DisablePlayerCheckpoint( playerid );
                OnAccountUpdate(playerid);
            }
            return 1;
        }
Edited by HENTAI

4 answers to this question

Recommended Posts

  • 0
  • Administrator
Posted

Ah am inteles. Aici

if( jobState[ playerid ] == 3 )

pune in loc de acel if pune else if.

Si aici la fel

if( jobState[ playerid ] == 2 )

pune in loc de acel if pune else if.

  • 0
  • Administrator
Posted

Salut,

Din cate am inteles eu nu te pune in masina buna, asa e?

Vezi daca

jobVehicle[ playerid ]

are ID-ul bun.

 

  • 0
Posted

Eu cred ca am gresit numerele si semnificatia functilor, jobstate nu inteleg daca este stagiul 1/2/3/4, etc, sau e daca lucrezi/nu lucrezi.

Nu este de la JobVehicle.

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.