Same Interior Help
#1

Well I need a help because Im making my own DM server.
I want to know what can i do if I want the same interior several times for example:

In my server I used this:

Quote:

DisableInteriorEnterExits();

So i cant go inside any shop or interior because i want to make my own!

Im using checkpoints to go inside interior

This:
Quote:

stock OnPlayerEnterStreamedCheckpoint(playerid, CPiD)
{
if(CPiD == CP1)//Regular player Entrance LV
if(GetPlayerScore(playerid) == 99) return SendClientMessage(playerid,red,"You Do Not Have Enough Score To Enter To The Regular Player Club");{
SetPlayerInterior(playerid, 12);
SetPlayerPos(playerid, 2324.4096,-1146.4459,1050.7100);
}
return 1;
}

With this if the player doesnt has 100 score, they can't join so with the ammun nation, I wanna have the same interior for all ammun natino that I want to make..
I made this:

Quote:

if(CPiD == CP3) { //Ammunnation Entrance Old Venturas
SetPlayerInterior(playerid, 1);
SetPlayerPos(playerid, 285.6628,-39.6621,1001.5156);
SendClientMessage(playerid,lightblue,"Welcome To The Ammun Nation");
}

it works fine but when I want to make another Ammunation with the same interior i can't.. if i use the same interior and the same coords.. it will be go inside the first ammun that I already made.
I tried to use:

Quote:

SetPlayerVirtualWord(playerid, X);

but it doesnt work..
So my question is: how can i do all my ammun nation with the same interior??

Thanks!
Reply
#2

You were heading in the right direction.

Use different virtual worlds for each of the different locations.

Modify OnPlayerEnterStreamedCheckpoint
add in a check for players virtual world, to know which one of the ammunations they are in, and return them accordingly.

ex. for #2
pawn Код:
stock OnPlayerEnterStreamedCheckpoint(playerid, CPiD)
{
  if(CPiD == CP1)//Regular player Entrance LV
  if(GetPlayerScore(playerid) == 99) return SendClientMessage(playerid,red,"You Do Not Have Enough Score To Enter To The Regular Player Club");{
   SetPlayerInterior(playerid, 12);
   SetPlayerVirtualWorld(playerid, 1); //might as well align the CP1 with VW1 etc
   SetPlayerPos(playerid, 2324.4096,-1146.4459,1050.7100);
  }
//Then wherever your return checkpoint is, guessing thats maybe CP2?
  if(CPid == CP2) //The return checkpoint inside of ammunation
  {
    if(GetPlayerVirtualWorld(playerid) == 1)
    {
      //return the player to Regular player Entrance LV
      //remember to set their virtual world back to 0 again
    }
  }
  return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)