How can i get into Ammunation? -
Brandondw8 - 16.05.2014
I have my OnplayerConnect
DisableInteriorEnterExits();
soooo i cant go in ammunation anymore. but i dont want people going into cj's house an shit.
Re: How can i get into Ammunation? -
davve95 - 16.05.2014
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.
Re: How can i get into Ammunation? -
Brandondw8 - 16.05.2014
Quote:
Originally Posted by davve95
|
Thanks man. +1
Re: How can i get into Ammunation? -
Brandondw8 - 16.05.2014
Quote:
Originally Posted by davve95
|
Yeah that'd be great. All i want is for people to get into the amunations. Nothin else really.
Re: How can i get into Ammunation? -
Brandondw8 - 16.05.2014
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
Re: How can i get into Ammunation? -
Dignity - 17.05.2014
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
}
Re: How can i get into Ammunation? -
Brandondw8 - 17.05.2014
Quote:
Originally Posted by Mionee
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....
Re: How can i get into Ammunation? -
DavidBilla - 17.05.2014
What kind of an NPC are you gonna be using? An immobile one standing in same place?
Re: How can i get into Ammunation? -
Brandondw8 - 17.05.2014
Quote:
Originally Posted by DavidBilla
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
Re : How can i get into Ammunation? -
Ramoboss - 17.05.2014
https://sampforum.blast.hk/showthread.php?tid=355372
here it is ^^