SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 05/12/2011, 03:38 AM   #1
SnG.Scot_MisCuDI
Gangsta
 
SnG.Scot_MisCuDI's Avatar
 
Join Date: Mar 2011
Location: Gilbert, Arizona
Posts: 883
Reputation: 56
Thumbs up Using Pickups (houses)

Making Houses With Pickups


Okay so, many of us cant figure out checkpoints or its just too confusing. This is a simple way of making a pickup make you go into a interior or even a teleport to a location.
This is NOT a house ownership script.

This can also be use to just make a player teleport on pickup.

Okay, to start out we need our coordinates. Go to the location [in game] and do /save (name). This will save the coordinates. To find them go to: My Documents\GTA San Andreas User Files\SAMP In there, there is a file named: savedpositions

Now we need to open pawno to start scripting.

At the top under includes put.
pawn Code:
new house;
We will need this for the pickup.

Moving on. Now we need to define the "house" with a pickup.
To make the location of the pickup we will need to do this:

pawn Code:
house = CreatePickup(model,type, Float:X, Float:Y, Float:Z, Virtualworld);

For more info on model and type click their names.
For the X Y Z get the coordinates we saved in-game.

In this case i will be using pickup id (model) 19133 (red arrow)
Add this under OnGameModeInit()
pawn Code:
house = CreatePickup(19133, 1, 1641.7367,2044.9491,11.3199, -1);
The -1 means it will show up in all worlds.

How do i get the coordinates? Easy, go into the folder i posted at the top, and you want to copy the bolded numbers (on yours not mine): AddPlayerClass(294,1595.4994,2038.1703,11.4688,88.6041,0,0,0,0,0,0); // house

Ok now we made the first pickup!
Next we need to make the pickup teleport us to a location. under:
for interior location and ids: http://wiki.sa-mp.com/wiki/InteriorIDs
pawn Code:
public OnPlayerPickUpPickup(playerid, pickupid)
    if(pickupid == house)
    {
        SetPlayerPos(playerid,Float: X, Float: Y, Float: Z:); // X, Y, Z are the coordinates they will be teleported to when they walk into pickup.
        SetPlayerInterior(playerid, (id)); // this is the interior id they will be set to.
        return 1;
    }

in my case it will look like:
pawn Code:
public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == house)
    {
        SetPlayerPos(playerid,-2645.3020,1408.5741,906.2734);
        SetPlayerInterior(playerid, 3);
        return 1;
    }


Now, when you walk into the pickup you will be teleported to the location. Since this is for a house, when you are inside the house you will need to get the new coordinates for the exit door Pickup and the new coordinates for when you walk into the exit pickup. For that follow the steps but instead of
pawn Code:
new house;
you would use
pawn Code:
new houseexit;


Hope this helped! This is my first tutorial so cut me some slack! If you have any problems let me know and ill help. And if i forgot anything leave a comment. Give some rep if it helped!
__________________

aka Googamalugafoo
[FS/Tool] Dynamic Biz - Dynamic Bank - FFA DM - Pawno Tool
[Tuts] Map Editor - Nuke - Using Pickups - Timers



Last edited by SnG.Scot_MisCuDI; 28/12/2011 at 08:41 PM.
SnG.Scot_MisCuDI is offline   Reply With Quote
Old 05/12/2011, 05:11 AM   #2
System64
Gangsta
 
System64's Avatar
 
Join Date: May 2011
Location: Zadar, Croatia
Posts: 933
Reputation: 143
Default Re: Making Houses With Pickups

are you okay? I think no, because there is not H of houses, just pickups, toutorial realy bad
__________________
All my works
I left SA:MP! Maybe once I start scripting again but now I'm based on web programming
Soon, I'll buy domain system32.com.hr but for now you can contact me on LogoOff or on my Youtube channel!
System64 is offline   Reply With Quote
Old 05/12/2011, 05:42 AM   #3
Thresholdold
Huge Clucker
 
Thresholdold's Avatar
 
Join Date: Sep 2011
Location: Inside your RCON
Posts: 441
Reputation: 30
Default Re: Making Houses With Pickups

I agree, this is a good tutorial, but it shows how to use pickups, not really anything house related.
__________________
Thresholdold is offline   Reply With Quote
Old 05/12/2011, 06:53 AM   #4
[HiC]TheKiller
High-roller
 
Join Date: Mar 2008
Location: New Zealand
Posts: 2,630
Reputation: 410
Default Re: Making Houses With Pickups

