SA-MP Forums Archive
Interiors? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Server (https://sampforum.blast.hk/forumdisplay.php?fid=6)
+--- Forum: Server Support (https://sampforum.blast.hk/forumdisplay.php?fid=19)
+--- Thread: Interiors? (/showthread.php?tid=423894)



Interiors? - Hussain - 19.03.2013

Sorry ONCE again, but i honestly don't get this

I can't enter San Fierro Police Department is there a way i can add the yellow marker + interior


Re: Interiors? - kamzaf - 19.03.2013

SetPlayerInterior(playerid, 10);
SetPlayerPos(playerid, 246.375991,109.245994,1003.218750);

^^ is sfpd location + interior. That should get you in there


Re: Interiors? - Hussain - 19.03.2013

Quote:
Originally Posted by kamzaf
Посмотреть сообщение
SetPlayerInterior(playerid, 10);
SetPlayerPos(playerid, 246.375991,109.245994,1003.218750);

^^ is sfpd location + interior. That should get you in there
Where should i paste this & do you have skype if you have skype PM me


Re: Interiors? - freddy smyth - 19.03.2013

Post it in:

onplayerspawn: if you want it to spawn there when you join.
Otherewise, use strcmp or zcmd and add it as a command so players can type a command to teleport there.

The reason SF PD isn't accessible via a preset teleport is because:

1. The SAMP.inc include originally ensures that interior teleports are disabled.
2. The SF PD interior was never formally used in GTA SA.


Re: Interiors? - Hussain - 19.03.2013

Isn't there a way
i can just simply add the way so i can enter sfpd interior
So i go to SFPD & then walk into the yellow marker and then i'm in the interior like LSPD?


Re: Interiors? - davve95 - 19.03.2013

Quote:
Originally Posted by Hussain
Посмотреть сообщение
Isn't there a way
i can just simply add the way so i can enter sfpd interior
So i go to SFPD & then walk into the yellow marker and then i'm in the interior like LSPD?
Createpickup

https://sampwiki.blast.hk/wiki/CreatePickup


Re: Interiors? - freddy smyth - 19.03.2013

You'd have to script it in.

Take a look at the SAMP wiki, otherwise, ask in scripting discussion for someone nicely to script it for you as a strcmp command.

I assume you don't use zcmd...


Re : Interiors? - thegreathom - 19.03.2013

If you want to understand this scripts, i'll give you some informations (not in the pawn code) so I hope, you will learn more with our famous, helpfull wiki-samp.
pawn Код:
#include <a_samp>

new SFPD; // San Fiero : Police Department.
new ESFPD; // Exit San Fiero : Police Department.

public OnFilterScriptInit()
{
    print("\n------------------------------------------------");
    print(" San Fiero : Police Departement Enter/Exit Pickup.");
    print("------------------------------------------------\n");
    //----------------------------------------------------------------------
    SFPD = CreatePickup(2894, 1, X, Y, Z, -1);
    // Remplace the X, Y, Z, by your coordinates (where we will see the pickup,
    // if you don't know to do, use the famous samp_debug.)
    ESFP = CreatePickup(2894, 1, X, Y, Z, -1);
    // Remplace the X, Y, Z, by your coordinates (where we will see the pickup,
    // in the SFPD interriors, use the famous samp_debug.)
    return 1;
}
pawn Код:
public OnFilterScriptExit()
{
    print("\n------------------------------------------------");
    print(" San Fiero : Police Departement.. Shutdown........");
    print("------------------------------------------------\n");
    return 1;
}
pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == SFPD)
    {
    SetPlayerInterior(playerid, 10); // Info by kamzaf
    SetPlayerPos(playerid, 246.375991,109.245994,1003.218750); // Info by kamzaf
    }
    if(pickupid == ESFP)
    {
    SetPlayerInterior(playerid, 0); // The normal worlds.
    SetPlayerPos(playerid, X, Y, Z);
    // Remplace the X, Y, Z, by your coordinates (when we will leave the SFPD,
    // if you don't know, use our famous samp_debug.)
    }
    return 1;
}
Correct me if I am wrong .