Same interior on different location -
Rolyy - 07.08.2010
I found out that some has different locations but with the same interiors (Houses, 24/7s, Ammunations etc.) on different servers..
Does anyone know how to do/create it a interior at a different location/own location?
Re: Same interior on different location -
ViruZZzZ_ChiLLL - 07.08.2010
Well they set it do diff VirtualWorld
SetPlayerVirtualWorld(playeid, worldid);
For more info in this, just visit the wiki :
https://sampwiki.blast.hk/wiki/SetPlayerVirtualWorld
Re: Same interior on different location -
Rolyy - 07.08.2010
Hmm, I think I already understand it.
Example,
So if there are 7 ammunations, There must be 7 DIFFERENT virtual world IDs?
Re: Same interior on different location -
ViruZZzZ_ChiLLL - 07.08.2010
Quote:
Originally Posted by Rolyy
Hmm, I think I already understand it.
Example,
So if there are 7 ammunations, There must be 7 DIFFERENT virtual world IDs?
|
Yes, but don't forget to set the virtual world to 0 when they exit the interior.
Re: Same interior on different location -
Rolyy - 07.08.2010
Oh okay thank you for the info, Wouldn't do this if i wasn't informed xD.
Re: Same interior on different location -
Rolyy - 07.08.2010
sorry for another double post, but i want to make sure this post will be seen (actually could post new theard but I dont want to spam it up in theards..)
I got 1 exit and 3 entrance pickups which teleports you to exact the same interior, Those all 3 have a different VirtualWord IDs.
The 3 entrance teleports work exactly as I wanted.
The 1 exit teleport shows on every Virtual world ID...
Example:
The setpos from the exit teleport redirects your character to england.
I entrance a building at Russia (its 1 of the 3 entrance teleports), It teleports me to the exact interior.
I do some things in the interior, Then about to leave the interior. when I reach the exit pickup teleport.
It teleports me to England.. But I want it to teleport me back to Russia where I entered the building in the first place...
RUSSIA & ENGLAND ARE JUST EXAMPLES..!
Re: Same interior on different location -
ViruZZzZ_ChiLLL - 07.08.2010
I kinda don't get what you mean but try this :
(Okay so I'm assuming your using Incognitos plugin)
pawn Код:
new LOL[MAX_PLAYERS];
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
if(checkpointid == Enter1)
{
LOL[playerid] = 1;
}
else if(checkpointid == Enter2)
{
LOL[playerid] = 2;
}
else if(checkpointid == Enter3)
{
LOL[playerid] = 3;
}
return 1;
}
public OnPlayerExitDynamicCP(playerid, checkpointid)
{
if(checkpointid == Exit)
{
if(LOL[playerid] == 1)
{
SetPlayerPos(...);
}
else if(LOL[playerid] == 2)
{
SetPlayerPos(...);
}
else if(LOL[playerid] == 3)
{
SetPlayerPos(...);
}
return 1;
}
Re: Same interior on different location -
Rolyy - 07.08.2010
Hmm, Could you exaple just some things for me?
When I'm viewing it I don't really understand what to do actually..
EDIT: Or wait.. ill try something, i think i might know
Re: Same interior on different location -
Claude - 07.08.2010
Use Virtual Worlds, objects stream every world (same for Int I think)
Re: Same interior on different location -
Rolyy - 07.08.2010
The 2 First warning, I actually don't know what to do with.
I can fix the last one by my own.
NOTE: LOL is changed into DynamicCPMAX
Код:
C:\Users\...\Desktop\...\gamemodes\Teamdm.pwn(1764) : warning 235: public function lacks forward declaration (symbol "OnPlayerEnterDynamicCP")
C:\Users\...\Desktop\...\gamemodes\Teamdm.pwn(1781) : warning 235: public function lacks forward declaration (symbol "OnPlayerExitDynamicCP")
C:\Users\...\Desktop\...\gamemodes\Teamdm.pwn(1799) : warning 209: function "OnPlayerExitDynamicCP" should return a value
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
3 Warnings.
pawn Код:
new DynamicCPMAX[MAX_PLAYERS];
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
if(checkpointid == EnterAmmunation)
{
DynamicCPMAX[playerid] = 1;
}
else if(checkpointid == EnterAmmunation1)
{
DynamicCPMAX[playerid] = 2;
}
else if(checkpointid == EnterAmmunation2)
{
DynamicCPMAX[playerid] = 3;
}
return 1;
}
public OnPlayerExitDynamicCP(playerid, checkpointid)
{
if(checkpointid == ExitAmmunation)
{
if(DynamicCPMAX[playerid] == 1)
{
SetPlayerPos(...);
}
else if(DynamicCPMAX[playerid] == 2)
{
SetPlayerPos(...);
}
else if(DynamicCPMAX[playerid] == 3)
{
SetPlayerPos(...);
}
return 1;
}
}