A few errors with your code :P. You're missing a pair of brackets in your fourth code snippet and your fifth code snippet is missing a closing bracket. Also, this
pawn Code:
SetPlayerPos(playerid,Float: X, Float: Y, Float: Z:); // X, Y, Z are the coordinates they will be teleported to when they walk into pickup.
You should tell them that they need to replace the Float's as well as the variables, people might get confused .
Otherwise, it's a OK tutorial for your first .
__________________
[HiC]TheKiller is offline   Reply With Quote
Old 05/12/2011, 05:49 PM   #5
BlackRolePlay
Big Clucker
 
BlackRolePlay's Avatar
 
Join Date: Dec 2011
Location: SA-MP Bulgaria
Posts: 55
Reputation: 14
Default Re: Making Houses With Pickups

This is very bad for first tut when i first looked up at the title i was thinking that he is making a tutorial on how to make a the green house pickup wich is 1273 then i saw that u only send player to interior this is not so good tut man.
__________________
BlackRolePlay is offline   Reply With Quote
Old 05/12/2011, 06:28 PM   #6
bartje01
High-roller
 
Join Date: Jan 2009
Posts: 1,419
Reputation: 6
Default Re: Making Houses With Pickups

It seems that you guys didn't read his thread? He says that it's not related to anything with the ownership of a house. It just shows how to use pickups .
bartje01 is offline   Reply With Quote
Old 05/12/2011, 07:45 PM   #7
PlayHard
Huge Clucker
 
PlayHard's Avatar
 
Join Date: Nov 2011
Location: In an apartment
Posts: 216
Reputation: 22
Default Re: Making Houses With Pickups

Quote:
Originally Posted by bartje01 View Post
It seems that you guys didn't read his thread? He says that it's not related to anything with the ownership of a house. It just shows how to use pickups .
Basically, there are houses using 'pickups' and 'checkpoints'. They took this one as a house system using pickups not checkpoints and thank you thread maker. This will help some people using pickups .
PlayHard is offline   Reply With Quote
Old 05/12/2011, 09:00 PM   #8
SnG.Scot_MisCuDI
Gangsta
 
SnG.Scot_MisCuDI's Avatar
 
Join Date: Mar 2011
Location: Gilbert, Arizona
Posts: 883
Reputation: 56
Default Re: Making Houses With Pickups

Quote:
Originally Posted by bartje01 View Post
It seems that you guys didn't read his thread? He says that it's not related to anything with the ownership of a house. It just shows how to use pickups .
exactly. Thank you! lol
__________________

aka Googamalugafoo
[FS/Tool] Dynamic Biz - Dynamic Bank - FFA DM - Pawno Tool
[Tuts] Map Editor - Nuke - Using Pickups - Timers


SnG.Scot_MisCuDI is offline   Reply With Quote
Old 05/12/2011, 09:02 PM   #9
SnG.Scot_MisCuDI
Gangsta
 
SnG.Scot_MisCuDI's Avatar
 
Join Date: Mar 2011
Location: Gilbert, Arizona
Posts: 883
Reputation: 56
Default Re: Making Houses With Pickups

Quote:
Originally Posted by System64 View Post
are you okay? I think no, because there is not H of houses, just pickups, toutorial realy bad
Your spelling is pretty bad.. Are you okay?
__________________

aka Googamalugafoo
[FS/Tool] Dynamic Biz - Dynamic Bank - FFA DM - Pawno Tool
[Tuts] Map Editor - Nuke - Using Pickups - Timers


SnG.Scot_MisCuDI is offline   Reply With Quote
Old 06/12/2011, 01:09 PM   #10
olabv
Big Clucker
 
Join Date: Jan 2009
Location: #define HOME "Pawn"
Posts: 109
Reputation: 0
Default Re: Making Houses With Pickups

well, what you just did was making a pickup outside a house and inside the house. then you made a command wich is /enter and /exit?

to be honest i dont think this can be called a house making tutorial. more like a pickup making tutorial

anyway, Good Job
__________________
Code:
Gamemodes:                        Filterscripts:

- FuryDM 1.5
olabv 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
help making houses alenblue Help Archive 2 19/05/2010 09:59 PM
[HELP]How Can i make houses static pickups to checkpoints Lilcuete Help Archive 8 29/12/2009 07:19 AM
[Problem] i dont see pickups houses/biz and more (0.3) itayizra Help Archive 4 24/10/2009 11:55 AM
Making houses Pawno_Master Help Archive 2 04/07/2009 03:40 PM


All times are GMT. The time now is 06:58 PM.


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