[HELP]dcmd_gotohouse
#1

Hello,
use Garhouse FS how can I do the command /gotohouse can use it all

Код:
dcmd_gotohouse(playerid, params[])
{
	new h, file[HOUSEFILE_LENGTH];
	if(!IsPlayerAdmin(playerid)) return 0;
	if(sscanf(params, "d", h)) return SendClientMessage(playerid, COLOUR_SYSTEM, E_CMD_USAGE_GOTOHOUSE);
    format(file, sizeof(file), FILEPATH, h);
	if(!dini_Exists(file)) return SendClientMessage(playerid, COLOUR_SYSTEM, E_INVALID_HID);
	else
	{
	    SetPlayerPosEx(playerid, dini_Float(file, "SpawnOutX"), dini_Float(file, "SpawnOutY"), dini_Float(file, "SpawnOutZ"), dini_Int(file, "SpawnInterior"), dini_Int(file, "SpawnWorld"));
		SendMSG(playerid, COLOUR_YELLOW, 128, I_TELEPORT_MSG, h);
	}
    return 1;
}
And to add the command / myhouses
As I write to teleport into their house?
Reply
#2

pawn Код:
dcmd_gotohouse(playerid, params[])
{
    new h, file[HOUSEFILE_LENGTH];
    if(sscanf(params, "d", h)) return SendClientMessage(playerid, COLOUR_SYSTEM, E_CMD_USAGE_GOTOHOUSE);
    format(file, sizeof(file), FILEPATH, h);
    if(!dini_Exists(file)) return SendClientMessage(playerid, COLOUR_SYSTEM, E_INVALID_HID);
    else
    {
        SetPlayerPosEx(playerid, dini_Float(file, "SpawnOutX"), dini_Float(file, "SpawnOutY"), dini_Float(file, "SpawnOutZ"), dini_Int(file, "SpawnInterior"), dini_Int(file, "SpawnWorld"));
        SendMSG(playerid, COLOUR_YELLOW, 128, I_TELEPORT_MSG, h);
    }
    return 1;
}
this will allow everyone to use this command
Reply
#3

Quote:
Originally Posted by Eth
Посмотреть сообщение
this will allow everyone to use this command
I don't think that's what he asked for... I think he wants it to go to the interior, hence why he said "in to", rather than "go to"...
Reply
#4

Quote:
Originally Posted by Eth
Посмотреть сообщение
pawn Код:
dcmd_gotohouse(playerid, params[])
{
    new h, file[HOUSEFILE_LENGTH];
    if(sscanf(params, "d", h)) return SendClientMessage(playerid, COLOUR_SYSTEM, E_CMD_USAGE_GOTOHOUSE);
    format(file, sizeof(file), FILEPATH, h);
    if(!dini_Exists(file)) return SendClientMessage(playerid, COLOUR_SYSTEM, E_INVALID_HID);
    else
    {
        SetPlayerPosEx(playerid, dini_Float(file, "SpawnOutX"), dini_Float(file, "SpawnOutY"), dini_Float(file, "SpawnOutZ"), dini_Int(file, "SpawnInterior"), dini_Int(file, "SpawnWorld"));
        SendMSG(playerid, COLOUR_YELLOW, 128, I_TELEPORT_MSG, h);
    }
    return 1;
}
this will allow everyone to use this command
Not working
Reply
#5

Quote:
Originally Posted by pitchooo
Посмотреть сообщение
Not working
It should, what it should be doing is if you use that command is it should put you at the door/entrance to that house.

The only thing he actually did though was remove the IsPlayerAdmin, so in essence anyone could use that command.


Link to the thread with the FS you have used so that we can see more.

And clarify what you're wanting, whether you want them in the house, or just out the door...

Do you want everyone rather than just admins to be able to use it?
Reply
#6

Once removed IsPlayerAdmin command /gotohouse work.
But hides the icon to enter the house

Reply
#7

Quote:
Originally Posted by pitchooo
Посмотреть сообщение
Once removed IsPlayerAdmin command /gotohouse work.
But hides the icon to enter the house

That suggests something else other than a fail.


Is it working as intended, minus the pickup issue?

Do you have any other script portions that relate and use pickups?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)