OnplayerUpdate & OnPlayerEnterCheckPoint Loop
#1

Okay so basically I've changed the houses but it doesn't work .


OnPlayerUpdate
v
V
Код:
	if ((id = House_Nearestz(playerid)) != -1)
	{
 		new
			Float:fX,
			Float:fY,
			Float:fZ;

		fX = HouseData[id][housePos][0];
		fY = HouseData[id][housePos][1];
		fZ = HouseData[id][housePos][2];
		SetPlayerCheckpoint(playerid, fX, fY, fZ, 3);
		hcp[playerid] = id;
	}
	else if(hcp[playerid] > -1 && PlayerData[playerid][pUnloading] != 1 && !PlayerData[playerid][pDrivingTest] && !PlayerData[playerid][pWaypoint] && !IsPlayerInAnyVehicle(playerid) && !PlayerData[playerid][pTask] && PlayerData[playerid][pSorting] != 1)
	{
	    hcp[playerid] = -1;
	    DisablePlayerCheckpoint(playerid);
	}
And that works fine but I think it makes a loop :/


Thats the onplayerentercheckpoint

Код:
	if ((id = House_Nearestz(playerid)) != -1)
	{
		//static string[128];

		if (!HouseData[id][houseOwner]) {
			return SendServerMessage(playerid, "This house is for sale for [%s] at %s", FormatNumber(HouseData[id][housePrice]), HouseData[id][houseAddress]);
            
		}
		else {
			return SendServerMessage(playerid, "You are now standing on % pouch.", HouseData[id][houseOwner]);
		}
	}
When I stand on the checkpoint its like a loop , 10 messages in the sec lol.
Reply
#2

Okay so I want it like if somone gets near a house a checkpoint appear and once he enter he get a msg and when he leave the checkpoint disables but what happens is it spams msges
Reply
#3

Already Fixed alone, ty
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)