OnplayerUpdate & OnPlayerEnterCheckPoint Loop - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: OnplayerUpdate & OnPlayerEnterCheckPoint Loop (
/showthread.php?tid=600699)
OnplayerUpdate & OnPlayerEnterCheckPoint Loop -
MoemenWalid - 11.02.2016
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.
Re: OnplayerUpdate & OnPlayerEnterCheckPoint Loop -
MoemenWalid - 12.02.2016
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
Re: OnplayerUpdate & OnPlayerEnterCheckPoint Loop -
MoemenWalid - 12.02.2016
Already Fixed alone, ty