SA-MP Forums Archive
Coordinates help - 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: Coordinates help (/showthread.php?tid=646834)



Coordinates help - Kraeror - 24.12.2017

Hello guys, I'm making command for removing house, but I don't know how to remove the coordinates from the house, like HouseInfo[houseid][X] = I DON'T KNOW, pls don't tell me 0!
+1 REP if you help me


Re: Coordinates help - RogueDrifter - 24.12.2017

well first of all offering rep will rebound on you, second of all simply use ANY map editor to get the coordinations of an object.


Re: Coordinates help - Kraeror - 24.12.2017

What the f*** are you talking about RogueDrifer?
Why to get object's coordinates? I'm not that stupid :X
I'm asking how to remove the house, like when player wants to enter, he can't because there is no house?
Like set HouseInfo[houseid][X] for example to 0, but there will be bug!
Can you help me?


Re: Coordinates help - RogueDrifter - 24.12.2017

you want to remove the house pickup or do you want to make it locked? You didn't make yourself clear
Quote:

for removing house




Re: Coordinates help - Kraeror - 24.12.2017

I want to set coordinates to something like INVALID_COORDINATE like HosueInfo[houseid][X] = INVALID_COORDINATE


Re: Coordinates help - RogueDrifter - 24.12.2017

You want to move the object? use MoveDynamicObject(same parameters as the normal MoveObject) if you're using streamer or MoveObject if you're using the normal samp native, and just move the house up high in the sky pick something like z=5000 or whatever.


Re: Coordinates help - Kraeror - 24.12.2017

What object?? I'm talking about coordinates to set them to INVALID, what are you talking about?


Re: Coordinates help - RogueDrifter - 24.12.2017

nvm wait for someone else to come and help maybe they'll understand what you're talking about srry i have no clue what you're asking for now.


Re: Coordinates help - Kraeror - 24.12.2017

NVM GUYS, can you tell me why this:
PHP код:
for(new 0MAX_PLAYERSi++)
{
    if(
IsPlayerConnected(playerid))
    {
        
DeletePlayer3DTextLabel(iHouseInfo[houseid][hLabel]);
    }

doesn't works?

Here is where I created it:
PHP код:
for(new 0MAX_PLAYERSi++)
{
    if(
IsPlayerConnected(playerid))
    {
        
format(stringsizeof(string), "");
        
HouseInfo[h][hLabel] = CreatePlayer3DTextLabel(istringCOLOR_HOUSEHouseInfo[h][hX], HouseInfo[h][hY], HouseInfo[h][hZ], 15.0INVALID_PLAYER_IDINVALID_VEHICLE_ID1);
    }




Re: Coordinates help - RogueDrifter - 24.12.2017

Quote:
Originally Posted by Kraeror
Посмотреть сообщение
NVM GUYS, can you tell me why this:
PHP код:
for(new 0MAX_PLAYERSi++)
{
    if(
IsPlayerConnected(playerid))
    {
        
DeletePlayer3DTextLabel(iHouseInfo[houseid][hLabel]);
    }

doesn't works?

Here is where I created it:
PHP код:
for(new 0MAX_PLAYERSi++)
{
    if(
IsPlayerConnected(playerid))
    {
        
format(stringsizeof(string), "");
        
HouseInfo[h][hLabel] = CreatePlayer3DTextLabel(istringCOLOR_HOUSEHouseInfo[h][hX], HouseInfo[h][hY], HouseInfo[h][hZ], 15.0INVALID_PLAYER_IDINVALID_VEHICLE_ID1);
    }

I'm not sure why you're looping through all players to delete a player3dtextlabel (only seen by one player) but the reason behind could be the houseinfo[houseid][hlabel] i don't see a variable for playerid so is till dunno why you made a loop but show the enum or the variables set for houseinfo.