How can i get into Ammunation?
#1

I have my OnplayerConnect
DisableInteriorEnterExits();

soooo i cant go in ammunation anymore. but i dont want people going into cj's house an shit.
Reply
#2

Find the interior id and then SetPlayerPos:

https://sampwiki.blast.hk/wiki/SetPlayerPos
https://sampwiki.blast.hk/wiki/SetPlayerInterior
https://sampwiki.blast.hk/wiki/InteriorIDs


Edit: You could create a pick up for it if you wish:

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


Can give more detailed info tomorrow if you would like to.
Reply
#3

Thanks man. +1
Reply
#4

Quote:
Originally Posted by davve95
View Post
Find the interior id and then SetPlayerPos:

https://sampwiki.blast.hk/wiki/SetPlayerPos
https://sampwiki.blast.hk/wiki/SetPlayerInterior
https://sampwiki.blast.hk/wiki/InteriorIDs


Edit: You could create a pick up for it if you wish:

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


Can give more detailed info tomorrow if you would like to.
Yeah that'd be great. All i want is for people to get into the amunations. Nothin else really.
Reply
#5

Question for people.
If I want to add another lets say, armor to another place on the map, do i create a new pickup_Armor = CreatePickup coordinate string?

Code:
pickup_Armor = CreatePickup(1242, 2, 2464.1003,-1667.2505,13.4774, -1);
	if(pickupid == pickup_Armor)
    {
        SetPlayerArmor(playerid, 100);
    }
EDIT: Nevermind. Figured it out. Just dont know how to set ammunation interior
Reply
#6

Since you figured the armor pickup out, I'll only show an example on how to create a custom entrance point using pickups. If you want me to give you an example of how to do the armor pickup, just reply and I'll. (:

I'm using these coordinates: X: 316.524993, Y: -167.706985, Z: 999.593750 which teleport you inside this ammu nation. You can find more interiors http://weedarr.wikidot.com/interiorhere. The "x, y, z" coordinates are to be replaced with the coordinates of the ammu nation entrance.

This should work:

pawn Code:
// Top of your script

    new pickup_Enter;
    new pickup_Exit;

    // OnGameModeInit - 1239 = info pickup
    pickup_Enter = CreatePickup(1239, 2, x, y, z, -1); // 1239 = info pickup
    pickup_Exit = CreatePickup(1239, 2, 316.524993, -167.706985, 999.593750, -1); // coords = ammunation

    // Pickup callback
    if(pickupid == pickup_Enter)
    {
        SetPlayerPos(playerid, 316.524993, -167.706985, 999.593750);
        SetPlayerInterior(playerid, 6); // int is 6
    }

    if(pickupid == pickup_Exit)
    {
        SetPlayerPos(playerid, x, y, z);
        SetPlayerInterior(playerid, 0); // int is 0
    }
Reply
#7

Quote:
Originally Posted by Mionee
View Post
Since you figured the armor pickup out, I'll only show an example on how to create a custom entrance point using pickups. If you want me to give you an example of how to do the armor pickup, just reply and I'll. (:

I'm using these coordinates: X: 316.524993, Y: -167.706985, Z: 999.593750 which teleport you inside this ammu nation. You can find more interiors http://weedarr.wikidot.com/interiorhere. The "x, y, z" coordinates are to be replaced with the coordinates of the ammu nation entrance.

This should work:

pawn Code:
// Top of your script

    new pickup_Enter;
    new pickup_Exit;

    // OnGameModeInit - 1239 = info pickup
    pickup_Enter = CreatePickup(1239, 2, x, y, z, -1); // 1239 = info pickup
    pickup_Exit = CreatePickup(1239, 2, 316.524993, -167.706985, 999.593750, -1); // coords = ammunation

    // Pickup callback
    if(pickupid == pickup_Enter)
    {
        SetPlayerPos(playerid, 316.524993, -167.706985, 999.593750);
        SetPlayerInterior(playerid, 6); // int is 6
    }

    if(pickupid == pickup_Exit)
    {
        SetPlayerPos(playerid, x, y, z);
        SetPlayerInterior(playerid, 0); // int is 0
    }
Woo!
After much starting the game, going to the ammunation, /save coords i did it. I can enter/exit the downtown LS ammunation. Now to get the npc there, check point and weapons....
Reply
#8

What kind of an NPC are you gonna be using? An immobile one standing in same place?
Reply
#9

Quote:
Originally Posted by DavidBilla
View Post
What kind of an NPC are you gonna be using? An immobile one standing in same place?
Yes. just one where I can go into the marker and purchase the weapons. the npc doesnt need to do anything special
Reply
#10

https://sampforum.blast.hk/showthread.php?tid=355372

here it is ^^
Reply


Forum Jump:


Users browsing this thread: 6 Guest(s)