Checkpoint problum
#1

Код:
if(strcmp(cmd,"/startpizza",true)==0)
    {
		if(PlayerInfo[playerid][pJob] == 18)
		{
			SetPlayerCheckpoint(playerid, 2114.3188,-1774.2660,13.3923, 3.0);
			CP[playerid] = 1700;
			PlayerInfo[playerid][pPRoute] = 1;
            SendClientMessage(playerid, COLOR_WHITE,"Pizza-Bike Radio : Please Go to the Check-Point to start your Route");
        }
        else
		{
		SendClientMessage(playerid, COLOR_WHITE,"You are not a Pizza-Boy");
		}
		return 1;
	}
Код:
if(CP[playerid] == 1700)
	{
		if(GetPlayerVehicleID(playerid) >= PizzaBike[0] && GetPlayerVehicleID(playerid) <= PizzaBike[4])
		{
			DisablePlayerCheckpoint(playerid);
			SendClientMessage(playerid, COLOR_WHITE,"< Pizza-Bike Radio : Once you reach the Check-Point - Park beside it and Deliver the Pizza");
			PlayerInfo[playerid][pPRoute] = 1;
			SetPlayerCheckpoint(playerid, 2281.6194,-1645.9147,15.2300, 3.0);
			CP[playerid] = 1701;
			return 1;
		}
		else
		{
		SendClientMessage(playerid, COLOR_WHITE,"You are not in a Pizza-Bike");
		}
	}
	if(CP[playerid] == 1701)
	{
		new getstate = GetPlayerState(playerid);
		if(getstate == PLAYER_STATE_ONFOOT)
		{
			DisablePlayerCheckpoint(playerid);
			SendClientMessage(playerid, COLOR_WHITE,"You have Delivered your Pizza - Please Head to the next Checkpoint");
			return 1;
		}
	}
	if(CP[playerid] == 1703)
	{
	    new playerstate = GetPlayerState(playerid);
	    if (playerstate == PLAYER_STATE_DRIVER)
	    {
	        DisablePlayerCheckpoint(playerid);
			SendClientMessage(playerid, COLOR_WHITE,"Pizza-Bike Radio : You have Reached your HQ - Please park your Bike and take your Paycheck [1000$]");
			PlayerInfo[playerid][pPizza] = 0;
			PlayerInfo[playerid][pPRoute] = 0;
			PlayerInfo[playerid][pCash] += 1000;
			RemovePlayerAttachedObject(playerid, 0);
			return 1;
		}
		else
		{
		SendClientMessage(playerid, COLOR_WHITE,"Get In your Pizza-Bike");
		}
	}
Код:
if(newstate == PLAYER_STATE_DRIVER)
	{
     if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 448)
		{
			if(PlayerInfo[playerid][pPRoute] == 1)
			{
			    //SendClientMessage(playerid, COLOR_WHITE,"< Pizza-Bike Radio : Take the Bike to the Next House to Deliver their Pizza >");
      			PlayerInfo[playerid][pPizza] ++;
				switch(PlayerInfo[playerid][pPizza])
				    {
				    case 1:
						{
                            SetPlayerCheckpoint(playerid,2384.8545,-1346.4927,24.3511, 3.0);
							SendClientMessage(playerid, COLOR_WHITE,"< Pizza-Bike Radio : Take the Bike to the Next House to Deliver their Pizza >");
						}
					case 2:
					    {
							SetPlayerCheckpoint(playerid,2230.8303,-1285.8970,25.3672, 3.0);
							SendClientMessage(playerid, COLOR_WHITE,"< Pizza-Bike Radio : Take the Bike to the Next House to Deliver Their Pizza >");
						}
					case 3:
					    {
					        SetPlayerCheckpoint(playerid,2086.1628,-1185.8599,25.5327, 3.0);
							SendClientMessage(playerid, COLOR_WHITE,"< Pizza-Bike Radio : Take the Bike to the Next House to Deliver Their Pizza >");
						}
					case 4:
					    {
					        SetPlayerCheckpoint(playerid,1246.5656,-1101.0764,26.6719, 3.0);
							SendClientMessage(playerid, COLOR_WHITE,"< Pizza-Bike Radio : Take the Bike to the Next House to Deliver Their Pizza >");
						}
					case 5:
					    {
					        SetPlayerCheckpoint(playerid,961.8271,-1825.1824,13.3194, 3.0);
					        SendClientMessage(playerid, COLOR_WHITE,"< Pizza-Bike Radio : Take the Bike to the Next House to Deliver Their Pizza >");
					    }
					case 6:
					    {
					        SetPlayerCheckpoint(playerid,2695.2781,-2018.0885,13.5292, 3.0);
							SendClientMessage(playerid, COLOR_WHITE,"< Pizza-Bike Radio : Take the Bike to the Next House to Deliver Their Pizza >");
						}
					case 7:
					    {
					        SetPlayerCheckpoint(playerid,2114.3188,-1774.2660,13.3923, 3.0);
					        SendClientMessage(playerid, COLOR_WHITE,"< Pizza-Bike Radio : Take the Pizza-Bike Back to the HQ and Park it to Take your Paycheck >");
							CP[playerid] = 1703;
						}
					}
				}
			}
		}]
problum is all checkpoint show at their location if i exit from pizza vehicle at any location far from checkpoint its checkpoint reached automaticaly and next checkpoint come and again i exit from vehicle its same all that job checkpoint ..
Reply
#2

any one help..Plz
Reply
#3

I don't get you. If you one time reach an check point then it will spam like you reach all?
Reply
#4

Thanks bro, i solved it! i make all checkpoint under cp([player] ==1700 (one bye one) ..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)