Dynamic Checkpoint bug -
NealPeteros - 17.05.2017
Whenever I'm near a house, it shows me a checkpoint
PHP код:
for(new h = 1; h < sizeof(HouseInfo); h++)
{
if(IsPlayerInRangeOfPoint(playerid, 2.5, HouseInfo[h][hEntranceX], HouseInfo[h][hEntranceY], HouseInfo[h][hEntranceZ]))
{
HouseCPP[playerid] = CreateDynamicCP(HouseInfo[h][hEntranceX], HouseInfo[h][hEntranceY], HouseInfo[h][hEntranceZ], 1.5, -1, -1, playerid, 5.0);
}
}
Whenever I delete them, the checkpoint still shows up
Re: Dynamic Checkpoint bug -
Kane - 17.05.2017
Delete them how? What do you do when it shows up?
Re: Dynamic Checkpoint bug -
NealPeteros - 17.05.2017
Quote:
Originally Posted by Arthur Kane
Delete them how? What do you do when it shows up?
|
Delete the house rather. What do you mean?
Re: Dynamic Checkpoint bug -
Kane - 17.05.2017
I meant like, after you delete it, does it show up when you're at the old x, y, z?
What do you use to delete it?
Re: Dynamic Checkpoint bug -
NealPeteros - 17.05.2017
PHP код:
CMD:deletehouse(playerid, params[])
{
for(new h = 1; h < sizeof(HouseInfo); h++)
{
if(IsPlayerInRangeOfPoint(playerid, 2.0, HouseInfo[h][hEntranceX], HouseInfo[h][hEntranceY], HouseInfo[h][hEntranceZ]))
{
if(GetPlayerVirtualWorld(playerid) == HouseInfo[h][hWorld])
{
if(PlayerInfo[playerid][pAdmin] < 3) return SCM(playerid, COLOR_GREY,"You're not authorized to use this command.");
if(HouseInfo[h][hOwned] == 1) return SCM(playerid, COLOR_LIGHTRED, "This house is owned.");
HouseInfo[h][hOwned] = 0;
HouseInfo[h][hPrice] = 0;
HouseInfo[h][hOwner] = 0;
HouseInfo[h][hLocked] = 0;
HouseInfo[h][hMoney] = 0;
HouseInfo[h][hEntranceX] = 0;
HouseInfo[h][hEntranceY] = 0;
HouseInfo[h][hEntranceZ] = 0;
HouseInfo[h][hEntranceA] = 0;
HouseInfo[h][hExitX] = 0;
HouseInfo[h][hExitY] = 0;
HouseInfo[h][hExitZ] = 0;
HouseInfo[h][hExitA] = 0;
HouseInfo[h][hInt] = 0;
HouseInfo[h][hWorld] = 0;
Delete3DTextLabel(HouseInfo[h][hDLabel]);
DestroyDynamicPickup(HouseInfo[h][hOutsideIcon]);
new string[64];
format(string, sizeof(string), HPATH, h);
fremove(string);
}
}
}
return 1;
}
And yes, it does. Forgot to show this image:
Re: Dynamic Checkpoint bug -
Kane - 17.05.2017
Does it fix when the servers restarted?
Re: Dynamic Checkpoint bug -
NealPeteros - 17.05.2017
Quote:
Originally Posted by Arthur Kane
Does it fix when the servers restarted?
|
Trying it right now.
Re: Dynamic Checkpoint bug -
NealPeteros - 17.05.2017
Quote:
Originally Posted by Arthur Kane
Does it fix when the servers restarted?
|
Yes it did. I think it has something to do with the saving of houses. I'll try to find a fix, thanks for your help!
Edit: I previously gave you a reputation, can't give again, but I'll find a way to remember this.
Re: Dynamic Checkpoint bug -
Kane - 17.05.2017
Was that the only house in the server?
If it is, it might be because you forgot to start it off as 1 and the house ID was 0?
Код:
for(new h = 1; h < sizeof(HouseInfo); h++)
Re: Dynamic Checkpoint bug -
NealPeteros - 17.05.2017
Oh it wasn't. I had at least 10 houses before that one
EDIT: I'll use that one though
2nd EDIT: Just took a quick peek at the house files, and found out it started from 1.