SetPlayerCheckpointEx Problem
#1

Ok so my problem is I noticed it, None of the SetPlayerCheckpointEx functions are working... I'll take my arms dealer job for example. It says I have bought the materials but... The Checkpoint does not appear. What is causeing this checkpoint not to appear ?

Код:
stock SetPlayerCheckpointEx(playerid, Float:x, Float:y, Float:z, Float:range)
{
	if(iActiveCheckpoint[playerid] == 1)
	{
	    SendClientMessage(playerid, COLOR_GREY, "You already have a active checkpoint, you cannot do that at this time.");
	    return 0;
	}
	else
	{
	    SetPlayerCheckpointEx(playerid, x, y, z, range);
		iActiveCheckpoint[playerid] = 1;
		return 1;
	}
}

stock DisablePlayerCheckpointEx(playerid)
{
	iActiveCheckpoint[playerid] = 0;
	DisablePlayerCheckpoint(playerid);
}
Код:
if (dialogid == DBUYMATS2) // Mats Dealer - Route 2
    {
        if (response == 1) // OK
        {
            if(IsNull(inputtext))
            {
				ShowMatsMenu(playerid, 2);
                return 1;
			}
			else if(strval(inputtext) <= 0)
			{
			    ShowMatsMenu(playerid, 2);
                return 1;
			}
			else
			{
			    new price = strval(inputtext) * 125;
			    if(GetPlayerMoney(playerid) > price)
			    {
			        if(MatsRoute[playerid] == 0 || MatsRoute[playerid] == 2)
			        {
			        	if(MatsHolding[playerid] <= 20)
			        	{
			        	    if(iActiveCheckpoint[playerid] == 1 && MatsRoute[playerid] != 2)
							{
			    				SendClientMessage(playerid,COLOR_GREY, "You already have a active checkpoint, you cannot do this at this time.");
			   	 				return 1;
							}
			        		else
							{
							    if(strval(inputtext) + MatsHolding[playerid] <= 20)
							    {
							     
									format(string, sizeof(string), "* You bought %d Material Packages, for %s.", strval(inputtext), ConvertToMoney(price));
			    					SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
									ConsumingMoney[playerid] = 1;
     								GivePlayerMoney(playerid, -price);
      								PlayerInfo[playerid][pCash] -= price;
									MatsHolding[playerid] += strval(inputtext);
									MatsRoute[playerid] = 2;
									DisablePlayerCheckpointEx(playerid);
									SetPlayerCheckpointEx(playerid,2585.4438,-2215.6223,-0.2188,10.0);
								}
								else
								{
								    ShowMatsMenu(playerid, 2);
								}
							}
						}
					}
			    }
			}
        }
        else // CANCEL
        {

        }
		return 1;
    }
Reply
#2

Anyone ?
Reply
#3

I had the same problem, i just used SetPlayerCheckpoint and its working well
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)