Faction HQ Problem -
AwP_sTyLE - 04.09.2012
Hi!
I am scripting on a roleplay gamemode.
I have a problem:When I try to enter the faction hq it teleports me a little bit back from the enter place of the hq.So it isn't teleporting me in the hq interior(where i want)
I talk about a faction that i moved.The faction cars were moved perfectly in the new place but i have that problem with hq.
I mention that the faction hq that the gm have without be moved work perfectly.
I don't have to type anything to enter the hq.Just to walk to the place of cordonates.
That's the place where i edit the cordonates of enter and exit of the hq.
I want to know if i have something to edit in the part of gm that i post here or i have to find something in the gm and edit it.
Код:
//Ballas Enter
if(PlayerInfo[playerid][pMember] == 15 || PlayerInfo[playerid][pLeader] == 15)
{
SetPlayerPos(playerid, -204.439987,-26.453998,1002.273437);
GameTextForPlayer(playerid, "~w~Ballas HQ",5000,1);
SetPlayerInterior(playerid,16);
SetPlayerFacingAngle(playerid, 181);
PlayerInfo[playerid][pInt] = 16;
}
else if(hqlock[iolock] == 0)
{
SetPlayerPos(playerid, -204.439987,-26.453998,1002.273437);
GameTextForPlayer(playerid, "~w~Ballas HQ",5000,1);
SetPlayerInterior(playerid,16);
SetPlayerFacingAngle(playerid, 181);
PlayerInfo[playerid][pInt] = 16;
}
else
{
GameTextForPlayer(playerid, "~r~Locked",5000,1);
}
}
else if (PlayerToPointStripped(1, playerid,2148.5640,-1484.9077,26.6240, cx,cy,cz))
{
//Ballas Exit
SetPlayerPos(playerid, 2148.5640,-1484.9077,26.6240);
GameTextForPlayer(playerid, "~w~Los Santos",5000,1);
SetPlayerInterior(playerid,0);
SetPlayerFacingAngle(playerid, 1);
PlayerInfo[playerid][pInt] = 0;
}
else if (PlayerToPointStripped(1, playerid,-204.439987,-26.453998,1002.273437, cx,cy,cz))
{
Sorry for bad english!
Thanks!
Re: Faction HQ Problem -
MarkoN - 04.09.2012
pawn Код:
SetPlayerInterior(playerid,16);
is a 24/7 Store ...
so it uses coordinates :
pawn Код:
SetPlayerPos(playerid, -25.132598,-139.066986,1003.546875);
Re: Faction HQ Problem -
AwP_sTyLE - 04.09.2012
Where can i find interiors id like u say?
I have that interior from my script from this site
http://weedarr.wikidot.com/interior
I want to put this:
tatoo parlour 1 16 -204.439987,-26.453998,1002.273437
And see there says id 16...I know that this interior id is at more than one interior from that list and that's why i ask you from what website can i find the real id of interiors.
And another question:
Do you think that's why it teleports my a little bit back?I thought if that was the problem it must spawn me somewhere in the air,but i must be wrong.
And can you tell me what does PlayerToPointStripped mean?I think this can help me corect a little bit the cordonates..
Till now and still i think it is the position where i have to be to teleport to AdPlayerPos cordonates?Am I right?
Re: Faction HQ Problem -
MarkoN - 04.09.2012
looks like yes. A little back? add more or less Y coordinate
Re: Faction HQ Problem -
AwP_sTyLE - 04.09.2012
I will try to change it tomorow but tell my a website to find the corect interior id please!
Quote:
Originally Posted by AwP_sTyLE
And can you tell me what does PlayerToPointStripped mean?I think this can help me corect a little bit the cordonates..
Till now and still i think it is the position where i have to be to teleport to AdPlayerPos cordonates?Am I right?
|
And can you answer this please?
EDIT:OH,LOL now i see that it was a 24/7 cordonate ...sorry i will change it tomorow and il tell you beacuse today im not at the pc that contains my gm.
Re: Faction HQ Problem -
MarkoN - 04.09.2012
not sure but i think :
PlayerToPointStripped
1.0 - radius
playerid - you know that
x, y, z - coordinates where the player should stand
x1,y1,z1 - coordinates of the player
as i mentioned above I'm not sure
Re: Faction HQ Problem -
AwP_sTyLE - 05.09.2012
It doesn't work.It teleports me back like i say in the topic.Can you tell me a site from i can take the fisrt int of tatoo?
Here's an exemple of another faction hq that works perfectly ..i think you can tell me if you see this...
Код:
//Yakuza enter
if(PlayerInfo[playerid][pMember] == 14 || PlayerInfo[playerid][pLeader] == 14)
{
SetPlayerPos(playerid, -2159.122802,641.517517,1052.381713);
GameTextForPlayer(playerid, "~w~The Yakuza HQ",5000,1);
SetPlayerInterior(playerid,1);
SetPlayerFacingAngle(playerid, 181);
PlayerInfo[playerid][pInt] = 1;
}
else if(hqlock[iolock] == 0)
{
SetPlayerPos(playerid, -2159.122802,641.517517,1052.381713);
GameTextForPlayer(playerid, "~w~The Yakuza HQ",5000,1);
SetPlayerInterior(playerid,1);
SetPlayerFacingAngle(playerid, 181);
PlayerInfo[playerid][pInt] = 1;
}
else
{
GameTextForPlayer(playerid, "~r~Locked",5000,1);
}
}
else if (PlayerToPointStripped(1, playerid,-2158.6736,643.1414,1052.3750, cx,cy,cz))
{
//Yakuza Exit
SetPlayerPos(playerid,691.5793,-1276.0737,13.5607);
GameTextForPlayer(playerid, "~w~Los Santos",5000,1);
SetPlayerInterior(playerid,0);
SetPlayerFacingAngle(playerid, 1);
PlayerInfo[playerid][pInt] = 0;
}
else if (PlayerToPointStripped(1, playerid,5792.8044,-1087.4629,30.7188, cx,cy,cz))
{
Re: Faction HQ Problem -
AwP_sTyLE - 05.09.2012
Thank you for your help markon ,but i found a line up then the one that says ballas hq and that was the place to put the cordonates where i have to be to teleport and know it works perfectly.Thank's a lot!