Checkpoint help.
#1

Hey, I'm having problems with jobs. For example, farmer, when I use /milkcow it sets a checkpoint, and then its supposed to set another checkpoint but it doesnt =/ Need help if any1 can help me solve it, there are no errors or any warnings. Here's the code;

milkcow cmd:
PHP код:
CMD:milkcow(playeridparams[])
{
    if(
IsPlayerConnected(playerid))
    {
        if(
PlayerInfo[playerid][pJob] == 23 || PlayerInfo[playerid][pJob2] == 23)
        {
            if(
PlayerInfo[playerid][pMilkTime] == 0)
            {
                if(
IsMilkingCows[playerid] == 0)
                {
                    
SendClientMessage(playeridCOLOR_LIGHTBLUE"  *INFO: Milk all of the cows, then go to into the barn to finish.");
                    
SetPlayerCheckpoint(playerid, -400.5316,-1352.9856,24.40251.0);
                    
IsMilkingCows[playerid] = 1;
                    
PlayerInfo[playerid][pMilkTime] += 1800;
                }
                else
                {
                    
SendClientMessage(playeridCOLOR_GRAD2"  You are already milking the cows !");
                }
            }
            else
            {
                
SendClientMessage(playeridCOLOR_GRAD2" Wait until the cows are ready to be milked again!");
                return 
1;
            }
        }
        else
        {
            
SendClientMessage(playeridCOLOR_GRAD2"You are not a Farmer.");
            return 
1;
        }
    }
    return 
1;

and the other checkpoints, under onplayerentercheckpoint;
PHP код:
else if(IsMilkingCows[playerid] > 0)//farmerjob
    
{
        if(
IsMilkingCows[playerid] == 1)
        {
            
MilkTime[playerid] += 1;
            
TogglePlayerControllable(playerid0);
            
DisablePlayerCheckpoint(playerid);
            
SetPlayerCheckpoint(playerid, -415.4362,-1367.9500,23.7354,1.0);
            
IsMilkingCows[playerid] = 2;
        }
        else if(
IsMilkingCows[playerid] == 2)
        {
            
MilkTime[playerid] += 1;
            
TogglePlayerControllable(playerid0);
            
DisablePlayerCheckpoint(playerid);
            
SetPlayerCheckpoint(playerid, -429.1931,-1357.7994,24.1332,1.0);
            
IsMilkingCows[playerid] = 3;
        }
        else if(
IsMilkingCows[playerid] == 3)
        {
            
MilkTime[playerid] += 1;//1
            
TogglePlayerControllable(playerid0);
            
DisablePlayerCheckpoint(playerid);
            
SetPlayerCheckpoint(playerid, -419.0900,-1347.9215,24.7898,1.0);
            
IsMilkingCows[playerid] = 4;
        }
        else if(
IsMilkingCows[playerid] == 4)
        {
            
MilkTime[playerid] += 1;
            
TogglePlayerControllable(playerid0);
               
DisablePlayerCheckpoint(playerid);
               
SetPlayerCheckpoint(playerid, -404.1791,-1325.3143,26.9061,1.0);
               
IsMilkingCows[playerid] = 5;
        }
        else if(
IsMilkingCows[playerid] == 5)
        {
            
MilkTime[playerid] += 1;
            
TogglePlayerControllable(playerid0);
               
DisablePlayerCheckpoint(playerid);
               
SetPlayerCheckpoint(playerid, -426.7935,-1327.0194,28.7070,1.0);
               
IsMilkingCows[playerid] = 6;
        }
        else if(
IsMilkingCows[playerid] == 6)
        {
            
CowEndTime[playerid] += 1;
            
TogglePlayerControllable(playerid0);
               
DisablePlayerCheckpoint(playerid);
               
SetPlayerCheckpoint(playerid, -366.2761,-1428.3999,25.7266,3.0);
               
IsMilkingCows[playerid] = 7;
        }
        else if(
IsMilkingCows[playerid] == 7)
        {
               
DisablePlayerCheckpoint(playerid);
               
SendClientMessage(playeridCOLOR_LIGHTBLUE"   Well Done! Here's your Pay Check of $100");
               
IsMilkingCows[playerid] = 0;
               
GivePlayerMoney(playerid100);
        } 
thanks a lot for helpers
Reply


Messages In This Thread
Checkpoint help. - by HarryPotter - 06.12.2012, 20:59
Re: Checkpoint help. - by HarryPotter - 07.12.2012, 12:11
Re: Checkpoint help. - by HarryPotter - 12.12.2012, 17:58
Re: Checkpoint help. - by HarryPotter - 15.12.2012, 19:59

Forum Jump:


Users browsing this thread: 3 Guest(s)