Checkpoint not being set with stock
#1

So, I'm making a farming job and when I call for the stock to create the random checkpoint list, it doesn't create the checkpoint.

Stock
Код:
stock SetRandomFarmCP(playerid)
{
    //DisablePlayerCheckpoint(playerid);
    new rand = random(sizeof(farmerpoints));
    SetPlayerCheckpoint(playerid, farmerpoints[rand][farmX], farmerpoints[rand][farmY], farmerpoints[rand][farmZ], 3.0);
    return 1;
}
Calling for the Stock
Код:
forward Farming(playerid);
public Farming(playerid)
{
        SetRandomFarmCP(playerid);
        return 1;
}
Calling for the "Farming" Timer
Код:
if(AllowedToFarm[playerid] == 1)
					    {
				        	RemovePlayerFromVehicle(playerid);
				        	SendClientMessage(playerid, COLOR_LIGHTRED, "You haven't waited an hour to farm again!");
						}
					    else if(AllowedToFarm[playerid] == 0)
					    {
				        	new info[60];
				        	VehicleInfo[vehicle][vFuel] = 100;
							format(info, sizeof(info), "Begin farming.");
							ftimer = SetTimerEx("Farming", FARM_TIME, true, "d", playerid);
							ftimer2 = SetTimerEx("MaxFarm", MAX_FARM_TIME, true, "d", playerid);
							IsFarming[playerid] = 1;
						}
Код:
enum fPointInfo {
    Float:farmX,
    Float:farmY,
    Float:farmZ
}

stock const farmerpoints[][fPointInfo] =
{
    { -9.9254,-0.5747,3.0810 },
    { 9.2272,-22.2132,3.0830 },
	{ 26.8793,-43.1984,3.0825 },
	{ 41.2933,-66.5472,0.8651 },
	{ 53.7843,-95.2497,0.5752 },
	{ 28.1653,-119.4987,0.5789 },
 	{ -47.1674,-108.0480,3.0824 },
  	{ -33.6738,-55.4203,3.0831 },
   	{ -13.4452,-7.0441,3.0830 },
    { 12.4783,-38.2256,3.0830 },
    { 44.7031,-86.6647,0.5752 },
    { 30.5185,-110.8441,0.5807 },
    { -8.3215,-108.1961,2.4989 },
    { -34.2954,-84.9247,3.0829 },
    { -20.4828,-44.0382,3.0830 },
    { 12.9664,-50.0767,3.0831 },
    { 38.6677,-85.2138,0.5760 },
    { 24.3441,-104.6968,0.5747 },
    { -26.6140,-97.4040,3.0825 },
    { 3.4666,-54.9636,3.0824 },
    { -7.2575,-102.0805,2.6920 },
    { -17.1906,-68.4005,3.0830 },
    { 14.3047,-73.0105,2.5313 }
};
Reply


Messages In This Thread
Checkpoint not being set with stock - by oSAINTo - 23.04.2017, 22:57
Re: Checkpoint not being set with stock - by oSAINTo - 24.04.2017, 03:04
Re: Checkpoint not being set with stock - by khRamin78 - 24.04.2017, 04:19

Forum Jump:


Users browsing this thread: 1 Guest(s)