KEY_YES
#1

PHP код:
if ((newkeys==KEY_YES))
    {    
        if(
IsWorking[playerid] == && PlayerData[playerid][Job] == 3) {
            new 
car GetClosestVehicle(playerid);
            if(!
IsPlayerNearVehicle(playeridcar10) && !IsABoat(car)) return 1;                        
            if(
VJob[playerid] != car) return SCM(playeridCOLOR_WHITE""COLOR_JOB_EMBED"(Job)"COLOR_WHITE_EMBED" You are not near the garbage truck.");
            if(
IsPlayerInAnyVehicle(playerid)) return SCM(playeridCOLOR_WHITE""COLOR_JOB_EMBED"(Job)"COLOR_WHITE_EMBED" You can`t pick up the rubbish if you are in the car.");
            if(!
PlayerToPoint(15.0playeridGunoiSet[playerid][0], GunoiSet[playerid][1], GunoiSet[playerid][2])) return SCM(playeridCOLOR_WHITE""COLOR_JOB_EMBED"(Job)"COLOR_WHITE_EMBED" You are not near the garbage bin");
            
TickGarbage[playerid] = gettime();
            if(
IsCarrying[playerid] == 0)
            {
                
DisablePlayerCheckpoint(playerid);
                
SetPlayerSpecialAction(playeridSPECIAL_ACTION_CARRY);
                
SetPlayerAttachedObject(playerid6122010.2998220.663485, -0.036337184.31135590.0040890.0000001.0000001.0000001.000000 );
                
IsCarrying[playerid] = 1;
                
SCM(playeridCOLOR_WHITE""COLOR_JOB_EMBED"(Job)"COLOR_WHITE_EMBED" Throw the rubbish into the back of the garbage truck");
            }
            if(
IsCarrying[playerid] == 1)
            {
                if(
gettime() - TickGarbage[playerid] <3) return 0;     
                
IsCarrying[playerid] = 0;
                
SetPlayerSpecialAction(playerid0);
                
RemovePlayerAttachedObject(playerid6);
                new 
randn random(sizeof(GarbageCP));
                
SetPlayerCheckpoint(playeridGarbageCP[randn][0], GarbageCP[randn][1], GarbageCP[randn][2], 4.0);
                
SetCoordGunoi(playeridGarbageCP[randn][0], GarbageCP[randn][1], GarbageCP[randn][2]);
                
SCM(playeridCOLOR_WHITE"Go to next CP");
                new 
Float:coord[3];
                
GetPlayerPos(playeridcoord[0], coord[1], coord[2]);
                
SetDestination(playeridcoord[0], coord[1], coord[2]);
                
PGarbageCP[playerid] += 1;
                
UpdateJobBox(playerid);
            }
            
            
        }
    } 
the problem is,the first time you press Y,it works( you get the bag in your hand and animation ),but when you try to press Y again ( to throw garbage in truck and remove animations,it simply doesn`t work )

i debugged all the coordinates and i am where i should be..
Reply


Messages In This Thread
KEY_YES - by PepsiCola23 - 02.03.2018, 12:12
Re: KEY_YES - by Sew_Sumi - 02.03.2018, 12:49
Re: KEY_YES - by PepsiCola23 - 02.03.2018, 12:57
Re: KEY_YES - by Sew_Sumi - 02.03.2018, 13:01

Forum Jump:


Users browsing this thread: 1 Guest(s)