Entering a Interior
#4

pawn Code:
#include <a_samp>

public OnGameModeInit()
{
    CreatePickup(1318, 1, 1554.38, -1675.69, 16.195, 0); //This pickup is placed at LSPD, change to where you want it to be.
    return true;
}

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if (newkeys & KEY_SECONDARY_ATTACK){
        if(IsPlayerInRangeOfPoint(playerid, 3.0, 1554.38, -1675.69, 16.195)){ //When changing the pickup position, change this to the same coordinate <<<
            SetPlayerPos(playerid, 365.7158, -9.8873, 1001.8516); //Set their position as you stated
            SetPlayerInterior(playerid, 9); //Set them into interior ID 9 as that is the cluckin bell interior ID (Reference: http://weedarr.wikidot.com/interior)
        }
        else if(IsPlayerInRangeOfPoint(playerid, 3.0, 365.7158, -9.8873, 1001.8516)){ //Check to see if they're near the interior doors
            SetPlayerPos(playerid, 1554.38, -1675.69, 16.195); //When changing the pickup position, change this to the same coordinate <<<
            SetPlayerInterior(playerid, 0); //Set them back to interior ID 0 so they're in the real world.
        }
    }
    return true;
}
If you need anymore details please let me know via this thread.
Reply


Messages In This Thread
Entering a Interior - by ChandraLouis - 27.04.2017, 12:39
Re: Entering a Interior - by AndreiWow - 27.04.2017, 12:52
Re: Entering a Interior - by ChandraLouis - 27.04.2017, 13:40
Re: Entering a Interior - by iGetty - 27.04.2017, 13:56
Re: Entering a Interior - by ChandraLouis - 27.04.2017, 14:07
Re: Entering a Interior - by iGetty - 27.04.2017, 14:08
Re: Entering a Interior - by ChandraLouis - 27.04.2017, 14:10
Re: Entering a Interior - by iGetty - 27.04.2017, 14:21
Re: Entering a Interior - by ChandraLouis - 27.04.2017, 14:42

Forum Jump:


Users browsing this thread: 1 Guest(s)