SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 16/05/2014, 09:30 PM   #1
Brandondw8
Big Clucker
 
Brandondw8's Avatar
 
Join Date: Aug 2013
Location: Wyoming
Posts: 81
Reputation: 0
Default How can i get into Ammunation?

I have my OnplayerConnect
DisableInteriorEnterExits();

soooo i cant go in ammunation anymore. but i dont want people going into cj's house an shit.
__________________
*[MY SERVER]*
San Andreas FreeRoam | Wyoming, United States
184.167.27.68:7777
FreeMode|Airplanes|Hydra
If I've helped you, please +rep
Brandondw8 is offline   Reply With Quote
Old 16/05/2014, 09:44 PM   #2
davve95
High-roller
 
davve95's Avatar
 
Join Date: Nov 2009
Location: Sweden
Posts: 3,138
Reputation: 234
Default Re: How can i get into Ammunation?

Find the interior id and then SetPlayerPos:

http://wiki.sa-mp.com/wiki/SetPlayerPos
http://wiki.sa-mp.com/wiki/SetPlayerInterior
http://wiki.sa-mp.com/wiki/InteriorIDs


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

http://wiki.sa-mp.com/wiki/CreatePickup
http://wiki.sa-mp.com/wiki/OnPlayerPickUpPickup


Can give more detailed info tomorrow if you would like to.
davve95 is offline   Reply With Quote
Old 16/05/2014, 09:45 PM   #3
Brandondw8
Big Clucker
 
Brandondw8's Avatar
 
Join Date: Aug 2013
Location: Wyoming
Posts: 81
Reputation: 0
Default Re: How can i get into Ammunation?

Quote:
Originally Posted by davve95 View Post
Thanks man. +1
__________________
*[MY SERVER]*
San Andreas FreeRoam | Wyoming, United States
184.167.27.68:7777
FreeMode|Airplanes|Hydra
If I've helped you, please +rep
Brandondw8 is offline   Reply With Quote
Old 16/05/2014, 10:10 PM   #4
Brandondw8
Big Clucker
 
Brandondw8's Avatar
 
Join Date: Aug 2013
Location: Wyoming
Posts: 81
Reputation: 0
Default Re: How can i get into Ammunation?

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

http://wiki.sa-mp.com/wiki/SetPlayerPos
http://wiki.sa-mp.com/wiki/SetPlayerInterior
http://wiki.sa-mp.com/wiki/InteriorIDs


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

http://wiki.sa-mp.com/wiki/CreatePickup
http://wiki.sa-mp.com/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.
__________________
*[MY SERVER]*
San Andreas FreeRoam | Wyoming, United States
184.167.27.68:7777
FreeMode|Airplanes|Hydra
If I've helped you, please +rep
Brandondw8 is offline   Reply With Quote
Old 16/05/2014, 11:32 PM   #5
Brandondw8
Big Clucker
 
Brandondw8's Avatar
 
Join Date: Aug 2013
Location: Wyoming
Posts: 81
Reputation: 0
Default Re: How can i get into Ammunation?

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
__________________
*[MY SERVER]*
San Andreas FreeRoam | Wyoming, United States
184.167.27.68:7777
FreeMode|Airplanes|Hydra
If I've helped you, please +rep
Brandondw8 is offline   Reply With Quote
Old 17/05/2014, 12:04 AM   #6
Dignity
High-roller
 
Dignity's Avatar
 
Join Date: May 2013
Location: Belgium
Posts: 1,660
Reputation: 1211
Default Re: How can i get into Ammunation?

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
    }
Dignity is offline   Reply With Quote
Old 17/05/2014, 12:25 AM   #7
Brandondw8
Big Clucker
 
Brandondw8's Avatar
 
Join Date: Aug 2013
Location: Wyoming
Posts: 81
Reputation: 0
Default Re: How can i get into Ammunation?

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....
__________________
*[MY SERVER]*
San Andreas FreeRoam | Wyoming, United States
184.167.27.68:7777
FreeMode|Airplanes|Hydra
If I've helped you, please +rep
Brandondw8 is offline   Reply With Quote
Old 17/05/2014, 12:28 AM   #8
DavidBilla
Huge Clucker
 
DavidBilla's Avatar
 
Join Date: Aug 2013
Location: Planet Earth
Posts: 303
Reputation: 35
Default Re: How can i get into Ammunation?

What kind of an NPC are you gonna be using? An immobile one standing in same place?
__________________
DavidBilla is offline   Reply With Quote
Old 17/05/2014, 12:30 AM   #9
Brandondw8
Big Clucker
 
Brandondw8's Avatar
 
Join Date: Aug 2013
Location: Wyoming
Posts: 81
Reputation: 0
Default Re: How can i get into Ammunation?

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
__________________
*[MY SERVER]*
San Andreas FreeRoam | Wyoming, United States
184.167.27.68:7777
FreeMode|Airplanes|Hydra
If I've helped you, please +rep
Brandondw8 is offline   Reply With Quote
Old 17/05/2014, 12:32 AM   #10
Ramoboss
Big Clucker
 
Ramoboss's Avatar
 
Join Date: Nov 2012
Location: Algerien et Fier ^^
Posts: 115
Reputation: 24
Default Re : How can i get into Ammunation?

http://forum.sa-mp.com/showthread.php?t=355372

here it is ^^
__________________
Ramoboss is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ammunation [GOD]Dragonster82 Scripting Help 4 17/10/2011 10:39 AM
Ammunation FireCat Help Archive 4 04/07/2011 08:38 PM
[FilterScript] [FS] Ammunation CrunkBankS Релизы/Releases 3 29/08/2010 03:05 AM
Ammunation Guy Arrows73 Help Archive 4 07/06/2010 12:17 PM
[FilterScript] [FS]GTA IV Like Ammunation deather Filterscripts 26 21/05/2010 01:42 PM


All times are GMT. The time now is 07:00 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.