Return variables
#1

I want to creating Lumberjack system with tree growing when cutted, but in CMd i can't set return for tree cutted.

Ex : 30 tree is cutted and growing, they return when using CMD. In my CMD now can't do that. I don't know why, if (i) = another number without cutted tree number, they send return message but still got marker. I want to return message only for total max tree cutted (30) can display this return message. Anyone can help me !


PHP код:
CMD:lcut(playeridparams[])
{
      if(
PlayerInfo[playerid][pJob] == || PlayerInfo[playerid][pJob2] == 5)
    {
       new 
vehicleid GetPlayerVehicleID(playerid);
         if(
IsALumberJackCar(vehicleid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
          {
              for(new 
130i++)
            {
                if(
TreeCutted[i] == 0)
                {
                    new 
Float:xFloat:yFloat:z;
                    
GetDynamicObjectPos(Tree[i], xyz);
                    
SetPlayerCheckpoint(playeridxyz3);
                    
gPlayerCheckpointStatus[playerid] = CHECKPOINT_LUMBERJACK;
                    
SetPVarInt(playerid"TreeID"i);
                    
Lumberjackcar[playerid] = vehicleid;
                    
GameTextForPlayer(playerid"~w~Just go on ~r~marker~w~ ."60005);
                }
                else return 
SendClientMessageEx(playeridCOLOR_GREY"Tree is growing!");
            }
        }
    }
    return 
1;

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)